summaryrefslogtreecommitdiffstats
path: root/tests/commands.sh
diff options
context:
space:
mode:
authorKarel Zak2012-08-03 21:24:51 +0200
committerKarel Zak2012-08-03 21:24:51 +0200
commit1b03e2cd33a059fdd355c52899e151130777c44f (patch)
treeb6eac3caf34c4bfb0127e67819b32190a11f0cea /tests/commands.sh
parentbuild-sys: add tests/run-nonroot.sh to automake file (diff)
downloadkernel-qcow2-util-linux-1b03e2cd33a059fdd355c52899e151130777c44f.tar.gz
kernel-qcow2-util-linux-1b03e2cd33a059fdd355c52899e151130777c44f.tar.xz
kernel-qcow2-util-linux-1b03e2cd33a059fdd355c52899e151130777c44f.zip
tests: make compatible with autotools
The command 'make check' is called from 'make distcheck' (which is used to generate official util-linux tarballs). It means that tests/ stuff has to be compatible with autotools and differentiate between source and build directories. * remove run-nonroot.sh (merged into run.sh * remove commands.sh.in * all tests and top level run.sh accept --builddir and --srcdir command line options * functions.sh modified to use $top_builddir/tests for output files Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'tests/commands.sh')
-rw-r--r--tests/commands.sh64
1 files changed, 64 insertions, 0 deletions
diff --git a/tests/commands.sh b/tests/commands.sh
new file mode 100644
index 000000000..8a1577ec9
--- /dev/null
+++ b/tests/commands.sh
@@ -0,0 +1,64 @@
+# Misc settings
+TS_TESTUSER=${TS_TESTUSER:-"test"}
+
+# helpers
+TS_HELPER_SYSINFO="$top_builddir/test_sysinfo"
+TS_HELPER_PATHS="$top_builddir/test_pathnames"
+TS_HELPER_BYTESWAP="$top_builddir/test_byteswap"
+TS_HELPER_MD5="$top_builddir/test_md5"
+
+TS_HELPER_ISMOUNTED="$top_builddir/test_ismounted"
+TS_HELPER_STRUTILS="$top_builddir/test_strutils"
+TS_HELPER_CPUSET="$top_builddir/test_cpuset"
+
+# libmount
+TS_HELPER_LIBMOUNT_OPTSTR="$top_builddir/test_mount_optstr"
+TS_HELPER_LIBMOUNT_TAB="$top_builddir/test_mount_tab"
+TS_HELPER_LIBMOUNT_UTILS="$top_builddir/test_mount_utils"
+TS_HELPER_LIBMOUNT_LOCK="$top_builddir/test_mount_lock"
+TS_HELPER_LIBMOUNT_UPDATE="$top_builddir/test_mount_tab_update"
+TS_HELPER_LIBMOUNT_CONTEXT="$top_builddir/test_mount_context"
+TS_HELPER_LIBMOUNT_TABDIFF="$top_builddir/test_mount_tab_diff"
+
+TS_HELPER_ISLOCAL="$top_builddir/test_islocal"
+TS_HELPER_LOGINDEFS="$top_builddir/test_logindefs"
+
+# TODO: use partx
+TS_HELPER_PARTITIONS="$top_builddir/sample-partitions"
+
+# paths to commands
+TS_CMD_MOUNT=${TS_CMD_MOUNT:-"$top_builddir/mount"}
+TS_CMD_UMOUNT=${TS_CMD_UMOUNT:-"$top_builddir/umount"}
+
+TS_CMD_SWAPON=${TS_CMD_SWAPON:-"$top_builddir/swapon"}
+TS_CMD_SWAPOFF=${TS_CMD_SWAPOFF:-"$top_builddir/swapoff"}
+TS_CMD_LOSETUP=${TS_CMD_LOSETUP:-"$top_builddir/losetup"}
+
+TS_CMD_MKSWAP=${TS_CMD_MKSWAP:-"$top_builddir/mkswap"}
+TS_CMD_MKCRAMFS=${TS_CMD_MKCRAMFS:-"$top_builddir/mkfs.cramfs"}
+TS_CMD_MKMINIX=${TS_CMD_MKMINIX:-"$top_builddir/mkfs.minix"}
+TS_CMD_FSCKCRAMFS=${TS_CMD_FSCKCRAMFS:-"$top_builddir/fsck.cramfs"}
+TS_CMD_FSCKMINIX=${TS_CMD_FSCKMINIX:-"$top_builddir/fsck.minix"}
+
+TS_CMD_IPCS=${TS_CMD_IPCS:-"$top_builddir/ipcs"}
+
+TS_CMD_COL=${TS_CMD_COL:-"$top_builddir/col"}
+TS_CMD_COLUMN=${TS_CMD_COLUMN:-"$top_builddir/column"}
+TS_CMD_COLRM=${TS_CMD_COLRM:-"$top_builddir/colrm"}
+
+TS_CMD_NAMEI=${TS_CMD_NAMEI-"$top_builddir/namei"}
+TS_CMD_LOOK=${TS_CMD_LOOK-"$top_builddir/look"}
+TS_CMD_CAL=${TS_CMD_CAL-"$top_builddir/cal"}
+TS_CMD_SCRIPT=${TS_CMD_SCRIPT-"$top_builddir/script"}
+TS_CMD_EJECT=${TS_CMD_EJECT-"$top_builddir/eject"}
+
+
+TS_CMD_HWCLOCK=${TS_CMD_HWCLOCK-"$top_builddir/hwclock"}
+TS_CMD_LSCPU=${TS_CMD_LSCPU-"$top_builddir/lscpu"}
+
+TS_CMD_BLKID=${TS_CMD_BLKID-"$top_builddir/blkid"}
+TS_CMD_PARTX=${TS_CMD_PARTX-"$top_builddir/partx"}
+TS_CMD_FINDMNT=${TS_CMD_FINDMNT-"$top_builddir/findmnt"}
+
+TS_CMD_FDISK=${TS_CMD_FDISK-"$top_builddir/fdisk"}
+