From aed9f664104c35ed039150b407b073e7c763d1a4 Mon Sep 17 00:00:00 2001 From: Andy Grover Date: Fri, 13 Nov 2020 12:12:11 -0800 Subject: [PATCH] scoutfs-tests: xfstests: honor SKIP_CHECKOUT Signed-off-by: Andy Grover --- tests/tests/xfstests.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tests/tests/xfstests.sh b/tests/tests/xfstests.sh index 07ed36da..8e1a20ef 100644 --- a/tests/tests/xfstests.sh +++ b/tests/tests/xfstests.sh @@ -18,16 +18,21 @@ # # make sure we have our config -if [ -z "$T_XFSTESTS_REPO" -o -z "$T_XFSTESTS_BRANCH" ]; then - t_fail "xfstests requires -X repo and -x branch" +if [ -z "$T_XFSTESTS_REPO" ]; then + t_fail "xfstests requires -X repo" +fi +if [ -z "$T_XFSTESTS_BRANCH" -a -z "T_SKIP_CHECKOUT" ]; then + t_fail "xfstests requires -x branch" fi t_quiet mkdir -p "$T_TMPDIR/mnt.scratch" t_quiet cd "$T_XFSTESTS_REPO" -t_quiet git fetch -# this remote use is bad, do better -t_quiet git checkout -B "$T_XFSTESTS_BRANCH" --track "origin/$T_XFSTESTS_BRANCH" +if [ -z "T_SKIP_CHECKOUT" ]; then + t_quiet git fetch + # this remote use is bad, do better + t_quiet git checkout -B "$T_XFSTESTS_BRANCH" --track "origin/$T_XFSTESTS_BRANCH" +fi t_quiet make t_quiet sync # pwd stays in xfstests dir to build config and run