Commit | Line | Data |
b58ecb01 |
1 | #!/bin/bash |
2 | |
afeb40d2 |
3 | # this file is executed in a subshell - set up the common stuff |
4 | source maint/travis-ci_scripts/common.bash |
5 | |
6 | if [[ -n "$SHORT_CIRCUIT_SMOKE" ]] ; then exit 0 ; fi |
b58ecb01 |
7 | |
ad191fcf |
8 | run_harness_tests() { |
ad191fcf |
9 | local -x HARNESS_OPTIONS=c:j$NUMTHREADS |
10 | make test 2> >(tee "$TEST_STDERR_LOG") |
11 | } |
b58ecb01 |
12 | |
b9970637 |
13 | TEST_T0=$SECONDS |
b58ecb01 |
14 | if [[ "$CLEANTEST" = "true" ]] ; then |
15 | echo_err "$(tstamp) Running tests with plain \`make test\`" |
16 | run_or_err "Prepare blib" "make pure_all" |
ad191fcf |
17 | run_harness_tests |
b58ecb01 |
18 | else |
d8541ca3 |
19 | PROVECMD="prove -lrswj$NUMTHREADS xt t" |
19d6c0e1 |
20 | |
21 | # FIXME - temporary, until Package::Stash is fixed |
22 | if perl -M5.010 -e 1 &>/dev/null ; then |
23 | PROVECMD="$PROVECMD -T" |
24 | fi |
25 | |
b58ecb01 |
26 | echo_err "$(tstamp) running tests with \`$PROVECMD\`" |
b9970637 |
27 | $PROVECMD 2> >(tee "$TEST_STDERR_LOG") |
b58ecb01 |
28 | fi |
b9970637 |
29 | TEST_T1=$SECONDS |
b58ecb01 |
30 | |
e52712a8 |
31 | if [[ -z "$DBIC_TRACE" ]] && [[ -z "$DBIC_MULTICREATE_DEBUG" ]] && [[ -s "$TEST_STDERR_LOG" ]] ; then |
b9970637 |
32 | STDERR_LOG_SIZE=$(wc -l < "$TEST_STDERR_LOG") |
33 | |
a9fc70ee |
34 | # prepend STDERR log |
35 | POSTMORTEM="$( |
36 | echo |
37 | echo "Test run produced $STDERR_LOG_SIZE lines of output on STDERR:" |
f207111d |
38 | echo "=============================================================" |
a9fc70ee |
39 | cat "$TEST_STDERR_LOG" |
f207111d |
40 | echo "=============================================================" |
a9fc70ee |
41 | echo "End of test run STDERR output ($STDERR_LOG_SIZE lines)" |
f207111d |
42 | echo |
879ff8cb |
43 | echo |
a9fc70ee |
44 | )$POSTMORTEM" |
b9970637 |
45 | fi |
46 | |
a9fc70ee |
47 | echo |
48 | echo "${POSTMORTEM:- \o/ No notable smoke run issues \o/ }" |
49 | echo |
b9970637 |
50 | echo "$(tstamp) Testing took a total of $(( $TEST_T1 - $TEST_T0 ))s" |
a9fc70ee |
51 | if [[ -n "$INSTALLDEPS_OUT" ]] ; then |
52 | echo "$(tstamp) Full dep install log at $(/usr/bin/nopaste -q -s Shadowcat -d DepInstall <<< "$INSTALLDEPS_OUT")" |
53 | fi |
54 | echo |