#
# * uninstall - Uninstall the binaries
#
-# For hot tips on working with The Rust Build System, just:
+# For tips on working with The Rust Build System, just:
#
-# type `make hot-tips`
+# run `make tips`
#
# Otherwise
#
-# type `make`
+# run `make`
#
# </help>
#
-# <hottips>
+# <tips>
#
# # The Rust Build System Tip Line
#
# * check-$(crate) - Test a crate, e.g. `check-std`
# * check-ref - Run the language reference tests
# * check-docs - Test the documentation examples
-#
-# TODO: Lots more
+# * check-stage$(stage)-$(crate) - Test a crate in a specific stage
+# * check-stage$(stage)-{rpass,rfail,cfail,rmake,...} - Run tests in src/test/
+# * check-stage1-T-$(target)-H-$(host) - Run cross-compiled-tests
#
# Then mix in some of these environment variables to harness the
# ultimate power of The Rust Build System.
#
# * `NO_REBUILD=1` - Don't rebootstrap when testing std
# (and possibly other crates)
-# * `NO_MKFILE_DEPS=1` - Don rebuild for modified .mk files
+# * `NO_MKFILE_DEPS=1` - Don't rebuild for modified .mk files
#
# * `SAVE_TEMPS=1` - Use `--save-temps` flag on all `rustc` invocations
# * `ASM_COMMENTS=1` - Use `-Z asm-comments`
# * `TIME_LLVM_PASSES=1` - Use `-Z time-llvm-passes`
# * `TRACE=1` - Use `-Z trace`
#
+# # Rust recipes for build system success
+#
+# // Modifying libstd? Use this comment to run unit tests just on your change
+# make check-stage1-std NO_REBUILD=1 NO_BENCH=1
+#
+# // Added a run-pass test? Use this to test running your test
+# make check-stage1-rpass TESTNAME=my-shiny-new-test
+#
+# // Having trouble figuring out which test is failing? Turn off parallel tests
+# make check-stage1-std RUST_TEST_TASKS=1
+#
# This is hardly all there is to know of The Rust Build System's
# mysteries. The tale continues on the wiki[1][2].
#
# [1]: https://github.com/mozilla/rust/wiki/Note-build-system
# [2]: https://github.com/mozilla/rust/wiki/Note-testsuite
#
-# Unless you feel like getting your hands dirty, then:
+# If you really feel like getting your hands dirty, then:
#
-# don't type `make nitty-gritty`
+# run `make nitty-gritty`
#
-# </hottips>
+# </tips>
#
# <nittygritty>
#
check-stage2-rfail check-stage2-cfail check-stage2-rmake
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
+check-docs: cleantestlibs cleantmptestlogs check-stage2-docs
+ $(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
+
.PHONY: cleantmptestlogs cleantestlibs
cleantmptestlogs:
$(foreach group,$(TEST_GROUPS), \
$(eval $(call DEF_CHECK_FOR_STAGE_AND_HOSTS_AND_GROUP,$(stage),$(host),$(group))))))
+define DEF_CHECK_DOC_FOR_STAGE
+check-stage$(1)-docs: $$(foreach docname,$$(DOC_TEST_NAMES),\
+ check-stage$(1)-T-$$(CFG_BUILD)-H-$$(CFG_BUILD)-doc-$$(docname)) \
+ $$(foreach crate,$$(DOC_CRATE_NAMES),\
+ check-stage$(1)-T-$$(CFG_BUILD)-H-$$(CFG_BUILD)-doc-$$(crate))
+endef
+
+$(foreach stage,$(STAGES), \
+ $(eval $(call DEF_CHECK_DOC_FOR_STAGE,$(stage))))
+
+define DEF_CHECK_CRATE
+check-$(1): check-stage2-T-$$(CFG_BUILD)-H-$$(CFG_BUILD)-$(1)-exec
+endef
+
+$(foreach crate,$(TEST_CRATES), \
+ $(eval $(call DEF_CHECK_CRATE,$(crate))))
+
######################################################################
# check-fast rules
######################################################################