testing: run tdeio/kmimetypetest with temporary profile

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/1/head
Slávek Banko 8 years ago
parent 30d5bd4d72
commit 4d3d8d8653

@ -53,6 +53,7 @@ set( CHECKS
kmimemagictest kpropsdlgtest kprotocolinfotest kruntest kscantest kshredtest kmimemagictest kpropsdlgtest kprotocolinfotest kruntest kscantest kshredtest
ktartest kurifiltertest kurlcompletiontest kziptest metatest netaccesstest ktartest kurifiltertest kurlcompletiontest kziptest metatest netaccesstest
previewtest speed tdeioslavetest tdesycocatest tdesycocaupdatetest previewtest speed tdeioslavetest tdesycocatest tdesycocaupdatetest
kmimetypetest
) )
foreach( _check ${CHECKS} ) foreach( _check ${CHECKS} )
@ -67,10 +68,18 @@ endforeach( )
# - kurifiltertest requires network access and GUI # - kurifiltertest requires network access and GUI
# - tdesycocatest requires installed tdebase and GUI # - tdesycocatest requires installed tdebase and GUI
set( TESTS dataprotocoltest kacltest kmimetypetest ) set( TESTS dataprotocoltest kacltest )
foreach( _check ${TESTS} ) foreach( _check ${TESTS} )
tde_add_check_executable( ${_check} AUTOMOC LINK tdeio-shared TEST) tde_add_check_executable( ${_check} AUTOMOC LINK tdeio-shared TEST)
endforeach( ) endforeach( )
configure_file( kmimetypetest.sh.cmake kmimetypetest.sh @ONLY )
add_test( NAME "tdeio/kmimetypetest"
COMMAND sh -x "${CMAKE_CURRENT_BINARY_DIR}/kmimetypetest.sh"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" )
# TODO add kdirwatchunittest # TODO add kdirwatchunittest

@ -0,0 +1,23 @@
#!/bin/sh
# create profile for test
TDEHOME=@CMAKE_CURRENT_BINARY_DIR@/profile
mkdir $TDEHOME $TDEHOME/share
ln -s @CMAKE_SOURCE_DIR@/mimetypes $TDEHOME/share/mimelnk
export TDEHOME
# run dcop server
../../dcop/dcopserver --nofork &
DCOP_SERVER_PID=$!
# update tdesycoca using mime types from source
../../kded/tdebuildsycoca --noincremental --nosignal
# perform test
./kmimetypetest
STATE=$?
# cleanup
kill $DCOP_SERVER_PID
rm -fr $TDEHOME
exit $STATE
Loading…
Cancel
Save