diff --git a/test/ci-make b/test/ci-make index efe4203..a232172 100755 --- a/test/ci-make +++ b/test/ci-make @@ -10,7 +10,7 @@ usage() { exit 1 } -if [ $# -eq 0 ] || [ "$1" = -h -o "$1" = --help ]; then +if [ $# -eq 0 ] || [ "$1" = -h ] || [ "$1" = --help ]; then usage fi @@ -26,21 +26,27 @@ run() { fi } -tmpfiles=() +tmpdir=$(mktemp -d) +# Leak the files in tmpdir on purpose so that they can be examined. +echo "ci-make writing to $tmpdir" +i=0 for target in "${targets[@]}"; do - tmp=$(mktemp) - tmpfiles+=("$tmp") + tmp="$tmpdir/$i" + i=$(( i + 1 )) ( run "$target" 2>&1 | test/target/debug/log-timestamp > "$tmp" ) & done -for target in "${targets[@]}"; do +for _target in "${targets[@]}"; do wait || true done exit_code=0 -for tmp in "${tmpfiles[@]}"; do +i=0 +for _target in "${targets[@]}"; do + tmp="$tmpdir/$i" + i=$(( i + 1 )) echo "========================================================================================" if tail -1 "$tmp" | grep -q ": Ok."; then if [ "${CI_MAKE_VERBOSE-}" == 1 ]; then