diff options
author | Sami Kerola | 2014-02-16 16:22:56 +0100 |
---|---|---|
committer | Karel Zak | 2014-03-07 11:52:57 +0100 |
commit | 2f791546395cb43f3f93de6c095c812c7cd5237f (patch) | |
tree | 0fe025270e9c5acbb15ef7d433c553a72fdfdf1e /tests/functions.sh | |
parent | tools: make config-gen to require build target argument (diff) | |
download | kernel-qcow2-util-linux-2f791546395cb43f3f93de6c095c812c7cd5237f.tar.gz kernel-qcow2-util-linux-2f791546395cb43f3f93de6c095c812c7cd5237f.tar.xz kernel-qcow2-util-linux-2f791546395cb43f3f93de6c095c812c7cd5237f.zip |
tests: check commands needed for running a test exist
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'tests/functions.sh')
-rw-r--r-- | tests/functions.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/functions.sh b/tests/functions.sh index 5e2292d9b..191a310ac 100644 --- a/tests/functions.sh +++ b/tests/functions.sh @@ -37,7 +37,12 @@ function ts_report { else echo "$1" fi +} +function ts_check_test_command { + if [ ! -x "$1" ]; then + ts_skip "${1##*/} not found" + fi } function ts_skip_subtest { @@ -371,7 +376,7 @@ function ts_die { ts_log "$1" if [ -n "$2" ] && [ -b "$2" ]; then ts_device_deinit "$2" - ts_fstab_clean # for sure... + ts_fstab_clean # for sure... fi ts_finalize } @@ -384,7 +389,7 @@ function ts_image_md5sum { function ts_image_init { local mib=${1:-"5"} # size in MiBs local img=${2:-"$TS_OUTDIR/${TS_TESTNAME}.img"} - + dd if=/dev/zero of="$img" bs=1M count=$mib &> /dev/null echo "$img" return 0 |