btrfs-progs: tests: arg override in command line
[platform/upstream/btrfs-progs.git] / tests / common.local
1 #!/bin/bash
2 #
3 # additional arguments to various commands
4
5 # already defined, eg. via make argument
6 if [ -z "$TEST_ENABLE_OVERRIDE" ]; then
7     # set to 'true'
8     TEST_ENABLE_OVERRIDE=false
9
10     TEST_ARGS_CHECK=--mode=lowmem
11 fi
12
13
14 # gets arguments of a current command and can decide if the argument insertion
15 # should happen, eg. if some option combination does not make sense or would
16 # break tests
17 _skip_spec()
18 {
19         if echo "$TEST_ARGS_CHECK" | grep -q 'mode=lowmem' &&
20            echo "$@" | grep -q -- '--repair'; then
21                 return 0
22         fi
23         return 1
24 }