]> git.gag.com Git - debian/tar/commitdiff
Improve testsuite
authorSergey Poznyakoff <gray@gnu.org.ua>
Thu, 17 Mar 2016 12:22:35 +0000 (14:22 +0200)
committerSergey Poznyakoff <gray@gnu.org.ua>
Thu, 17 Mar 2016 12:22:35 +0000 (14:22 +0200)
* tests/iotty.at: Skip test if ttyemu can't do its job

tests/iotty.at

index 1e5c73bcb2170d3dffc1eac2049f0ce14d9fe9e5..526fadb13e1360bfa6a604d215c3b437370381c4 100644 (file)
 AT_SETUP([terminal input])
 AT_KEYWORDS([options iotty])
 
+m4_define([TTYEMU],[ttyemu -t5 -i/dev/null $*
+rc=$?
+# Skip test if ttyemu can't do its job
+test $rc -eq 126 && AT_SKIP_TEST
+echo $rc])
+
 AT_TAR_CHECK([
 test -x $abs_builddir/ttyemu || AT_SKIP_TEST
 TAPE=-
 export TAPE
-ttyemu -t5 -i/dev/null tar -x
-echo $?
-ttyemu -t5 -i/dev/null tar -xz
-echo $?
-ttyemu -t5 -i/dev/null tar -c .
-echo $?
+TTYEMU(tar -x)
+TTYEMU(tar -xz)
+TTYEMU(tar -c .)
 ],
 [0],
 [tar: Refusing to read archive contents from terminal (missing -f option?)