summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHarald Hoyer <harald@redhat.com>2012-05-25 14:53:29 +0200
committerHarald Hoyer <harald@redhat.com>2012-05-29 09:23:31 +0200
commit33a5e20ffaa2cbb2853f14265566bac66a7f9026 (patch)
tree38073075ccd83803506a52e384733255db25ec06 /test
parent78cd73fcf63ea9fd6539e0abe051e64705dfb532 (diff)
test/test-functions: be more verbose about skipping tests
Diffstat (limited to 'test')
-rw-r--r--test/test-functions17
1 files changed, 15 insertions, 2 deletions
diff --git a/test/test-functions b/test/test-functions
index d0c5f6ca9e..84ce1e9475 100644
--- a/test/test-functions
+++ b/test/test-functions
@@ -575,8 +575,21 @@ inst_libdir_file() {
}
do_test() {
- [[ $UID != "0" ]] && exit 0
- command -v qemu-kvm &>/dev/null || exit 0
+ if [[ $UID != "0" ]]; then
+ echo "TEST: $TEST_DESCRIPTION [SKIPPED]: not root" >&2
+ exit 0
+ fi
+
+ if ! command -v qemu-kvm &>/dev/null; then
+ echo "TEST: $TEST_DESCRIPTION [SKIPPED]: no qemu-kvm found" >&2
+ exit 0
+ fi
+
+ if ! [[ -c /dev/kvm ]]; then
+ echo "TEST: $TEST_DESCRIPTION [SKIPPED]: /dev/kvm not found" >&2
+ exit 0
+ fi
+
# Detect lib paths
[[ $libdir ]] || for libdir in /lib64 /lib; do
[[ -d $libdir ]] && libdirs+=" $libdir" && break