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() { |
1864ab54 |
9 | local -x HARNESS_OPTIONS=c:j$VCPU_USE |
ad191fcf |
10 | make test 2> >(tee "$TEST_STDERR_LOG") |
11 | } |
b58ecb01 |
12 | |
83361151 |
13 | # announce everything we have on this box |
14 | TRAVIS="" perl -Ilib t/00describe_environment.t >/dev/null |
15 | |
b9970637 |
16 | TEST_T0=$SECONDS |
b58ecb01 |
17 | if [[ "$CLEANTEST" = "true" ]] ; then |
18 | echo_err "$(tstamp) Running tests with plain \`make test\`" |
19 | run_or_err "Prepare blib" "make pure_all" |
ad191fcf |
20 | run_harness_tests |
b58ecb01 |
21 | else |
1864ab54 |
22 | PROVECMD="prove -lrswj$VCPU_USE xt t" |
19d6c0e1 |
23 | |
24 | # FIXME - temporary, until Package::Stash is fixed |
25 | if perl -M5.010 -e 1 &>/dev/null ; then |
26 | PROVECMD="$PROVECMD -T" |
27 | fi |
28 | |
b58ecb01 |
29 | echo_err "$(tstamp) running tests with \`$PROVECMD\`" |
b9970637 |
30 | $PROVECMD 2> >(tee "$TEST_STDERR_LOG") |
b58ecb01 |
31 | fi |
b9970637 |
32 | TEST_T1=$SECONDS |
b58ecb01 |
33 | |
e52712a8 |
34 | if [[ -z "$DBIC_TRACE" ]] && [[ -z "$DBIC_MULTICREATE_DEBUG" ]] && [[ -s "$TEST_STDERR_LOG" ]] ; then |
b9970637 |
35 | STDERR_LOG_SIZE=$(wc -l < "$TEST_STDERR_LOG") |
36 | |
a9fc70ee |
37 | # prepend STDERR log |
38 | POSTMORTEM="$( |
39 | echo |
40 | echo "Test run produced $STDERR_LOG_SIZE lines of output on STDERR:" |
f207111d |
41 | echo "=============================================================" |
a9fc70ee |
42 | cat "$TEST_STDERR_LOG" |
f207111d |
43 | echo "=============================================================" |
a9fc70ee |
44 | echo "End of test run STDERR output ($STDERR_LOG_SIZE lines)" |
f207111d |
45 | echo |
879ff8cb |
46 | echo |
a9fc70ee |
47 | )$POSTMORTEM" |
b9970637 |
48 | fi |
49 | |
a9fc70ee |
50 | echo |
51 | echo "${POSTMORTEM:- \o/ No notable smoke run issues \o/ }" |
52 | echo |
b9970637 |
53 | echo "$(tstamp) Testing took a total of $(( $TEST_T1 - $TEST_T0 ))s" |
a9fc70ee |
54 | if [[ -n "$INSTALLDEPS_OUT" ]] ; then |
55 | echo "$(tstamp) Full dep install log at $(/usr/bin/nopaste -q -s Shadowcat -d DepInstall <<< "$INSTALLDEPS_OUT")" |
56 | fi |
57 | echo |