-
Notifications
You must be signed in to change notification settings - Fork 666
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Jeremy Anselme
committed
Jun 11, 2024
1 parent
513e03c
commit 39fc88b
Showing
3 changed files
with
9 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ | |
*.kdev4 | ||
/.kdev4 | ||
__pycache__ | ||
tests-out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,9 @@ | ||
#!/bin/bash | ||
|
||
srcdir="$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. && pwd)" | ||
cd "$(dirname "$0")"/.. | ||
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 tests/tokenized -type f -name '*.txt' -a -name "*${filter}*" -print0 | \ | ||
xargs -0 -I '{}' -P $jobs \ | ||
bash -c 'echo -e "$(tests/decompyle_test.sh "$(basename -s .txt "{}")" tests-out)"' |