diff options
author | Victor Engmark <vengmark@linz.govt.nz> | 2021-11-26 10:42:12 +1300 |
---|---|---|
committer | Victor Engmark <vengmark@linz.govt.nz> | 2021-11-26 10:52:28 +1300 |
commit | bfc580f54fb90295f7375ae166446e334e6ebd17 (patch) | |
tree | 0bbfe66e13b3bdf1bb95a5a107fc60c0a7583ae2 /lib/tests/modules.sh | |
parent | 40ae711f7387565b6be25d6d34424f9ede0154a0 (diff) | |
download | nixpkgs-bfc580f54fb90295f7375ae166446e334e6ebd17.tar nixpkgs-bfc580f54fb90295f7375ae166446e334e6ebd17.tar.gz nixpkgs-bfc580f54fb90295f7375ae166446e334e6ebd17.tar.bz2 nixpkgs-bfc580f54fb90295f7375ae166446e334e6ebd17.tar.lz nixpkgs-bfc580f54fb90295f7375ae166446e334e6ebd17.tar.xz nixpkgs-bfc580f54fb90295f7375ae166446e334e6ebd17.tar.zst nixpkgs-bfc580f54fb90295f7375ae166446e334e6ebd17.zip |
lib/tests: Don't return non-zero values from checks
The exit codes aren't used for anything.
Diffstat (limited to 'lib/tests/modules.sh')
-rwxr-xr-x | lib/tests/modules.sh | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/lib/tests/modules.sh b/lib/tests/modules.sh index 527e4903284..67d4e589bde 100755 --- a/lib/tests/modules.sh +++ b/lib/tests/modules.sh @@ -32,11 +32,9 @@ checkConfigOutput() { shift if evalConfig "$@" 2>/dev/null | grep --silent "$outputContains" ; then pass=$((pass + 1)) - return 0 else echo 2>&1 "error: Expected result matching '$outputContains', while evaluating" reportFailure "$@" - return 1 fi } @@ -47,15 +45,12 @@ checkConfigError() { if err="$(evalConfig "$@" 2>&1 >/dev/null)"; then echo 2>&1 "error: Expected error code, got exit code 0, while evaluating" reportFailure "$@" - return 1 else if echo "$err" | grep -zP --silent "$errorContains" ; then pass=$((pass + 1)) - return 0 else echo 2>&1 "error: Expected error matching '$errorContains', while evaluating" reportFailure "$@" - return 1 fi fi } |