From 22e099b5f6ff27b9097ae8c13afe222474e3fda8 Mon Sep 17 00:00:00 2001 From: Jonathan Rajotte Date: Mon, 16 Feb 2015 10:57:41 -0500 Subject: [PATCH] Fix: check if test plan exist before running them --- lttng-ust/lttng-ust-master.sh | 7 ++++++- lttng-ust/lttng-ust-stable-2.5.sh | 7 ++++++- lttng-ust/lttng-ust-stable-2.6.sh | 7 ++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/lttng-ust/lttng-ust-master.sh b/lttng-ust/lttng-ust-master.sh index f792c17..5e1b644 100755 --- a/lttng-ust/lttng-ust-master.sh +++ b/lttng-ust/lttng-ust-master.sh @@ -87,7 +87,12 @@ mkdir -p $WORKSPACE/tap/unit cd $BUILD_PATH/tests -prove --merge --exec '' - < $BUILD_PATH/tests/unit_tests --archive $WORKSPACE/tap/unit/ || true +if [ -e $BUILD_PATH/tests/unit_tests ]; then + prove --merge --exec '' - < $BUILD_PATH/tests/unit_tests --archive $WORKSPACE/tap/unit/ || true +else + echo "Test file:$BUILD_PATH/tests/unit_tests missing" + exit 1 +fi # TAP plugin is having a hard time with .yml files. rm -f $WORKSPACE/tap/unit/meta.yml diff --git a/lttng-ust/lttng-ust-stable-2.5.sh b/lttng-ust/lttng-ust-stable-2.5.sh index 3d52a49..3ef2ddf 100755 --- a/lttng-ust/lttng-ust-stable-2.5.sh +++ b/lttng-ust/lttng-ust-stable-2.5.sh @@ -43,7 +43,12 @@ mkdir -p $WORKSPACE/tap/unit cd $WORKSPACE/tests -prove --merge --exec '' - < $WORKSPACE/tests/unit_tests --archive $WORKSPACE/tap/unit/ || true +if [ -e $BUILD_PATH/tests/unit_tests ]; then + prove --merge --exec '' - < $BUILD_PATH/tests/unit_tests --archive $WORKSPACE/tap/unit/ || true +else + echo "Test file:$BUILD_PATH/tests/unit_tests missing" + exit 1 +fi # TAP plugin is having a hard time with .yml files. rm -f $WORKSPACE/tap/unit/meta.yml diff --git a/lttng-ust/lttng-ust-stable-2.6.sh b/lttng-ust/lttng-ust-stable-2.6.sh index fb1fec4..88a6edb 100755 --- a/lttng-ust/lttng-ust-stable-2.6.sh +++ b/lttng-ust/lttng-ust-stable-2.6.sh @@ -83,7 +83,12 @@ mkdir -p $WORKSPACE/tap/unit cd $BUILD_PATH/tests -prove --merge --exec '' - < $BUILD_PATH/tests/unit_tests --archive $WORKSPACE/tap/unit/ || true +if [ -e $BUILD_PATH/tests/unit_tests ]; then + prove --merge --exec '' - < $BUILD_PATH/tests/unit_tests --archive $WORKSPACE/tap/unit/ || true +else + echo "Test file:$BUILD_PATH/tests/unit_tests missing" + exit 1 +fi # TAP plugin is having a hard time with .yml files. rm -f $WORKSPACE/tap/unit/meta.yml -- 2.34.1