Skip to content

Commit

Permalink
Fix silently failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
lgarrison committed Nov 21, 2024
1 parent 73f404c commit d65b76d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/test_slurm/run.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -e

workdir=$(mktemp -d -p ./ disbatch-test.XXXX)
cp Tasks $workdir
cd $workdir
Expand All @@ -9,8 +11,8 @@ salloc -n 2 disBatch Tasks

# Check that all 3 tasks ran,
# which means A.txt, B.txt, and C.txt exist
[[ -f A.txt && -f B.txt && -f C.txt ]]
success=$?
success=0
[[ -f A.txt && -f B.txt && -f C.txt ]] || success=$?

cd - > /dev/null

Expand Down
3 changes: 3 additions & 0 deletions tests/test_ssh/Tasks_failfast
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sleep 1000
exit 1
touch A.txt
2 changes: 2 additions & 0 deletions tests/test_ssh/run.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -e

workdir=$(mktemp -d -p ./ disbatch-test.XXXX)
cp Tasks Tasks_failfast $workdir
cd $workdir
Expand Down

0 comments on commit d65b76d

Please sign in to comment.