test: Shell tests should use unified timeout command

This commit is contained in:
James Shubin
2019-02-22 06:15:10 -05:00
parent ab5957f1e9
commit 0d0d48d9f6
37 changed files with 124 additions and 63 deletions

View File

@@ -1,5 +1,7 @@
#!/bin/bash -e
. "$(dirname "$0")/../util.sh"
set -x
set -o pipefail
@@ -44,7 +46,7 @@ sudo mkdir -p /etc/systemd/network
sudo ip link add $IFACE type dummy || true
# run mgmt net res with $IFACE and $ADDR set as above
sudo -A $timeout --kill-after=360s 300s "$MGMT" run --converged-timeout=5 --tmp-prefix lang --lang ./net0.mcl &
sudo -A $TIMEOUT "$MGMT" run --converged-timeout=5 --tmp-prefix lang --lang ./net0.mcl &
pid1=$!
# give the engine time to start up
@@ -85,7 +87,7 @@ wait $pid1
e1=$?
# run mgmt net res with $IFACE state => "down"
sudo -A $timeout --kill-after=360s 300s "$MGMT" run --converged-timeout=5 --tmp-prefix lang --lang ./net1.mcl &
sudo -A $TIMEOUT "$MGMT" run --converged-timeout=5 --tmp-prefix lang --lang ./net1.mcl &
# give the engine time to start up
sleep 5