]> git.lizzy.rs Git - rust.git/commitdiff
mk: Address review feedback
authorBrian Anderson <banderson@mozilla.com>
Sat, 15 Feb 2014 03:17:50 +0000 (19:17 -0800)
committerBrian Anderson <banderson@mozilla.com>
Sat, 15 Feb 2014 03:17:50 +0000 (19:17 -0800)
Makefile.in
configure
mk/tests.mk
mk/util.mk

index f83ddf76eefa4454d0b5e4dae4b3b11b78165b7b..ba1879a771327fb8f97cb4a369b02eef80b82a65 100644 (file)
 #
 #   * 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
 #
@@ -52,8 +52,9 @@
 #   * 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.
@@ -71,7 +72,7 @@
 #
 #   * `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>
 #
index 60d7efc7ac8bfd65e8471fb15811a350bc05eef5..75514ada973b49d1c44eba3ec671dc9cfd76ef03 100755 (executable)
--- a/configure
+++ b/configure
@@ -1103,5 +1103,5 @@ rm -f config.tmp
 touch config.stamp
 
 step_msg "complete"
-msg "type \`make help\`"
+msg "run \`make help\`"
 msg
index 049b41ab204d7951326c462b1c0adf0115595e7a..8ca4da85994fdfa218cb65299632f96296fb918c 100644 (file)
@@ -194,6 +194,9 @@ check-ref: cleantestlibs cleantmptestlogs check-stage2-rpass \
        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:
@@ -827,6 +830,23 @@ $(foreach stage,$(STAGES), \
   $(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
 ######################################################################
index 2f113f7622d34edc3c82f8400955cd58fad90aec..3bbc8f413aec5c04da07138a0c410bda12f368d5 100644 (file)
@@ -16,13 +16,5 @@ else
   E = echo $(1)
 endif
 
-ifdef VERBOSE
-  Q :=
-  E =
-else
-  Q := @
-  E = echo $(1)
-endif
-
 S := $(CFG_SRC_DIR)