Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
tek committed Sep 2, 2023
1 parent 40e8aae commit b57632a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion test/basic/test.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
target='[ "default" "ghc90-root" "ghc92-root" "ghc94-root" "ghc96-root" "min" "root" "static" ]'
check 'nix eval .#packages.x86_64-linux --apply builtins.attrNames' $target 'Packages are wrong'
check 'nix develop .#ghc94 -c ghc --version' 'The Glorious Glasgow Haskell Compilation System, version 9.4.5'
check 'nix develop .#ghc94 -c ghc --version' 'The Glorious Glasgow Haskell Compilation System, version 9.4.6' 'Version output wrong'
nix build .#ghc92-root
check 'result/bin/root' 'string' 'Running the main package produced the wrong output'
Expand Down
15 changes: 8 additions & 7 deletions test/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ in {
runtest()
{
setopt local_options err_return
current="$1"
test="''${tests[$current]}"
local current="$1"
local test="''${tests[$current]}"
if [[ -z $test ]]
then
message "Invalid test name: $current"
Expand Down Expand Up @@ -142,14 +142,15 @@ in {
failure=0
failed=()
for target in $=targets
local current
for current in $=targets
do
runtest $target
runtest $current
if [[ $? != 0 ]]
then
echo ">>> Test failed: $target"
failure=$(( failure + 1 ))
failed+=($target)
echo ">>> Test failed: $current"
(( failure = failure + 1 ))
failed+=($current)
fi
done
Expand Down

0 comments on commit b57632a

Please sign in to comment.