From 685600d72b0c300f94c0c69dc0a16c4ebb230a21 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Sun, 2 Jun 2019 11:57:42 +0300 Subject: Rewrite the testsuite The aim is to run pies in foreground if possible. Limit execution time using external wrapper. * src/pies.c: (_cb_redir): Consistently return 1 on errors. * tests/aux/sleepexit: New file. * tests/aux/startcheck: New file. * tests/aux/touchfile: Change arguments. * tests/aux/respawn: Rewrite. * tests/lines.c: New noinst program. * tests/to.c: New noinst program. * tests/.gitignore: Add new programs. * tests/Makefile.am: Update. * tests/env.at: Use to to avoid hanging forever. Add missing popdef. * tests/redirect.at: Use echo as component program. * tests/respawn.at: Run pies in foreground. Use to to limit execution time. * tests/shell.at: Likewise. * tests/shutdown.at: Likewise. * tests/startup.at: Likewise. * tests/ret-exec.at: Use sleepexit as component program. * tests/ret-notify.at: Likewise. --- tests/aux/sleepexit | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 tests/aux/sleepexit (limited to 'tests/aux/sleepexit') diff --git a/tests/aux/sleepexit b/tests/aux/sleepexit new file mode 100755 index 0000000..25a9a5b --- /dev/null +++ b/tests/aux/sleepexit @@ -0,0 +1,8 @@ +#! /bin/sh +t=${1:?} +c=${2:?} +if test -n "$3"; then + echo $$ > $3 +fi +sleep $t +exit $c -- cgit v1.2.1