From 4d3d8d865359061916b21e9ab46097e2e4c2fd2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sun, 29 Jan 2017 02:35:44 +0100 Subject: testing: run tdeio/kmimetypetest with temporary profile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- tdeio/tests/CMakeLists.txt | 11 ++++++++++- tdeio/tests/kmimetypetest.sh.cmake | 23 +++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 tdeio/tests/kmimetypetest.sh.cmake (limited to 'tdeio') diff --git a/tdeio/tests/CMakeLists.txt b/tdeio/tests/CMakeLists.txt index b8b9a411a..323a7d86e 100644 --- a/tdeio/tests/CMakeLists.txt +++ b/tdeio/tests/CMakeLists.txt @@ -53,6 +53,7 @@ set( CHECKS kmimemagictest kpropsdlgtest kprotocolinfotest kruntest kscantest kshredtest ktartest kurifiltertest kurlcompletiontest kziptest metatest netaccesstest previewtest speed tdeioslavetest tdesycocatest tdesycocaupdatetest + kmimetypetest ) foreach( _check ${CHECKS} ) @@ -67,10 +68,18 @@ endforeach( ) # - kurifiltertest requires network access and GUI # - tdesycocatest requires installed tdebase and GUI -set( TESTS dataprotocoltest kacltest kmimetypetest ) +set( TESTS dataprotocoltest kacltest ) foreach( _check ${TESTS} ) tde_add_check_executable( ${_check} AUTOMOC LINK tdeio-shared TEST) 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 diff --git a/tdeio/tests/kmimetypetest.sh.cmake b/tdeio/tests/kmimetypetest.sh.cmake new file mode 100644 index 000000000..a242b8dc5 --- /dev/null +++ b/tdeio/tests/kmimetypetest.sh.cmake @@ -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 -- cgit v1.2.1