btrfs-progs: check: Fix lowmem mode override to allow it skip repair work
[btrfs-progs-unstable/devel.git] / tests / common.local
blob4f56bb08439785fcf0621a14be68376ba68f816c
1 #!/bin/bash
3 # additional arguments to various commands
5 # already defined, eg. via make argument
6 if [ -n "$TEST_ENABLE_OVERRIDE" ]; then
7 return
8 fi
10 # set to 'true'
11 TEST_ENABLE_OVERRIDE=false
13 TEST_ARGS_CHECK=--mode=lowmem
15 # gets arguments of a current command and can decide if the argument insertion
16 # should happen, eg. if some option combination does not make sense or would
17 # break tests
18 _skip_spec()
20 if echo "$TEST_ARGS_CHECK" | grep -q 'mode=lowmem' &&
21 echo "$@" | grep -q -- '--repair'; then
22 return 0
24 return 1