aboutsummaryrefslogtreecommitdiff
path: root/tests/lang.sh
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2023-07-13 08:03:42 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2023-07-13 08:09:03 -0400
commite072e18475bc461e522f34d63cc74fc5fbf1640e (patch)
tree1330034c474d65241b97c2d25b5935b4bfff6af5 /tests/lang.sh
parentcafb5e8a1751b2c951347d5d9188b2e0bee357be (diff)
Fix race condition in the language tests
When we pipe to `>(...)` like that, we unfortunately don't wait for the process to finish. Better to just substitute the file. Also, use the "unified" diff output that people (including myself) are more familiar with, thanks to Git.
Diffstat (limited to 'tests/lang.sh')
-rwxr-xr-xtests/lang.sh5
1 files changed, 3 insertions, 2 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