summaryrefslogtreecommitdiff
path: root/tests/common.local
blob: 9f567c2796f7f3cae906f4d46f06a44b5b8e1f7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
#
# additional arguments to various commands

# already defined, eg. via make argument
if [ -n "$TEST_ENABLE_OVERRIDE" ]; then
	return
fi

# set to 'true'
TEST_ENABLE_OVERRIDE=false

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' &&
	   echo "$@" | grep -q -- '--repair'; then
		return 0
	fi
	return 1
}