summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/hashicorp/go-sockaddr/cmd/sockaddr/regression/run_all.sh
blob: 4b6d8a746b8b9cfe618b1d8cff58e5e67e4d2969 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh --

set -e
set -u

num_cpus=$(getconf NPROCESSORS_ONLN)
set +e
find . -name 'test_*.sh' -depth 1 | xargs -n1 -P${num_cpus} ./run_one.sh
set -e

# rune_one.sh generates the .diff files
diffs=$(find . -name '*.diff')
if [ -z "${diffs}" ]; then
    exit 0
fi

printf "The following tests failed (check the respective .diff file for details):\n\n"
for d in ${diffs}; do
    printf "\t%s\n" "$(basename ${d} .diff)"
done
exit 1