This is an automated email from the git hooks/post-receive script.
andyp pushed a commit to branch master
in repository gfs2-utils.
The following commit(s) were added to refs/heads/master by this push:
new 6c6c62b testsuite: Skip tests if unshipped helpers are not found
6c6c62b is described below
commit 6c6c62b8ecbcffa2304ab78d1ea94e6b4474f7e6
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Wed Apr 24 15:43:56 2019 +0100
testsuite: Skip tests if unshipped helpers are not found
This allows as much of the built testsuite script as possible to be run
standalone against the installed tools.
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
tests/fsck.at | 4 ++--
tests/libgfs2.at | 4 ++--
tests/mkfs.at | 24 ++++++++++++------------
tests/testsuite.at | 6 ++++--
4 files changed, 20 insertions(+), 18 deletions(-)
diff --git a/tests/fsck.at b/tests/fsck.at
index 97a00a9..fab28a5 100644
--- a/tests/fsck.at
+++ b/tests/fsck.at
@@ -59,11 +59,11 @@ AT_SETUP([gfs2 format versions])
AT_KEYWORDS(fsck.gfs2 fsck)
GFS_TGT_REGEN
AT_CHECK([mkfs.gfs2 -O -p lock_nolock ${GFS_TGT}], 0, [ignore], [ignore])
-AT_CHECK([echo "set sb { sb_fs_format: 1802 }" | gfs2l ${GFS_TGT}], 0, [ignore], [ignore])
+AT_CHECK(GFS_RUN_OR_SKIP([echo "set sb { sb_fs_format: 1802 }" | gfs2l ${GFS_TGT}]), 0, [ignore], [ignore])
# Unsupported format, FSCK_USAGE == 16
AT_CHECK([fsck.gfs2 -y $GFS_TGT], 16, [ignore], [ignore])
# Format out of range
-AT_CHECK([echo "set sb { sb_fs_format: 4242 }" | gfs2l ${GFS_TGT}], 0, [ignore], [ignore])
+AT_CHECK(GFS_RUN_OR_SKIP([echo "set sb { sb_fs_format: 4242 }" | gfs2l ${GFS_TGT}]), 0, [ignore], [ignore])
AT_CHECK([fsck.gfs2 -y $GFS_TGT], 1, [ignore], [ignore])
AT_CHECK([fsck.gfs2 -n $GFS_TGT], 0, [ignore], [ignore])
AT_CLEANUP
diff --git a/tests/libgfs2.at b/tests/libgfs2.at
index 1d2243c..3a5174a 100644
--- a/tests/libgfs2.at
+++ b/tests/libgfs2.at
@@ -1,9 +1,9 @@
AT_BANNER([libgfs2 unit tests])
GFS_UNIT_TEST([meta.c],[libgfs2])
-AT_CHECK([check_meta], 0, [ignore], [ignore])
+AT_CHECK(GFS_RUN_OR_SKIP([check_meta]), 0, [ignore], [ignore])
AT_CLEANUP
GFS_UNIT_TEST([rgrp.c],[libgfs2])
-AT_CHECK([check_rgrp], 0, [ignore], [ignore])
+AT_CHECK(GFS_RUN_OR_SKIP([check_rgrp]), 0, [ignore], [ignore])
AT_CLEANUP
diff --git a/tests/mkfs.at b/tests/mkfs.at
index ee444f5..2739561 100644
--- a/tests/mkfs.at
+++ b/tests/mkfs.at
@@ -127,33 +127,33 @@ AT_CLEANUP
AT_SETUP([Values of rg_skip])
AT_KEYWORDS(mkfs.gfs2 mkfs)
AT_CHECK([$GFS_MKFS -p lock_nolock -r 2048 $GFS_TGT], 0, [ignore], [ignore])
-AT_CHECK([rgskipcheck.sh $GFS_TGT], 0, [ignore], [ignore])
+AT_CHECK(GFS_RUN_OR_SKIP([rgskipcheck.sh $GFS_TGT]), 0, [ignore], [ignore])
AT_CHECK([$GFS_MKFS -p lock_nolock -r 1024 $GFS_TGT], 0, [ignore], [ignore])
-AT_CHECK([rgskipcheck.sh $GFS_TGT], 0, [ignore], [ignore])
+AT_CHECK(GFS_RUN_OR_SKIP([rgskipcheck.sh $GFS_TGT]), 0, [ignore], [ignore])
AT_CHECK([$GFS_MKFS -p lock_nolock -r 512 $GFS_TGT], 0, [ignore], [ignore])
-AT_CHECK([rgskipcheck.sh $GFS_TGT], 0, [ignore], [ignore])
+AT_CHECK(GFS_RUN_OR_SKIP([rgskipcheck.sh $GFS_TGT]), 0, [ignore], [ignore])
AT_CHECK([$GFS_MKFS -p lock_nolock -r 219 $GFS_TGT], 0, [ignore], [ignore])
-AT_CHECK([rgskipcheck.sh $GFS_TGT], 0, [ignore], [ignore])
+AT_CHECK(GFS_RUN_OR_SKIP([rgskipcheck.sh $GFS_TGT]), 0, [ignore], [ignore])
AT_CHECK([$GFS_MKFS -p lock_nolock -r 32 $GFS_TGT], 0, [ignore], [ignore])
-AT_CHECK([rgskipcheck.sh $GFS_TGT], 0, [ignore], [ignore])
+AT_CHECK(GFS_RUN_OR_SKIP([rgskipcheck.sh $GFS_TGT]), 0, [ignore], [ignore])
AT_CHECK([$GFS_MKFS -p lock_nolock -o test_topology=0:512:65536:393216:512 $GFS_TGT], 0, [ignore], [ignore])
-AT_CHECK([rgskipcheck.sh $GFS_TGT], 0, [ignore], [ignore])
+AT_CHECK(GFS_RUN_OR_SKIP([rgskipcheck.sh $GFS_TGT]), 0, [ignore], [ignore])
AT_CLEANUP
AT_SETUP([Values of rg_data0, rg_data, rg_bitbytes])
AT_KEYWORDS(mkfs.gfs2 mkfs)
AT_CHECK([$GFS_MKFS -p lock_nolock -r 2048 $GFS_TGT], 0, [ignore], [ignore])
-AT_CHECK([rgrifieldscheck.sh $GFS_TGT], 0, [ignore], [ignore])
+AT_CHECK(GFS_RUN_OR_SKIP([rgrifieldscheck.sh $GFS_TGT]), 0, [ignore], [ignore])
AT_CHECK([$GFS_MKFS -p lock_nolock -r 1024 $GFS_TGT], 0, [ignore], [ignore])
-AT_CHECK([rgrifieldscheck.sh $GFS_TGT], 0, [ignore], [ignore])
+AT_CHECK(GFS_RUN_OR_SKIP([rgrifieldscheck.sh $GFS_TGT]), 0, [ignore], [ignore])
AT_CHECK([$GFS_MKFS -p lock_nolock -r 512 $GFS_TGT], 0, [ignore], [ignore])
-AT_CHECK([rgrifieldscheck.sh $GFS_TGT], 0, [ignore], [ignore])
+AT_CHECK(GFS_RUN_OR_SKIP([rgrifieldscheck.sh $GFS_TGT]), 0, [ignore], [ignore])
AT_CHECK([$GFS_MKFS -p lock_nolock -r 219 $GFS_TGT], 0, [ignore], [ignore])
-AT_CHECK([rgrifieldscheck.sh $GFS_TGT], 0, [ignore], [ignore])
+AT_CHECK(GFS_RUN_OR_SKIP([rgrifieldscheck.sh $GFS_TGT]), 0, [ignore], [ignore])
AT_CHECK([$GFS_MKFS -p lock_nolock -r 32 $GFS_TGT], 0, [ignore], [ignore])
-AT_CHECK([rgrifieldscheck.sh $GFS_TGT], 0, [ignore], [ignore])
+AT_CHECK(GFS_RUN_OR_SKIP([rgrifieldscheck.sh $GFS_TGT]), 0, [ignore], [ignore])
AT_CHECK([$GFS_MKFS -p lock_nolock -o test_topology=0:512:65536:393216:512 $GFS_TGT], 0, [ignore], [ignore])
-AT_CHECK([rgrifieldscheck.sh $GFS_TGT], 0, [ignore], [ignore])
+AT_CHECK(GFS_RUN_OR_SKIP([rgrifieldscheck.sh $GFS_TGT]), 0, [ignore], [ignore])
AT_CLEANUP
AT_SETUP([Small filesystems])
diff --git a/tests/testsuite.at b/tests/testsuite.at
index 522ac1c..80bfdda 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -1,3 +1,5 @@
+m4_define([GFS_RUN_OR_SKIP], [$1; x=$?; if test $x -eq 127; then exit 77; else exit $x; fi])
+
# Regenerate the sparse file used for testing and skip the test if it fails
# Usage: GFS_TGT_REGEN
m4_define([GFS_TGT_REGEN],
@@ -22,7 +24,7 @@ AT_CHECK([fsck.gfs2 -n $GFS_TGT], 0, [ignore], [ignore])])
m4_define([GFS_LANG_CHECK],
[GFS_TGT_REGEN
AT_CHECK($1, 0, [ignore], [ignore])
-AT_CHECK([echo "$2" | gfs2l ${GFS_TGT}], 0, [ignore], [ignore])
+AT_CHECK(GFS_RUN_OR_SKIP([echo "$2" | gfs2l ${GFS_TGT}]), 0, [ignore], [ignore])
AT_CHECK([fsck.gfs2 -y $GFS_TGT], 1, [ignore], [ignore])
AT_CHECK([fsck.gfs2 -n $GFS_TGT], 0, [ignore], [ignore])])
@@ -31,7 +33,7 @@ AT_CHECK([fsck.gfs2 -n $GFS_TGT], 0, [ignore], [ignore])])
m4_define([GFS_NUKERG_CHECK],
[GFS_TGT_REGEN
AT_CHECK($1, 0, [ignore], [ignore])
-AT_CHECK([nukerg $2 $GFS_TGT], 0, [ignore], [ignore])
+AT_CHECK(GFS_RUN_OR_SKIP([nukerg $2 $GFS_TGT]), 0, [ignore], [ignore])
AT_CHECK([fsck.gfs2 -y $GFS_TGT], 1, [ignore], [ignore])
AT_CHECK([fsck.gfs2 -n $GFS_TGT], 0, [ignore], [ignore])])
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.