mirror of
https://github.com/netdata/libbpf.git
synced 2026-03-21 00:39:07 +08:00
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: 385b2d1738 ("ci: change VM's /exitstatus format to prepare it for several results")
Signed-off-by: Quentin Monnet <quentin@isovalent.com>
This commit is contained in:
committed by
Andrii Nakryiko
parent
690d0531f9
commit
4884bf3dbd
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user