Skip to content
Snippets Groups Projects
Commit 810da039 authored by Andre Maroneze's avatar Andre Maroneze
Browse files

[Eva] restore script to run tests in alternative configs

parent b8a266f1
No related branches found
No related tags found
No related merge requests found
#!/bin/bash -eu
DEFAULT_TESTS=(float value idct builtins)
CONFIGS=(apron equality bitwise symblocs gauges octagon)
ARGS=("${@-}")
# has_target returns 0 if at least one of the arguments is a target
# (i.e. not an option such as "-j 8"). If so, do not run tests
# for all default targets, only for the specified target(s)
has_target=0
# sets has_target=0
function has_target() {
local __has_target=1
for f in $@; do
__re="\\b$f\\b" # match argument as whole word
if [[ "$f" =~ \.[ci]$ || \
( "$f" =~ ^[A-Za-z] && "${DEFAULT_TESTS[@]}" =~ $__re ) ]]; then
__has_target=0
fi
done
return $__has_target
}
if has_target ${ARGS[@]}; then
TESTS=("${ARGS[@]}")
else
TESTS="${DEFAULT_TESTS[@]} ${ARGS[@]}"
fi
echo Testing ${TESTS[@]}
for A in ${CONFIGS[@]}
do
echo $A
./bin/ptests.opt -config $A ${TESTS[@]}
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment