Skip to content

Commit

Permalink
Do not run XFAILing tests when quick-checking.
Browse files Browse the repository at this point in the history
They're only run to see if they'll XPASS, which is a waste of time which
in quick-check mode we cannot afford.

This saves about two minutes out of 36.
  • Loading branch information
nickalcock committed Apr 5, 2018
1 parent f3f3652 commit 7a6b149
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Makecheck
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ check-verbose-stress: check-verbose
check-verbose-stress: RUNTESTFLAGS+=--testsuites=unittest,internals,demo --no-comparison

check-quick: check
check-quick: RUNTESTFLAGS+=--skip-longer
check-quick: RUNTESTFLAGS+=--skip-longer --skip-xfail

check-verbose-quick: check-verbose
check-verbose-quick: RUNTESTFLAGS+=--skip-longer
check-verbose-quick: RUNTESTFLAGS+=--skip-longer --skip-xfail

check-installed-stress-internal: check-installed-internal
check-installed-stress-internal: RUNTESTFLAGS+=--testsuites=unittest,$(installed_internals)demo --no-comparison
Expand All @@ -88,10 +88,10 @@ check-installed-verbose-stress-internal: check-installed-verbose-internal
check-installed-verbose-stress-internal: RUNTESTFLAGS+=--testsuites=unittest,$(installed_internals)demo --no-comparison

check-installed-quick-internal: check-installed-internal
check-installed-quick-internal: RUNTESTFLAGS+=--skip-longer
check-installed-quick-internal: RUNTESTFLAGS+=--skip-longer --skip-xfail

check-installed-verbose-quick-internal: check-installed-verbose-internal
check-installed-verbose-quick-internal: RUNTESTFLAGS+=--skip-longer
check-installed-verbose-quick-internal: RUNTESTFLAGS+=--skip-longer --skip-xfail

# QA targets.

Expand Down
8 changes: 8 additions & 0 deletions runtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ Options:
--skip-longer[=TIME]: Skip all tests with expected timeouts longer than
TIME (if not specified, $DEFAULT_TIMEOUT or whatever is
specified by --timeout, whichever is longer).
--skip-xfail: Skip all tests that are expected to fail.
--ignore-timeouts: Treat all timeouts as not being failures. (For use when
testing under load.)
--testsuites=SUITES: Which testsuites (directories under test/) to run,
Expand Down Expand Up @@ -347,6 +348,7 @@ VALGRIND=${DTRACE_TEST_VALGRIND:+t}
COMPARISON=t
LOAD_MODULES_ONLY=
SKIP_LONGER=
SKIP_XFAIL=

if [[ -n $DTRACE_TEST_TESTSUITES ]]; then
TESTSUITES="${DTRACE_TEST_TESTSUITES}"
Expand Down Expand Up @@ -386,6 +388,7 @@ while [[ $# -gt 0 ]]; do
--ignore-timeouts) IGNORE_TIMEOUTS=t;;
--skip-longer) SKIP_LONGER=$TIMEOUT;;
--skip-longer=*) SKIP_LONGER="$(printf -- $1 | cut -d= -f2-)";;
--skip-xfail) SKIP_XFAIL=t;;
--testsuites=*) TESTSUITES="$(printf -- $1 | cut -d= -f2- | tr "," " ")";;
--quiet) QUIET=t;;
--verbose) QUIET=;;
Expand Down Expand Up @@ -1014,6 +1017,11 @@ for dt in $dtrace; do
echo "$xfile: Unexpected return value $?." >&2;;
esac

if [[ -n $xfail ]] && [[ -n $SKIP_XFAIL ]]; then
sum "$_test: XFAIL: $xfailmsg (skipped)\n"
continue
fi

# Check for a trigger.

trigger=
Expand Down

0 comments on commit 7a6b149

Please sign in to comment.