mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-12-03 19:06:16 +02:00
Merge pull request #8694 from obsidiansystems/fix-lang-tests
Fix race condition in the language tests
This commit is contained in:
commit
bbc08a11f4
2 changed files with 4 additions and 3 deletions
|
@ -52,9 +52,10 @@ for i in lang/parse-okay-*.nix; do
|
||||||
i=$(basename "$i" .nix)
|
i=$(basename "$i" .nix)
|
||||||
if
|
if
|
||||||
expect 0 nix-instantiate --parse - < "lang/$i.nix" \
|
expect 0 nix-instantiate --parse - < "lang/$i.nix" \
|
||||||
1> >(sed "s!$(pwd)!/pwd!g" > "lang/$i.out") \
|
1> "lang/$i.out" \
|
||||||
2> >(sed "s!$(pwd)!/pwd!g" > "lang/$i.err")
|
2> "lang/$i.err"
|
||||||
then
|
then
|
||||||
|
sed "s!$(pwd)!/pwd!g" "lang/$i.out" "lang/$i.err"
|
||||||
diffAndAccept "$i" out exp
|
diffAndAccept "$i" out exp
|
||||||
diffAndAccept "$i" err err.exp
|
diffAndAccept "$i" err err.exp
|
||||||
else
|
else
|
||||||
|
|
|
@ -16,7 +16,7 @@ function diffAndAcceptInner() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Diff so we get a nice message
|
# 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"
|
echo "FAIL: evaluation result of $testName not as expected"
|
||||||
badDiff=1
|
badDiff=1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue