Skip to content

Commit f525d3b

Browse files
authored
Properly check boolean flags in test command (#101)
* fix: Properly check boolean flags in test command Previous code only checked if the env variable was set. As it is always set, the race, short and verbose options where always on. * fix: Use numeric comparison instead of string
1 parent 7dee23c commit f525d3b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/scripts/test.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,20 @@ fi
2020

2121
COVER_PROFILE=$(eval echo "$ORB_EVAL_COVER_PROFILE")
2222

23-
if [ -n "$ORB_VAL_RACE" ]; then
23+
if [ "$ORB_VAL_RACE" -eq 1 ]; then
2424
set -- "$@" -race
2525
ORB_VAL_COVER_MODE=atomic
2626
fi
2727

28-
if [ "$ORB_VAL_FAILFAST" != "false" ]; then
28+
if [ "$ORB_VAL_FAILFAST" -eq 1 ]; then
2929
set -- "$@" -failfast
3030
fi
3131

32-
if [ -n "$ORB_VAL_SHORT" ]; then
32+
if [ "$ORB_VAL_SHORT" -eq 1 ]; then
3333
set -- "$@" -short
3434
fi
3535

36-
if [ -n "$ORB_VAL_VERBOSE" ]; then
36+
if [ "$ORB_VAL_VERBOSE" -eq 1 ]; then
3737
set -- "$@" -v
3838
fi
3939

0 commit comments

Comments
 (0)