aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/runtest.sh (renamed from scripts/test/testing.sh)6
-rwxr-xr-xscripts/test.sh18
-rwxr-xr-xtests/basename.test (renamed from scripts/test/basename.test)0
-rwxr-xr-xtests/blkid.test (renamed from scripts/test/blkid.test)2
-rw-r--r--tests/blkid/cramfs.bz2 (renamed from scripts/test/blkid/cramfs.bz2)bin121 -> 121 bytes
-rw-r--r--tests/blkid/ext2.bz2 (renamed from scripts/test/blkid/ext2.bz2)bin2396 -> 2396 bytes
-rw-r--r--tests/blkid/ext3.bz2 (renamed from scripts/test/blkid/ext3.bz2)bin4132 -> 4132 bytes
-rw-r--r--tests/blkid/ext4.bz2 (renamed from scripts/test/blkid/ext4.bz2)bin2491 -> 2491 bytes
-rw-r--r--tests/blkid/f2fs.bz2 (renamed from scripts/test/blkid/f2fs.bz2)bin634 -> 634 bytes
-rw-r--r--tests/blkid/minix.bz2 (renamed from scripts/test/blkid/minix.bz2)bin157 -> 157 bytes
-rw-r--r--tests/blkid/msdos.bz2 (renamed from scripts/test/blkid/msdos.bz2)bin288 -> 288 bytes
-rw-r--r--tests/blkid/ntfs.bz2 (renamed from scripts/test/blkid/ntfs.bz2)bin35854 -> 35854 bytes
-rw-r--r--tests/blkid/reiser3.bz2 (renamed from scripts/test/blkid/reiser3.bz2)bin329 -> 329 bytes
-rw-r--r--tests/blkid/squashfs.bz2 (renamed from scripts/test/blkid/squashfs.bz2)bin158 -> 158 bytes
-rw-r--r--tests/blkid/vfat.bz2 (renamed from scripts/test/blkid/vfat.bz2)bin291 -> 291 bytes
-rw-r--r--tests/blkid/xfs.bz2 (renamed from scripts/test/blkid/xfs.bz2)bin437 -> 437 bytes
-rw-r--r--tests/bzcat.test (renamed from scripts/test/bzcat.test)0
-rwxr-xr-xtests/cat.test (renamed from scripts/test/cat.test)0
-rwxr-xr-xtests/chgrp.test (renamed from scripts/test/chgrp.test)0
-rw-r--r--tests/chmod.test (renamed from scripts/test/chmod.test)0
-rwxr-xr-xtests/cksum.test (renamed from scripts/test/cksum.test)0
-rwxr-xr-xtests/cmp.test (renamed from scripts/test/cmp.test)0
-rwxr-xr-xtests/cp.test (renamed from scripts/test/cp.test)0
-rwxr-xr-xtests/cpio.test (renamed from scripts/test/cpio.test)0
-rw-r--r--tests/cut.test (renamed from scripts/test/cut.test)0
-rw-r--r--tests/dd.test (renamed from scripts/test/dd.test)0
-rwxr-xr-xtests/dirname.test (renamed from scripts/test/dirname.test)0
-rwxr-xr-xtests/du.test (renamed from scripts/test/du.test)0
-rwxr-xr-xtests/echo.test (renamed from scripts/test/echo.test)0
-rwxr-xr-xtests/expand.test (renamed from scripts/test/expand.test)0
-rw-r--r--tests/expr.test (renamed from scripts/test/expr.test)0
-rwxr-xr-xtests/factor.test (renamed from scripts/test/factor.test)0
-rw-r--r--tests/find.test (renamed from scripts/test/find.test)0
-rwxr-xr-xtests/grep.test (renamed from scripts/test/grep.test)0
-rw-r--r--tests/groupadd.test (renamed from scripts/test/groupadd.test)0
-rw-r--r--tests/groupdel.test (renamed from scripts/test/groupdel.test)0
-rwxr-xr-xtests/head.test (renamed from scripts/test/head.test)0
-rw-r--r--tests/hostname.test (renamed from scripts/test/hostname.test)0
-rwxr-xr-xtests/link.test (renamed from scripts/test/link.test)0
-rw-r--r--tests/ln.test (renamed from scripts/test/ln.test)0
-rwxr-xr-xtests/losetup.test (renamed from scripts/test/losetup.test)0
-rw-r--r--tests/ls.test (renamed from scripts/test/ls.test)0
-rw-r--r--tests/lsattr.test (renamed from scripts/test/lsattr.test)0
-rwxr-xr-xtests/md5sum.test (renamed from scripts/test/md5sum.test)0
-rwxr-xr-xtests/mkdir.test (renamed from scripts/test/mkdir.test)0
-rwxr-xr-xtests/mkfifo.test (renamed from scripts/test/mkfifo.test)0
-rwxr-xr-xtests/modinfo.test (renamed from scripts/test/modinfo.test)0
-rw-r--r--tests/mount.test (renamed from scripts/test/mount.test)0
-rw-r--r--tests/mv.test (renamed from scripts/test/mv.test)0
-rw-r--r--tests/nl.test (renamed from scripts/test/nl.test)0
-rw-r--r--tests/pgrep.test (renamed from scripts/test/pgrep.test)0
-rw-r--r--tests/printf.test (renamed from scripts/test/printf.test)0
-rwxr-xr-xtests/pwd.test (renamed from scripts/test/pwd.test)0
-rwxr-xr-xtests/readlink.test (renamed from scripts/test/readlink.test)0
-rw-r--r--tests/renice.test (renamed from scripts/test/renice.test)0
-rw-r--r--tests/rev.test (renamed from scripts/test/rev.test)0
-rw-r--r--tests/rm.test (renamed from scripts/test/rm.test)0
-rwxr-xr-xtests/rmdir.test (renamed from scripts/test/rmdir.test)0
-rwxr-xr-xtests/seq.test (renamed from scripts/test/seq.test)0
-rwxr-xr-xtests/sha1sum.test (renamed from scripts/test/sha1sum.test)0
-rwxr-xr-xtests/sort.test (renamed from scripts/test/sort.test)0
-rwxr-xr-xtests/split.test (renamed from scripts/test/split.test)0
-rw-r--r--tests/tac.test (renamed from scripts/test/tac.test)0
-rwxr-xr-xtests/tail.test (renamed from scripts/test/tail.test)0
-rw-r--r--tests/tar.test (renamed from scripts/test/tar.test)0
-rwxr-xr-xtests/test.test (renamed from scripts/test/test.test)0
-rwxr-xr-xtests/touch.test (renamed from scripts/test/touch.test)0
-rw-r--r--tests/useradd.test (renamed from scripts/test/useradd.test)0
-rw-r--r--tests/uudecode.test (renamed from scripts/test/uudecode.test)0
-rw-r--r--tests/uuencode.test (renamed from scripts/test/uuencode.test)0
-rwxr-xr-xtests/wc.test (renamed from scripts/test/wc.test)0
-rwxr-xr-xtests/xargs.test (renamed from scripts/test/xargs.test)0
-rw-r--r--tests/xzcat.test (renamed from scripts/test/xzcat.test)0
-rw-r--r--tests/zcat.test (renamed from scripts/test/zcat.test)0
74 files changed, 14 insertions, 12 deletions
diff --git a/scripts/test/testing.sh b/scripts/runtest.sh
index ea2d6c41..08be6fa0 100644
--- a/scripts/test/testing.sh
+++ b/scripts/runtest.sh
@@ -51,7 +51,7 @@ optional()
# The testing function
-testing ()
+testing()
{
NAME="$1"
[ -z "$1" ] && NAME=$2
@@ -101,7 +101,7 @@ testing ()
# the file is assumed to already be there and only its library dependencies
# are copied.
-function mkchroot
+mkchroot()
{
[ $# -lt 2 ] && return
@@ -130,7 +130,7 @@ function mkchroot
# Needed commands listed on command line
# Script fed to stdin.
-function dochroot
+dochroot()
{
mkdir tmpdir4chroot
mount -t ramfs tmpdir4chroot tmpdir4chroot
diff --git a/scripts/test.sh b/scripts/test.sh
index 550c3953..81d9f346 100755
--- a/scripts/test.sh
+++ b/scripts/test.sh
@@ -2,34 +2,36 @@
[ -z "$TOPDIR" ] && TOPDIR="$(pwd)"
-rm -rf testdir
-mkdir -p testdir/testdir
+trap 'kill $(jobs -p) 2>/dev/null; exit 1' INT
+
+rm -rf generated/testdir
+mkdir -p generated/testdir/testdir
if [ -z "$TEST_HOST" ]
then
if [ $# -ne 0 ]
then
- PREFIX=testdir/ scripts/single.sh "$@" || exit 1
+ PREFIX=generated/testdir/ scripts/single.sh "$@" || exit 1
else
- make install_flat PREFIX=testdir || exit 1
+ make install_flat PREFIX=generated/testdir || exit 1
fi
fi
-cd testdir
+cd generated/testdir
PATH="$PWD:$PATH"
cd testdir
-. "$TOPDIR"/scripts/test/testing.sh
+. "$TOPDIR"/scripts/runtest.sh
[ -f "$TOPDIR/generated/config.h" ] && export OPTIONFLAGS=:$(echo $(sed -nr 's/^#define CFG_(.*) 1/\1/p' "$TOPDIR/generated/config.h") | sed 's/ /:/g')
if [ $# -ne 0 ]
then
for i in "$@"
do
- . "$TOPDIR"/scripts/test/$i.test
+ . "$TOPDIR"/tests/$i.test
done
else
- for i in "$TOPDIR"/scripts/test/*.test
+ for i in "$TOPDIR"/tests/*.test
do
CMDNAME="$(echo "$i" | sed 's@.*/\(.*\)\.test@\1@')"
if [ -h ../$CMDNAME ] || [ ! -z "$TEST_HOST" ]
diff --git a/scripts/test/basename.test b/tests/basename.test
index 2f7a2ec3..2f7a2ec3 100755
--- a/scripts/test/basename.test
+++ b/tests/basename.test
diff --git a/scripts/test/blkid.test b/tests/blkid.test
index 0026aeb1..3f676df8 100755
--- a/scripts/test/blkid.test
+++ b/tests/blkid.test
@@ -4,7 +4,7 @@
#testing "name" "command" "result" "infile" "stdin"
-BDIR="$TOPDIR/scripts/test/blkid"
+BDIR="$TOPDIR/tests/blkid"
bzcat "$BDIR"/squashfs.bz2 > temp.img
testing "blkid file" "blkid temp.img" 'temp.img: TYPE="squashfs"\n' "" ""
diff --git a/scripts/test/blkid/cramfs.bz2 b/tests/blkid/cramfs.bz2
index 37438fe8..37438fe8 100644
--- a/scripts/test/blkid/cramfs.bz2
+++ b/tests/blkid/cramfs.bz2
Binary files differ
diff --git a/scripts/test/blkid/ext2.bz2 b/tests/blkid/ext2.bz2
index e27c4d76..e27c4d76 100644
--- a/scripts/test/blkid/ext2.bz2
+++ b/tests/blkid/ext2.bz2
Binary files differ
diff --git a/scripts/test/blkid/ext3.bz2 b/tests/blkid/ext3.bz2
index be7f11f2..be7f11f2 100644
--- a/scripts/test/blkid/ext3.bz2
+++ b/tests/blkid/ext3.bz2
Binary files differ
diff --git a/scripts/test/blkid/ext4.bz2 b/tests/blkid/ext4.bz2
index a8314f91..a8314f91 100644
--- a/scripts/test/blkid/ext4.bz2
+++ b/tests/blkid/ext4.bz2
Binary files differ
diff --git a/scripts/test/blkid/f2fs.bz2 b/tests/blkid/f2fs.bz2
index 4111e876..4111e876 100644
--- a/scripts/test/blkid/f2fs.bz2
+++ b/tests/blkid/f2fs.bz2
Binary files differ
diff --git a/scripts/test/blkid/minix.bz2 b/tests/blkid/minix.bz2
index b2f022e0..b2f022e0 100644
--- a/scripts/test/blkid/minix.bz2
+++ b/tests/blkid/minix.bz2
Binary files differ
diff --git a/scripts/test/blkid/msdos.bz2 b/tests/blkid/msdos.bz2
index 26c9b665..26c9b665 100644
--- a/scripts/test/blkid/msdos.bz2
+++ b/tests/blkid/msdos.bz2
Binary files differ
diff --git a/scripts/test/blkid/ntfs.bz2 b/tests/blkid/ntfs.bz2
index b654ecd6..b654ecd6 100644
--- a/scripts/test/blkid/ntfs.bz2
+++ b/tests/blkid/ntfs.bz2
Binary files differ
diff --git a/scripts/test/blkid/reiser3.bz2 b/tests/blkid/reiser3.bz2
index b2adfc85..b2adfc85 100644
--- a/scripts/test/blkid/reiser3.bz2
+++ b/tests/blkid/reiser3.bz2
Binary files differ
diff --git a/scripts/test/blkid/squashfs.bz2 b/tests/blkid/squashfs.bz2
index 2f1b7937..2f1b7937 100644
--- a/scripts/test/blkid/squashfs.bz2
+++ b/tests/blkid/squashfs.bz2
Binary files differ
diff --git a/scripts/test/blkid/vfat.bz2 b/tests/blkid/vfat.bz2
index 1df8b89a..1df8b89a 100644
--- a/scripts/test/blkid/vfat.bz2
+++ b/tests/blkid/vfat.bz2
Binary files differ
diff --git a/scripts/test/blkid/xfs.bz2 b/tests/blkid/xfs.bz2
index a7571960..a7571960 100644
--- a/scripts/test/blkid/xfs.bz2
+++ b/tests/blkid/xfs.bz2
Binary files differ
diff --git a/scripts/test/bzcat.test b/tests/bzcat.test
index 8bc5f5c9..8bc5f5c9 100644
--- a/scripts/test/bzcat.test
+++ b/tests/bzcat.test
diff --git a/scripts/test/cat.test b/tests/cat.test
index 3d5842ae..3d5842ae 100755
--- a/scripts/test/cat.test
+++ b/tests/cat.test
diff --git a/scripts/test/chgrp.test b/tests/chgrp.test
index 2af93857..2af93857 100755
--- a/scripts/test/chgrp.test
+++ b/tests/chgrp.test
diff --git a/scripts/test/chmod.test b/tests/chmod.test
index 77106a69..77106a69 100644
--- a/scripts/test/chmod.test
+++ b/tests/chmod.test
diff --git a/scripts/test/cksum.test b/tests/cksum.test
index 152dc12c..152dc12c 100755
--- a/scripts/test/cksum.test
+++ b/tests/cksum.test
diff --git a/scripts/test/cmp.test b/tests/cmp.test
index ef53b37d..ef53b37d 100755
--- a/scripts/test/cmp.test
+++ b/tests/cmp.test
diff --git a/scripts/test/cp.test b/tests/cp.test
index 43272565..43272565 100755
--- a/scripts/test/cp.test
+++ b/tests/cp.test
diff --git a/scripts/test/cpio.test b/tests/cpio.test
index d0528e52..d0528e52 100755
--- a/scripts/test/cpio.test
+++ b/tests/cpio.test
diff --git a/scripts/test/cut.test b/tests/cut.test
index a0019527..a0019527 100644
--- a/scripts/test/cut.test
+++ b/tests/cut.test
diff --git a/scripts/test/dd.test b/tests/dd.test
index 9bdcac5b..9bdcac5b 100644
--- a/scripts/test/dd.test
+++ b/tests/dd.test
diff --git a/scripts/test/dirname.test b/tests/dirname.test
index a0075384..a0075384 100755
--- a/scripts/test/dirname.test
+++ b/tests/dirname.test
diff --git a/scripts/test/du.test b/tests/du.test
index ee4867b8..ee4867b8 100755
--- a/scripts/test/du.test
+++ b/tests/du.test
diff --git a/scripts/test/echo.test b/tests/echo.test
index 3f562fd8..3f562fd8 100755
--- a/scripts/test/echo.test
+++ b/tests/echo.test
diff --git a/scripts/test/expand.test b/tests/expand.test
index 510f89f5..510f89f5 100755
--- a/scripts/test/expand.test
+++ b/tests/expand.test
diff --git a/scripts/test/expr.test b/tests/expr.test
index cce7d9d0..cce7d9d0 100644
--- a/scripts/test/expr.test
+++ b/tests/expr.test
diff --git a/scripts/test/factor.test b/tests/factor.test
index a3e4cbf8..a3e4cbf8 100755
--- a/scripts/test/factor.test
+++ b/tests/factor.test
diff --git a/scripts/test/find.test b/tests/find.test
index cbbce5fd..cbbce5fd 100644
--- a/scripts/test/find.test
+++ b/tests/find.test
diff --git a/scripts/test/grep.test b/tests/grep.test
index 13b1af78..13b1af78 100755
--- a/scripts/test/grep.test
+++ b/tests/grep.test
diff --git a/scripts/test/groupadd.test b/tests/groupadd.test
index 0395e01a..0395e01a 100644
--- a/scripts/test/groupadd.test
+++ b/tests/groupadd.test
diff --git a/scripts/test/groupdel.test b/tests/groupdel.test
index d46db53c..d46db53c 100644
--- a/scripts/test/groupdel.test
+++ b/tests/groupdel.test
diff --git a/scripts/test/head.test b/tests/head.test
index eeb07e00..eeb07e00 100755
--- a/scripts/test/head.test
+++ b/tests/head.test
diff --git a/scripts/test/hostname.test b/tests/hostname.test
index 11948458..11948458 100644
--- a/scripts/test/hostname.test
+++ b/tests/hostname.test
diff --git a/scripts/test/link.test b/tests/link.test
index 769a7b67..769a7b67 100755
--- a/scripts/test/link.test
+++ b/tests/link.test
diff --git a/scripts/test/ln.test b/tests/ln.test
index aea3ab04..aea3ab04 100644
--- a/scripts/test/ln.test
+++ b/tests/ln.test
diff --git a/scripts/test/losetup.test b/tests/losetup.test
index fe1e5206..fe1e5206 100755
--- a/scripts/test/losetup.test
+++ b/tests/losetup.test
diff --git a/scripts/test/ls.test b/tests/ls.test
index d052f13a..d052f13a 100644
--- a/scripts/test/ls.test
+++ b/tests/ls.test
diff --git a/scripts/test/lsattr.test b/tests/lsattr.test
index 870b3f66..870b3f66 100644
--- a/scripts/test/lsattr.test
+++ b/tests/lsattr.test
diff --git a/scripts/test/md5sum.test b/tests/md5sum.test
index 741ec62f..741ec62f 100755
--- a/scripts/test/md5sum.test
+++ b/tests/md5sum.test
diff --git a/scripts/test/mkdir.test b/tests/mkdir.test
index 8b2f99f5..8b2f99f5 100755
--- a/scripts/test/mkdir.test
+++ b/tests/mkdir.test
diff --git a/scripts/test/mkfifo.test b/tests/mkfifo.test
index b0253fed..b0253fed 100755
--- a/scripts/test/mkfifo.test
+++ b/tests/mkfifo.test
diff --git a/scripts/test/modinfo.test b/tests/modinfo.test
index ac94ce0f..ac94ce0f 100755
--- a/scripts/test/modinfo.test
+++ b/tests/modinfo.test
diff --git a/scripts/test/mount.test b/tests/mount.test
index 1fdc00f7..1fdc00f7 100644
--- a/scripts/test/mount.test
+++ b/tests/mount.test
diff --git a/scripts/test/mv.test b/tests/mv.test
index 53fc9992..53fc9992 100644
--- a/scripts/test/mv.test
+++ b/tests/mv.test
diff --git a/scripts/test/nl.test b/tests/nl.test
index 958cb41e..958cb41e 100644
--- a/scripts/test/nl.test
+++ b/tests/nl.test
diff --git a/scripts/test/pgrep.test b/tests/pgrep.test
index 36df573a..36df573a 100644
--- a/scripts/test/pgrep.test
+++ b/tests/pgrep.test
diff --git a/scripts/test/printf.test b/tests/printf.test
index 96789bd0..96789bd0 100644
--- a/scripts/test/printf.test
+++ b/tests/printf.test
diff --git a/scripts/test/pwd.test b/tests/pwd.test
index b02055b1..b02055b1 100755
--- a/scripts/test/pwd.test
+++ b/tests/pwd.test
diff --git a/scripts/test/readlink.test b/tests/readlink.test
index 6c7b147f..6c7b147f 100755
--- a/scripts/test/readlink.test
+++ b/tests/readlink.test
diff --git a/scripts/test/renice.test b/tests/renice.test
index e87111cc..e87111cc 100644
--- a/scripts/test/renice.test
+++ b/tests/renice.test
diff --git a/scripts/test/rev.test b/tests/rev.test
index c7622b9d..c7622b9d 100644
--- a/scripts/test/rev.test
+++ b/tests/rev.test
diff --git a/scripts/test/rm.test b/tests/rm.test
index 0dca8538..0dca8538 100644
--- a/scripts/test/rm.test
+++ b/tests/rm.test
diff --git a/scripts/test/rmdir.test b/tests/rmdir.test
index a7b027e0..a7b027e0 100755
--- a/scripts/test/rmdir.test
+++ b/tests/rmdir.test
diff --git a/scripts/test/seq.test b/tests/seq.test
index 3f3b4099..3f3b4099 100755
--- a/scripts/test/seq.test
+++ b/tests/seq.test
diff --git a/scripts/test/sha1sum.test b/tests/sha1sum.test
index cd621fd1..cd621fd1 100755
--- a/scripts/test/sha1sum.test
+++ b/tests/sha1sum.test
diff --git a/scripts/test/sort.test b/tests/sort.test
index 7bd413f7..7bd413f7 100755
--- a/scripts/test/sort.test
+++ b/tests/sort.test
diff --git a/scripts/test/split.test b/tests/split.test
index d86b0250..d86b0250 100755
--- a/scripts/test/split.test
+++ b/tests/split.test
diff --git a/scripts/test/tac.test b/tests/tac.test
index 96f25310..96f25310 100644
--- a/scripts/test/tac.test
+++ b/tests/tac.test
diff --git a/scripts/test/tail.test b/tests/tail.test
index f4b86673..f4b86673 100755
--- a/scripts/test/tail.test
+++ b/tests/tail.test
diff --git a/scripts/test/tar.test b/tests/tar.test
index 187186a8..187186a8 100644
--- a/scripts/test/tar.test
+++ b/tests/tar.test
diff --git a/scripts/test/test.test b/tests/test.test
index f5011573..f5011573 100755
--- a/scripts/test/test.test
+++ b/tests/test.test
diff --git a/scripts/test/touch.test b/tests/touch.test
index 03ab8ce1..03ab8ce1 100755
--- a/scripts/test/touch.test
+++ b/tests/touch.test
diff --git a/scripts/test/useradd.test b/tests/useradd.test
index a87da070..a87da070 100644
--- a/scripts/test/useradd.test
+++ b/tests/useradd.test
diff --git a/scripts/test/uudecode.test b/tests/uudecode.test
index b9d7d012..b9d7d012 100644
--- a/scripts/test/uudecode.test
+++ b/tests/uudecode.test
diff --git a/scripts/test/uuencode.test b/tests/uuencode.test
index 7c19faa3..7c19faa3 100644
--- a/scripts/test/uuencode.test
+++ b/tests/uuencode.test
diff --git a/scripts/test/wc.test b/tests/wc.test
index 40891323..40891323 100755
--- a/scripts/test/wc.test
+++ b/tests/wc.test
diff --git a/scripts/test/xargs.test b/tests/xargs.test
index e49445d6..e49445d6 100755
--- a/scripts/test/xargs.test
+++ b/tests/xargs.test
diff --git a/scripts/test/xzcat.test b/tests/xzcat.test
index e82ca881..e82ca881 100644
--- a/scripts/test/xzcat.test
+++ b/tests/xzcat.test
diff --git a/scripts/test/zcat.test b/tests/zcat.test
index c1297c91..c1297c91 100644
--- a/scripts/test/zcat.test
+++ b/tests/zcat.test