From 4884bf3dbd08762564de71608da9941b50184f8b Mon Sep 17 00:00:00 2001 From: Quentin Monnet Date: Wed, 1 Dec 2021 20:59:48 +0000 Subject: [PATCH] ci: fix test on /exitstatus existence and size The condition for the test is incorrect, we want to add a default exit status if the file is empty. But [[ -s file ]] returns true if the file exists and has a size greater than zero. Let's reverse the condition. Fixes: 385b2d173817 ("ci: change VM's /exitstatus format to prepare it for several results") Signed-off-by: Quentin Monnet --- travis-ci/vmtest/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/travis-ci/vmtest/run.sh b/travis-ci/vmtest/run.sh index c0e9e7c..2a765b0 100755 --- a/travis-ci/vmtest/run.sh +++ b/travis-ci/vmtest/run.sh @@ -480,7 +480,7 @@ ${setup_cmd}; exitstatus=\$? echo -e '$(travis_fold start collect_status "Collect status")' set -e # If setup command did not write its exit status to /exitstatus, do it now -if [[ -s /exitstatus ]]; then +if [[ ! -s /exitstatus ]]; then echo setup_cmd:\$exitstatus > /exitstatus fi chmod 644 /exitstatus