File: run-parallel

package info (click to toggle)
autopkgtest 5.53
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,600 kB
  • sloc: python: 15,484; sh: 2,317; makefile: 116; perl: 19
file content (22 lines) | stat: -rwxr-xr-x 909 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
#!/bin/sh
# Run tests for different runners in parallel

MYDIR=$(dirname "$0")

# these are fast, run them first
set -e
pre-commit run --all-files --show-diff-on-failure shellcheck
"$MYDIR/mypy"
"$MYDIR/qemu"
"$MYDIR/testdesc"
"$MYDIR/autopkgtest_args"
set +e

# get sudo password early, to avoid asking for it in background jobs
[ "$(id -u)" -eq 0 ] || sudo true

(rc=0; OUT=$("$MYDIR/autopkgtest" QemuRunner 2>&1) || rc=$?; echo "=== $c ==="; echo "$OUT"; exit "$rc") &
(rc=0; OUT=$("$MYDIR/autopkgtest" LxcRunner SshRunnerNoScript SshRunnerWithScript 2>&1) || rc=$?; echo "=== $c ==="; echo "$OUT"; exit "$rc") &
(rc=0; OUT=$("$MYDIR/autopkgtest" NullRunner SchrootRunner LxdRunner 2>&1) || rc=$?; echo "=== $c ==="; echo "$OUT"; exit "$rc") &
(rc=0; OUT=$(sudo "$MYDIR/autopkgtest" NullRunnerRoot ChrootRunner 2>&1) || rc=$?; echo "=== $c ==="; echo "$OUT"; exit "$rc") &
for c in $(seq 5); do wait; done