From: Mathieu Desnoyers Date: Thu, 12 May 2016 20:08:44 +0000 (-0400) Subject: Fix: tests: skip tests on static build X-Git-Tag: v2.8.0~134 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=53b00091d773d915a2ee1771fe2b1adbb5af880d;p=lttng-tools.git Fix: tests: skip tests on static build 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 Signed-off-by: Jérémie Galarneau --- diff --git a/tests/regression/tools/health/test_health.sh b/tests/regression/tools/health/test_health.sh index 40d2f9e9c..bc25caa57 100644 --- a/tests/regression/tools/health/test_health.sh +++ b/tests/regression/tools/health/test_health.sh @@ -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" diff --git a/tests/regression/ust/clock-override/test_clock_override b/tests/regression/ust/clock-override/test_clock_override index f4a5feaee..722e73158 100755 --- a/tests/regression/ust/clock-override/test_clock_override +++ b/tests/regression/ust/clock-override/test_clock_override @@ -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" diff --git a/tests/regression/ust/getcpu-override/test_getcpu_override b/tests/regression/ust/getcpu-override/test_getcpu_override index f140eeaed..4ca385aeb 100755 --- a/tests/regression/ust/getcpu-override/test_getcpu_override +++ b/tests/regression/ust/getcpu-override/test_getcpu_override @@ -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 diff --git a/tests/regression/ust/overlap/test_overlap b/tests/regression/ust/overlap/test_overlap index 69d6c66d2..66c55ca91 100755 --- a/tests/regression/ust/overlap/test_overlap +++ b/tests/regression/ust/overlap/test_overlap @@ -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" diff --git a/tests/regression/ust/ust-dl/test_ust-dl b/tests/regression/ust/ust-dl/test_ust-dl index 7b835dcbd..1f2934db1 100755 --- a/tests/regression/ust/ust-dl/test_ust-dl +++ b/tests/regression/ust/ust-dl/test_ust-dl @@ -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