Fix for lucid
This commit is contained in:
parent
0b09f86af6
commit
55cc57248d
3 changed files with 9 additions and 3 deletions
3
Makefile
3
Makefile
|
@ -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
3
debian/rules
vendored
|
@ -1,3 +1,6 @@
|
|||
#!/usr/bin/make -f
|
||||
%:
|
||||
dh $@
|
||||
|
||||
override_dh_builddeb:
|
||||
dh_builddeb -- -Zgzip
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue