btrfs-progs: tests: arg override in command line
[platform/upstream/btrfs-progs.git] / tests / common.local
index 9f567c2..d2b8d07 100644 (file)
@@ -3,21 +3,20 @@
 # additional arguments to various commands
 
 # already defined, eg. via make argument
-if [ -n "$TEST_ENABLE_OVERRIDE" ]; then
-       return
-fi
+if [ -z "$TEST_ENABLE_OVERRIDE" ]; then
+    # set to 'true'
+    TEST_ENABLE_OVERRIDE=false
 
-# set to 'true'
-TEST_ENABLE_OVERRIDE=false
+    TEST_ARGS_CHECK=--mode=lowmem
+fi
 
-TEST_ARGS_CHECK=--mode=lowmem
 
 # gets arguments of a current command and can decide if the argument insertion
 # should happen, eg. if some option combination does not make sense or would
 # break tests
 _skip_spec()
 {
-       if echo "$TEST_CHECK" | grep -q 'mode=lowmem' &&
+       if echo "$TEST_ARGS_CHECK" | grep -q 'mode=lowmem' &&
           echo "$@" | grep -q -- '--repair'; then
                return 0
        fi