Skip to content

Commit

Permalink
Check that test executables are in PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
Bodigrim committed Dec 13, 2022
1 parent 2108ee8 commit cf76918
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
7 changes: 5 additions & 2 deletions core-tests/exit-status-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ then
timeout() { perl -e 'alarm shift; exec @ARGV' "$@"; }
fi

# This assumes that the compiled exit-status-test executable
# is in the PATH
if ! command -v exit-status-test
then
echo "exit-status-test executable is not in PATH, aborting"
exit 1
fi

exit-status-test --result=True > /dev/null || exit 1
exit-status-test --result=True --quiet || exit 1
Expand Down
6 changes: 6 additions & 0 deletions core-tests/failing-pattern-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

set -eu

if ! command -v failing-pattern-test
then
echo "failing-pattern-test executable is not in PATH, aborting"
exit 1
fi

# Make sure the loop is interrupted by Ctrl-C
trap exit INT

Expand Down
7 changes: 5 additions & 2 deletions core-tests/resource-release-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@

set -ux

# This assumes that the compiled resource-release-test executable
# is in the PATH
if ! command -v resource-release-test
then
echo "resource-release-test executable is not in PATH, aborting"
exit 1
fi

# create a folder for the duration of the test, and make sure it starts empty
DIR="$(dirname "$0")/resource-release-test-files"
Expand Down

0 comments on commit cf76918

Please sign in to comment.