From 4c225c2061b8ce39da844b972870f2d7a3b2b004 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Wed, 8 Jan 2020 11:01:00 -0800 Subject: [PATCH] scoutfs-tests: add -y for xfstests args Add a -y argument so we can specify additional args to ./xfstests, and clean up our xfstest a bit while we're in there. Signed-off-by: Zach Brown --- tests/run-tests.sh | 6 ++++++ tests/tests/xfstests.sh | 7 +++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/tests/run-tests.sh b/tests/run-tests.sh index 1287ff66..c5a51e0f 100755 --- a/tests/run-tests.sh +++ b/tests/run-tests.sh @@ -64,6 +64,7 @@ $(basename $0) options: -u | Branch to checkout in scoutfs-utils-dev repo. -X | xfstests git repo. Used by tests/xfstests.sh. -x | xfstests git branch to checkout and track. + -y | xfstests ./check additional args EOF } @@ -166,6 +167,11 @@ while true; do T_XFSTESTS_BRANCH="$2" shift ;; + -y) + test -n "$2" || die "-x requires xfstests ./check args argument" + T_XFSTESTS_ARGS="$2" + shift + ;; -h|-\?|--help) show_help exit 1 diff --git a/tests/tests/xfstests.sh b/tests/tests/xfstests.sh index d4a9411d..e649228b 100644 --- a/tests/tests/xfstests.sh +++ b/tests/tests/xfstests.sh @@ -18,7 +18,7 @@ # # make sure we have our config -if [ -z "$T_XFSTESTS_REPO" -o -z "$T_XFSTESTS_REPO" ]; then +if [ -z "$T_XFSTESTS_REPO" -o -z "$T_XFSTESTS_BRANCH" ]; then t_fail "xfstests requires -X repo and -x branch" fi @@ -79,9 +79,8 @@ EOF t_restore_output echo "(showing output of xfstests)" -./check -g quick -E local.exclude -#./check tests/generic/001 -#./check tests/generic/006 +args="-E local.exclude ${T_XFSTESTS_ARGS:--g quick}" +./check $args # the fs is unmounted when check finishes #