From 56dc6f6d4ede0855af7c5d1191f7e11b96b6888a Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Mon, 18 Feb 2019 10:41:34 -0500 Subject: [PATCH] tests.sh: special case when running in gitlab_ci When run is a containerized environment, some tests may behave differently. This prepares some special cases for them. Cf #2732 Signed-off-by: Jean Privat --- tests/gitlab_ci.skip | 13 +++++++++++++ tests/tests.sh | 6 ++++++ 2 files changed, 19 insertions(+) create mode 100644 tests/gitlab_ci.skip create mode 100644 tests/sav/gitlab_ci/simple_file_server.res diff --git a/tests/gitlab_ci.skip b/tests/gitlab_ci.skip new file mode 100644 index 0000000..c611822 --- /dev/null +++ b/tests/gitlab_ci.skip @@ -0,0 +1,13 @@ +android +emscripten +java +glsl +mongo +mpi +neo +objc +postgres +action_nitro +asteronits +nitrpg +wiringPi diff --git a/tests/sav/gitlab_ci/simple_file_server.res b/tests/sav/gitlab_ci/simple_file_server.res new file mode 100644 index 0000000..e69de29 diff --git a/tests/tests.sh b/tests/tests.sh index 9eda24c..b771914 100755 --- a/tests/tests.sh +++ b/tests/tests.sh @@ -407,6 +407,11 @@ need_skip() echo >>$xml "" return 0 fi + if test -n "GITLAB_CI" && echo "$1" | grep -f "gitlab_ci.skip" >/dev/null 2>&1; then + echo "=> $2: [skip gitlab ci]" + echo >>$xml "" + return 0 + fi # Skip by OS local os_skip_file=$UNAME.skip @@ -572,6 +577,7 @@ case $engine in esac savdirs="sav/`$HOSTNAME` sav/$UNAME sav/$engine $savdirs sav/" +test -n "$GITLAB_CI" && savdirs="sav/gitlab_ci $savdirs" # The default nitc compiler [ -z "$NITC" ] && find_nitc -- 1.7.9.5