diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2017-01-29 02:35:44 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2017-07-22 15:56:52 +0200 |
commit | 6af35513288d93ebae0e05c2506d45baa8944d78 (patch) | |
tree | ae44522007a688ea153171b19a2360646369cbbb /kio | |
parent | 3c559266a6047074018078fc7f73abd0f42f0438 (diff) | |
download | tdelibs-6af35513288d93ebae0e05c2506d45baa8944d78.tar.gz tdelibs-6af35513288d93ebae0e05c2506d45baa8944d78.zip |
testing: run tdeio/kmimetypetest with temporary profile
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 4d3d8d865359061916b21e9ab46097e2e4c2fd2c)
Diffstat (limited to 'kio')
-rw-r--r-- | kio/tests/CMakeLists.txt | 11 | ||||
-rw-r--r-- | kio/tests/kmimetypetest.sh.cmake | 23 |
2 files changed, 33 insertions, 1 deletions
diff --git a/kio/tests/CMakeLists.txt b/kio/tests/CMakeLists.txt index 02ffd9eb5..4b554ae97 100644 --- a/kio/tests/CMakeLists.txt +++ b/kio/tests/CMakeLists.txt @@ -53,6 +53,7 @@ set( CHECKS kmimemagictest kpropsdlgtest kprotocolinfotest kruntest kscantest kshredtest ktartest kurifiltertest kurlcompletiontest kziptest metatest netaccesstest previewtest speed kioslavetest ksycocatest ksycocaupdatetest + kmimetypetest ) foreach( _check ${CHECKS} ) @@ -67,10 +68,18 @@ endforeach( ) # - kurifiltertest requires network access and GUI # - ksycocatest requires installed kdebase and GUI -set( TESTS dataprotocoltest kacltest kmimetypetest ) +set( TESTS dataprotocoltest kacltest ) foreach( _check ${TESTS} ) tde_add_check_executable( ${_check} AUTOMOC LINK kio-shared TEST) endforeach( ) + +configure_file( kmimetypetest.sh.cmake kmimetypetest.sh @ONLY ) + +add_test( NAME "kio/kmimetypetest" + COMMAND sh -x "${CMAKE_CURRENT_BINARY_DIR}/kmimetypetest.sh" + WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" ) + + # TODO add kdirwatchunittest diff --git a/kio/tests/kmimetypetest.sh.cmake b/kio/tests/kmimetypetest.sh.cmake new file mode 100644 index 000000000..d4030c57d --- /dev/null +++ b/kio/tests/kmimetypetest.sh.cmake @@ -0,0 +1,23 @@ +#!/bin/sh + +# create profile for test +KDEHOME=@CMAKE_CURRENT_BINARY_DIR@/profile +mkdir $KDEHOME $KDEHOME/share +ln -s @CMAKE_SOURCE_DIR@/mimetypes $KDEHOME/share/mimelnk +export KDEHOME + +# run dcop server +../../dcop/dcopserver --nofork & +DCOP_SERVER_PID=$! + +# update ksycoca using mime types from source +../../kded/kbuildsycoca --noincremental --nosignal + +# perform test +./kmimetypetest +STATE=$? + +# cleanup +kill $DCOP_SERVER_PID +rm -fr $KDEHOME +exit $STATE |