-
Notifications
You must be signed in to change notification settings - Fork 848
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make provecheck run specific tap tests
Introduce a shell wrapper around perl prove utility to control running of TAP tests. The following control variable is supported: PROVE_TESTS: only run TAP tests from this list e.g make provecheck PROVE_TESTS="t/foo.pl t/bar.pl" Note that you can also use regular expressions to run multiple taps tests matching the pattern: e.g make provecheck PROVE_TESTS="t/*chunk*" If the existing "TESTS=" option is used along with PROVE_TESTS then the subset represented by PROVE_TESTS will also get run. Otherwise tap tests will be skipped if "TESTS=" is specified. e.g make installcheck TESTS=dist_hyper* PROVE_TESTS="t/001_*"
- Loading branch information
Showing
2 changed files
with
38 additions
and
6 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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Wrapper around perl prove utility to control running of TAP tests | ||
# | ||
# The following control variable is supported: | ||
# | ||
# PROVE_TESTS only run TAP tests from this list | ||
# e.g make provecheck PROVE_TESTS="t/foo.pl t/bar.pl" | ||
# | ||
# Note that you can also use regular expressions to run multiple | ||
# taps tests matching the pattern: | ||
# | ||
# e.g make provecheck PROVE_TESTS="t/*chunk*" | ||
# | ||
|
||
PROVE_TESTS=${PROVE_TESTS:-} | ||
PROVE=${PROVE:-prove} | ||
|
||
echo "PROVE_TESTS ${PROVE_TESTS}" | ||
|
||
# If PROVE_TESTS is specified then run those subset of TAP tests even if | ||
# TESTS is also specified | ||
if [ -z "$PROVE_TESTS" ] | ||
then | ||
# Exit early if we are running with TESTS=expr | ||
if [ ! -z "$TESTS" ] | ||
then | ||
exit 0 | ||
fi | ||
FINAL_TESTS="t/*.pl" | ||
else | ||
FINAL_TESTS=$PROVE_TESTS | ||
fi | ||
|
||
${PROVE} -I "${SRC_DIR}/src/test/perl" -I "${CM_SRC_DIR}/test/perl" $FINAL_TESTS |
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