Complete runtime resilience and audit controls
This commit is contained in:
parent
ea55108f44
commit
728abdbbf1
1 changed files with 1466 additions and 251 deletions
21
tests/run-host-tests.sh
Executable file
21
tests/run-host-tests.sh
Executable file
|
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
output="$(mktemp)"
|
||||
trap 'rm -f "$output"' EXIT
|
||||
|
||||
set +e
|
||||
cabal test --offline nuthatch-unit --test-show-details=direct 2>&1 |
|
||||
tee "$output"
|
||||
status="${PIPESTATUS[0]}"
|
||||
set -e
|
||||
|
||||
if [[ "$status" = 0 ]]; then
|
||||
exit 0
|
||||
fi
|
||||
if grep -E 'All [0-9]+ tests passed' "$output" >/dev/null &&
|
||||
grep -F '/.cabal/logs/build.log: withFile: permission denied' \
|
||||
"$output" >/dev/null; then
|
||||
exit 0
|
||||
fi
|
||||
exit "$status"
|
||||
Loading…
Reference in a new issue