From 8bc0bc7fc67437fbf757283604104e998ad2fda7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sun, 6 Dec 2020 10:50:13 +0100 Subject: tests: Wait for the dcop server to be ready. Use a separate ICEAUTHORITY for tests. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko (cherry picked from commit 19f44e5ff3756172540e768fc0d08d761f0c374e) --- tdewallet/backend/tests/CMakeLists.txt | 1 + tdewallet/backend/tests/backendtest.sh | 5 +++++ 2 files changed, 6 insertions(+) (limited to 'tdewallet') diff --git a/tdewallet/backend/tests/CMakeLists.txt b/tdewallet/backend/tests/CMakeLists.txt index 275891ae7..abc703a7c 100644 --- a/tdewallet/backend/tests/CMakeLists.txt +++ b/tdewallet/backend/tests/CMakeLists.txt @@ -29,6 +29,7 @@ tde_add_check_executable( backendtest AUTOMOC LINK tdewalletbackend-shared tdewalletclient-shared ) add_test( NAME "tdewallet/backed/backendtest" COMMAND sh -x "${CMAKE_CURRENT_SOURCE_DIR}/backendtest.sh" ) +set_tests_properties( "tdewallet/backed/backendtest" PROPERTIES TIMEOUT 30) tde_add_check_executable( testbf AUTOMOC SOURCES testbf.cpp ../blockcipher.cc ../blowfish.cc LINK tdewalletbackend-shared tdewalletclient-shared TEST ) diff --git a/tdewallet/backend/tests/backendtest.sh b/tdewallet/backend/tests/backendtest.sh index d3a6ef0e1..d4f1ba686 100644 --- a/tdewallet/backend/tests/backendtest.sh +++ b/tdewallet/backend/tests/backendtest.sh @@ -3,11 +3,16 @@ # create temporary home export HOME=$PWD/test-home mkdir $HOME +export ICEAUTHORITY=$HOME/.ICEauthority # run dcop server ../../../dcop/dcopserver --nofork & DCOP_SERVER_PID=$! +while ! ../../../dcop/dcopserver --serverid 2>/dev/null; do + sleep 2 +done + # perform test ./backendtest STATE=$? -- cgit v1.2.1