From 5fc948a815c8f9c4ce9604304a32d383222775e7 Mon Sep 17 00:00:00 2001 From: Tomas Baca Date: Sat, 10 Feb 2024 10:09:21 +0100 Subject: [PATCH] updated test scripts --- test/{all_tests.sh => clean_coverage.sh} | 8 -------- test/{coverage.sh => gather_coverage.sh} | 0 test/run_tests.sh | 12 ++++++++++++ 3 files changed, 12 insertions(+), 8 deletions(-) rename test/{all_tests.sh => clean_coverage.sh} (74%) rename test/{coverage.sh => gather_coverage.sh} (100%) create mode 100755 test/run_tests.sh diff --git a/test/all_tests.sh b/test/clean_coverage.sh similarity index 74% rename from test/all_tests.sh rename to test/clean_coverage.sh index 1c1168e..4a69a6a 100755 --- a/test/all_tests.sh +++ b/test/clean_coverage.sh @@ -24,11 +24,3 @@ for FILE in $OLD_FILES; do echo "$0: removing old coverage file '$FILE'" rm $FILE done - -cd $ORIGINAL_PATH - -# build the package -catkin build # it has to be fully built normally before building with --catkin-make-args tests -catkin build --catkin-make-args tests - -catkin test -i -p 1 -s diff --git a/test/coverage.sh b/test/gather_coverage.sh similarity index 100% rename from test/coverage.sh rename to test/gather_coverage.sh diff --git a/test/run_tests.sh b/test/run_tests.sh new file mode 100755 index 0000000..2250961 --- /dev/null +++ b/test/run_tests.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +set -e + +trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG +trap 'echo "$0: \"${last_command}\" command failed with exit code $?"' ERR + +# build the packages +catkin build # it has to be fully built normally before building with --catkin-make-args tests +catkin build -DMRS_ENABLE_TESTING=1 --catkin-make-args tests + +catkin test -i -p 1 -s