+check-parallel:
+ -rm -rf cache outputs temp
+ $(MAKE) -k do-check-parallel; \
+ $(SHELL) $(srcdir)/dg-extract-results.sh \
+ `find outputs -name gdb.sum -print` > gdb.sum; \
+ $(SHELL) $(srcdir)/dg-extract-results.sh -L \
+ `find outputs -name gdb.log -print` > gdb.log
+ @sed -n '/=== gdb Summary ===/,$$ p' gdb.sum
+
+# Turn a list of .exp files into "check/" targets. Only examine .exp
+# files appearing in a gdb.* directory -- we don't want to pick up
+# lib/ by mistake. For example, gdb.linespec/linespec.exp becomes
+# check/gdb.linespec/linespec.exp. The list is generally sorted
+# alphabetically, but we take a few tests known to be slow and push
+# them to the front of the list to try to lessen the overall time
+# taken by the test suite -- if one of these tests happens to be run
+# late, it will cause the overall time to increase.
+@GMAKE_TRUE@ifeq ($(strip $(TESTS)),)
+slow_tests = gdb.base/break-interp.exp gdb.base/interp.exp \
+ gdb.base/multi-forks.exp
+@GMAKE_TRUE@all_tests := $(shell cd $(srcdir) && find gdb.* -name '*.exp' -print)
+@GMAKE_TRUE@reordered_tests := $(slow_tests) $(filter-out $(slow_tests),$(all_tests))
+@GMAKE_TRUE@TEST_TARGETS := $(addprefix check/,$(reordered_tests))
+@GMAKE_TRUE@else
+@GMAKE_TRUE@TEST_TARGETS := $(addprefix check/,$(expanded_tests_or_none))
+@GMAKE_TRUE@endif
+
+do-check-parallel: $(TEST_TARGETS)
+ @:
+
+@GMAKE_TRUE@check/%.exp:
+@GMAKE_TRUE@ -mkdir -p outputs/$*
+@GMAKE_TRUE@ @$(DO_RUNTEST) GDB_PARALLEL=yes --outdir=outputs/$* $*.exp $(RUNTESTFLAGS)
+
+check/no-matching-tests-found:
+ @echo ""
+ @echo "No matching tests found."
+ @echo ""
+
+check-perf: all $(abs_builddir)/site.exp
+ @if test ! -d gdb.perf; then mkdir gdb.perf; fi
+ $(DO_RUNTEST) --directory=gdb.perf --outdir gdb.perf GDB_PERFTEST_MODE=both $(RUNTESTFLAGS)
+
+force:;