mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
cmdlineTests.sh: Add --exclude option
This commit is contained in:
@@ -43,6 +43,7 @@ pushd "${REPO_ROOT}/test/cmdlineTests" > /dev/null
|
||||
autoupdate=false
|
||||
no_smt=false
|
||||
declare -a included_test_patterns
|
||||
declare -a excluded_test_patterns
|
||||
while [[ $# -gt 0 ]]
|
||||
do
|
||||
case "$1" in
|
||||
@@ -54,6 +55,12 @@ do
|
||||
no_smt=true
|
||||
shift
|
||||
;;
|
||||
--exclude)
|
||||
[[ $2 != '' ]] || fail "No pattern given to --exclude option or the pattern is empty."
|
||||
excluded_test_patterns+=("$2")
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
included_test_patterns+=("$1")
|
||||
shift
|
||||
@@ -70,6 +77,11 @@ do
|
||||
done
|
||||
test_name_filter+=(')')
|
||||
|
||||
for pattern in "${excluded_test_patterns[@]}"
|
||||
do
|
||||
test_name_filter+=(-and -not -name "$pattern")
|
||||
done
|
||||
|
||||
# NOTE: We want leading symbols in names to affect the sort order but without
|
||||
# LC_COLLATE=C sort seems to ignore them.
|
||||
# shellcheck disable=SC2207 # We do not support test names containing spaces.
|
||||
|
||||
Reference in New Issue
Block a user