diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2023-07-13 09:13:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-13 09:13:25 -0400 |
commit | bbc08a11f49ac41d8fa91510bcff269540c310a4 (patch) | |
tree | 1330034c474d65241b97c2d25b5935b4bfff6af5 | |
parent | cafb5e8a1751b2c951347d5d9188b2e0bee357be (diff) | |
parent | e072e18475bc461e522f34d63cc74fc5fbf1640e (diff) |
Merge pull request #8694 from obsidiansystems/fix-lang-tests
Fix race condition in the language tests
-rwxr-xr-x | tests/lang.sh | 5 | ||||
-rw-r--r-- | tests/lang/framework.sh | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/tests/lang.sh b/tests/lang.sh index bfb942d3d..75dbbc38e 100755 --- a/tests/lang.sh +++ b/tests/lang.sh @@ -52,9 +52,10 @@ for i in lang/parse-okay-*.nix; do i=$(basename "$i" .nix) if expect 0 nix-instantiate --parse - < "lang/$i.nix" \ - 1> >(sed "s!$(pwd)!/pwd!g" > "lang/$i.out") \ - 2> >(sed "s!$(pwd)!/pwd!g" > "lang/$i.err") + 1> "lang/$i.out" \ + 2> "lang/$i.err" then + sed "s!$(pwd)!/pwd!g" "lang/$i.out" "lang/$i.err" diffAndAccept "$i" out exp diffAndAccept "$i" err err.exp else diff --git a/tests/lang/framework.sh b/tests/lang/framework.sh index d6499e0e9..516bff8ad 100644 --- a/tests/lang/framework.sh +++ b/tests/lang/framework.sh @@ -16,7 +16,7 @@ function diffAndAcceptInner() { fi # Diff so we get a nice message - if ! diff "$got" "$expectedOrEmpty"; then + if ! diff --unified "$got" "$expectedOrEmpty"; then echo "FAIL: evaluation result of $testName not as expected" badDiff=1 fi |