File: 40_script.bash

package info (click to toggle)
libdbix-class-schema-loader-perl 0.07051-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,464 kB
  • sloc: perl: 11,521; sh: 544; makefile: 4
file content (49 lines) | stat: -rwxr-xr-x 1,441 bytes parent folder | download | duplicates (3)
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
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash

# this file is executed in a subshell - set up the common stuff
source maint/travis-ci_scripts/common.bash

if [[ -n "$SHORT_CIRCUIT_SMOKE" ]] ; then exit 0 ; fi

run_harness_tests() {
  local -x HARNESS_OPTIONS=c
  make test 2> >(tee "$TEST_STDERR_LOG")
}

TEST_T0=$SECONDS
if [[ "$CLEANTEST" = "true" ]] ; then
  echo_err "$(tstamp) Running tests with plain \`make test\`"
  run_or_err "Prepare blib" "make pure_all"
  run_harness_tests
else
  PROVECMD="prove -lrsw t"

  echo_err "$(tstamp) running tests with \`$PROVECMD\`"
  $PROVECMD 2> >(tee "$TEST_STDERR_LOG")
fi
TEST_T1=$SECONDS

if [[ -z "$DBICTRACE" ]] && [[ -z "$POISON_ENV" ]] && [[ -s "$TEST_STDERR_LOG" ]] ; then
  STDERR_LOG_SIZE=$(wc -l < "$TEST_STDERR_LOG")

  # prepend STDERR log
  POSTMORTEM="$(
    echo
    echo "Test run produced $STDERR_LOG_SIZE lines of output on STDERR:"
    echo "============================================================="
    cat "$TEST_STDERR_LOG"
    echo "============================================================="
    echo "End of test run STDERR output ($STDERR_LOG_SIZE lines)"
    echo
    echo
  )$POSTMORTEM"
fi

echo
echo "${POSTMORTEM:- \o/ No notable smoke run issues \o/ }"
echo
echo "$(tstamp) Testing took a total of $(( $TEST_T1 - $TEST_T0 ))s"
if [[ -n "$INSTALLDEPS_OUT" ]] ; then
  echo "$(tstamp) Full dep install log at $(/usr/bin/nopaste -q -s Shadowcat -d DepInstall <<< "$INSTALLDEPS_OUT")"
fi
echo