mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
29 lines
613 B
Bash
Executable File
29 lines
613 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -Eeuo pipefail # see https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/
|
|
|
|
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
|
cd "$SCRIPTDIR"
|
|
|
|
failures=()
|
|
for f in */test.sh; do
|
|
echo "Running $f:"
|
|
if ! bash "$f"; then
|
|
echo "ERROR: $f failed"
|
|
failures+=("$f")
|
|
fi
|
|
echo "---"
|
|
done
|
|
|
|
if [ -z "${failures[*]}" ]; then
|
|
echo "All integration tests passed!"
|
|
exit 0
|
|
else
|
|
echo "ERROR: Some integration test failed! Failures:"
|
|
for failure in "${failures[@]}"
|
|
do
|
|
echo "- ${failure}"
|
|
done
|
|
exit 1
|
|
fi
|