-
Notifications
You must be signed in to change notification settings - Fork 848
/
pg_prove.sh
executable file
·38 lines (34 loc) · 943 Bytes
/
pg_prove.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/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}
# 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" \
-I "${PG_LIBDIR}/pgxs/src/test/perl" \
-I "${PG_LIBDIR}/postgresql/pgxs/src/test/perl" \
$FINAL_TESTS