summaryrefslogtreecommitdiffstats
path: root/kwallet
diff options
context:
space:
mode:
Diffstat (limited to 'kwallet')
-rw-r--r--kwallet/backend/tests/CMakeLists.txt4
-rw-r--r--kwallet/backend/tests/backendtest.sh18
2 files changed, 21 insertions, 1 deletions
diff --git a/kwallet/backend/tests/CMakeLists.txt b/kwallet/backend/tests/CMakeLists.txt
index efbd2c5ee..52e2868f0 100644
--- a/kwallet/backend/tests/CMakeLists.txt
+++ b/kwallet/backend/tests/CMakeLists.txt
@@ -26,7 +26,9 @@ link_directories(
)
tde_add_check_executable( backendtest AUTOMOC
- LINK kwalletbackend-shared kwalletclient-shared TEST )
+ LINK kwalletbackend-shared kwalletclient-shared )
+add_test( NAME "kwallet/backed/backendtest"
+ COMMAND sh -x "${CMAKE_CURRENT_SOURCE_DIR}/backendtest.sh" )
tde_add_check_executable( testbf AUTOMOC
SOURCES testbf.cpp ../blockcipher.cc ../blowfish.cc
LINK kwalletbackend-shared kwalletclient-shared TEST )
diff --git a/kwallet/backend/tests/backendtest.sh b/kwallet/backend/tests/backendtest.sh
new file mode 100644
index 000000000..d3a6ef0e1
--- /dev/null
+++ b/kwallet/backend/tests/backendtest.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# create temporary home
+export HOME=$PWD/test-home
+mkdir $HOME
+
+# run dcop server
+../../../dcop/dcopserver --nofork &
+DCOP_SERVER_PID=$!
+
+# perform test
+./backendtest
+STATE=$?
+
+# cleanup
+kill $DCOP_SERVER_PID
+rm -fr test-home
+exit $STATE