From 89b44debb9fc14f5d4fc1be89e940b375726dc0b Mon Sep 17 00:00:00 2001 From: Eduardo Almeida Date: Wed, 3 May 2023 03:42:58 +0100 Subject: [PATCH] ci: Use double square brackets in if-else conditions --- utils/tests/gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/tests/gitlab-ci.yml b/utils/tests/gitlab-ci.yml index 14ce632aa..319ee696e 100644 --- a/utils/tests/gitlab-ci.yml +++ b/utils/tests/gitlab-ci.yml @@ -46,12 +46,12 @@ workflow: - CXX=$COMPILER ./ns3 configure -d $MODE -GNinja --enable-examples --enable-tests --enable-asserts $ENABLE_MPI - ccache -z - ./ns3 build - - if [ "$CI_JOB_STAGE" == "build" ] && [ "`./utils/ccache-miss-rate.py`" != "0" ]; + - if [[ "$CI_JOB_STAGE" == "build" ]] && [[ "`./utils/ccache-miss-rate.py`" != "0" ]]; then `touch $CCACHE_BASEDIR_VALUE/tests-$CI_COMMIT_REF_SLUG.txt`; fi - - if [ "$CI_JOB_STAGE" == "test" ] && [ "$MODE" != "debug" ] && [[ -f $CCACHE_BASEDIR_VALUE/tests-$CI_COMMIT_REF_SLUG.txt ]]; + - if [[ "$CI_JOB_STAGE" == "test" ]] && [[ "$MODE" != "debug" ]] && [[ -f $CCACHE_BASEDIR_VALUE/tests-$CI_COMMIT_REF_SLUG.txt ]]; then ./test.py -n; - if [ $? == 0 ]; + if [[ $? == 0 ]]; then `rm $CCACHE_BASEDIR_VALUE/tests-$CI_COMMIT_REF_SLUG.txt` || true; fi; fi