Run tests in parallel or only some with a filter
`make check JOBS=4` will spawn 4 workers and spread the tests among them. `make check FILTER=try` will only run tests that contain `try` in their name.
This commit is contained in:
@@ -1,13 +1,10 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
srcdir="$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. && pwd)"
|
||||
jobs=${JOBS:-4}
|
||||
filter=${FILTER:-""}
|
||||
|
||||
test_status=0
|
||||
test_files=( "$srcdir"/tests/tokenized/*.txt )
|
||||
for tf in "${test_files[@]}"; do
|
||||
test_name="$(basename "$tf")"
|
||||
test_name="${test_name%.txt}"
|
||||
"$srcdir"/tests/decompyle_test.sh $test_name tests || test_status=1
|
||||
done
|
||||
|
||||
exit $test_status
|
||||
find "${srcdir}/tests/tokenized" -type f -name '*.txt' -a -name "*${filter}*" -print0 | \
|
||||
xargs -0 -I '{}' -P $jobs \
|
||||
bash -c 'o=$('"$srcdir"'/tests/decompyle_test.sh "$(basename -s .txt "{}")" tests-out) r=$?; echo "$o"; exit $r'
|
||||
|
Reference in New Issue
Block a user