File: run_all.sh

package info (click to toggle)
golang-github-hashicorp-go-sockaddr 0.0~git20170627.41949a1%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 984 kB
  • sloc: sh: 165; makefile: 8
file content (23 lines) | stat: -rwxr-xr-x 636 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh --

FIND=`/usr/bin/which 2> /dev/null gfind find | /usr/bin/grep -v ^no | /usr/bin/head -n 1`
XARGS=`/usr/bin/which 2> /dev/null gxargs xargs | /usr/bin/grep -v ^no | /usr/bin/head -n 1`
set -e
set -u

num_cpus=$(getconf NPROCESSORS_ONLN)
set +e
${FIND} . -maxdepth 1 -name 'test_*.sh' -print0 | ${XARGS} -0 -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