Merge branch 'ckuehl_fix_lucid'

This commit is contained in:
Chris Kuehl 2015-08-05 16:30:40 -07:00
commit 9e110230d5
3 changed files with 9 additions and 3 deletions

View file

@ -26,7 +26,8 @@ docker-image:
itest: itest_lucid itest_precise itest_trusty itest_wheezy itest_jessie itest_stretch
itest_lucid: builddeb-docker
docker run -v $(PWD):/mnt:ro ubuntu:lucid $(DOCKER_TEST)
docker run -v $(PWD):/mnt:ro ubuntu:lucid \
sh -ec "apt-get -y install timeout; $(DOCKER_TEST)"
itest_precise: builddeb-docker
docker run -v $(PWD):/mnt:ro ubuntu:precise $(DOCKER_TEST)

3
debian/rules vendored
View file

@ -1,3 +1,6 @@
#!/usr/bin/make -f
%:
dh $@
override_dh_builddeb:
dh_builddeb -- -Zgzip

View file

@ -7,16 +7,18 @@
# (piping spawns additional subshells and makes it hard to get the right PID)
fifo=$(mktemp -u)
mkfifo -m 600 "$fifo"
read_cmd="timeout 1 head -n1 $fifo"
dumb-init ./print-signals "$fifo" &
pid="$!"
# Wait for `print-signals` to indicate it's ready.
head -n1 "$fifo" > /dev/null
$read_cmd > /dev/null
for expected in $(catchable_signals); do
kill -s "$expected" "$pid"
echo -n "Sent signal ${expected}... "
received=$(timeout 1 head -n1 "$fifo") || {
received=$($read_cmd) || {
echo
echo "Error: Didn't receive signal within 1 second."
exit 1