Fix: tests: skip tests on static build
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 12 May 2016 20:08:44 +0000 (16:08 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sat, 14 May 2016 18:58:58 +0000 (14:58 -0400)
Skip tests that depend on shared objects on static build rather than
bailing out, which will let the overall test suite succeed.

Fixes: #977
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
tests/regression/tools/health/test_health.sh
tests/regression/ust/clock-override/test_clock_override
tests/regression/ust/getcpu-override/test_getcpu_override
tests/regression/ust/overlap/test_overlap
tests/regression/ust/ust-dl/test_ust-dl

index 40d2f9e9cfb798381c0a7ac9e7be9bed00b46035..bc25caa5794d9c99be4a5f126117befd3b49220b 100644 (file)
@@ -25,10 +25,6 @@ SLEEP_TIME=30
 
 source $TESTDIR/utils/utils.sh
 
-if [ ! -f "$CURDIR/$SESSIOND_PRELOAD" ]; then
-       BAIL_OUT "${CURDIR}/${SESSIOND_PRELOAD} is missing."
-fi
-
 function lttng_create_session_uri
 {
        # Create session with default path
@@ -163,6 +159,14 @@ plan_tests $NUM_TESTS
 
 print_test_banner "$TEST_DESC"
 
+if [ -f "$CURDIR/$SESSIOND_PRELOAD" ]; then
+       foundobj=1
+else
+       foundobj=0
+fi
+
+skip $foundobj "No shared object generated. Skipping all tests." $NUM_TESTS && exit 0
+
 THREAD=("LTTNG_SESSIOND_THREAD_MANAGE_CLIENTS"
        "LTTNG_SESSIOND_THREAD_MANAGE_APPS"
        "LTTNG_SESSIOND_THREAD_REG_APPS"
index f4a5feaee3f7151177a6fe6ed3b33458d7dd4503..722e7315849f6763893a46215f931d736582d18b 100755 (executable)
@@ -49,10 +49,6 @@ NUM_TESTS=33
 
 source $TESTDIR/utils/utils.sh
 
-if [ ! -x "$CURDIR/$LIBS_DIR/$LTTNG_UST_CLOCK_PLUGIN_SO" ]; then
-       BAIL_OUT "No shared object generated"
-fi
-
 # MUST set TESTDIR before calling those functions
 function run_app()
 {
@@ -167,6 +163,14 @@ plan_tests $NUM_TESTS
 
 print_test_banner "$TEST_DESC"
 
+if [ -x "$CURDIR/$LIBS_DIR/$LTTNG_UST_CLOCK_PLUGIN_SO" ]; then
+       foundobj=1
+else
+       foundobj=0
+fi
+
+skip $foundobj "No shared object generated. Skipping all tests." $NUM_TESTS && exit 0
+
 TESTS=(
        "test_getcpu_override_metadata"
        "test_getcpu_override_timestamp"
index f140eeaed2e6b1e686c8cb3f57810e4629d804f9..4ca385aeb0c5e19f58136af4c979498eb8a86963 100755 (executable)
@@ -50,10 +50,6 @@ source $TESTDIR/utils/utils.sh
 # Equivalent to the syconf(_SC_NPROCESSORS_CONF) call.
 num_cpus=$(conf_proc_count)
 
-if [ ! -x "$CURDIR/.libs/lttng-ust-getcpu-override-test.so" ]; then
-       BAIL_OUT "No shared object generated"
-fi
-
 # MUST set TESTDIR before calling those functions
 
 run_app()
@@ -161,6 +157,14 @@ plan_tests $NUM_TESTS
 
 print_test_banner "$TEST_DESC"
 
+if [ -x "$CURDIR/.libs/lttng-ust-getcpu-override-test.so" ]; then
+       foundobj=1
+else
+       foundobj=0
+fi
+
+skip $foundobj "No shared object generated. Skipping all tests." $NUM_TESTS && exit 0
+
 TESTS=(
        test_getcpu_override_fail
        test_getcpu_override
index 69d6c66d2979c99c98c51cd72e0dba3f8e65438e..66c55ca916defd2b4fe5b00df6b2c8ce0668dad7 100755 (executable)
@@ -34,10 +34,6 @@ NUM_TESTS=259
 
 source $TESTDIR/utils/utils.sh
 
-if [ ! -x "$CURDIR/demo/demo" ]; then
-       BAIL_OUT "No UST nevents binary detected."
-fi
-
 # MUST set TESTDIR before calling those functions
 
 run_demo_app()
@@ -616,6 +612,14 @@ plan_tests $NUM_TESTS
 
 print_test_banner "$TEST_DESC"
 
+if [ -x "$CURDIR/demo/demo" ]; then
+       foundbin=1
+else
+       foundbin=0
+fi
+
+skip $foundbin "No UST nevents binary detected. Skipping all tests." $NUM_TESTS && exit 0
+
 TESTS=(
        "test_enable_wildcard_filter"
        "test_enable_wildcard_filter_2"
index 7b835dcbd290c143ba0b1d64a1f8ad91691f60fa..1f2934db198be85c6d546708ba3774c63ce58e20 100755 (executable)
@@ -21,7 +21,8 @@ TESTDIR=${CURDIR}/../../..
 source $TESTDIR/utils/utils.sh
 
 if [ ! -x "$CURDIR/.libs/libfoo.so" ]; then
-       BAIL_OUT "No shared object generated"
+       diag "No shared object generated. Skipping all tests."
+       exit 0
 fi
 
 start_lttng_sessiond_notap
This page took 0.033065 seconds and 5 git commands to generate.