Skip to content

Commit 8d4b675

Browse files
committed
mk: Address review feedback
1 parent 24915c8 commit 8d4b675

File tree

4 files changed

+43
-19
lines changed

4 files changed

+43
-19
lines changed

Makefile.in

+22-10
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,17 @@
3131
#
3232
# * uninstall - Uninstall the binaries
3333
#
34-
# For hot tips on working with The Rust Build System, just:
34+
# For tips on working with The Rust Build System, just:
3535
#
36-
# type `make hot-tips`
36+
# run `make tips`
3737
#
3838
# Otherwise
3939
#
40-
# type `make`
40+
# run `make`
4141
#
4242
# </help>
4343
#
44-
# <hottips>
44+
# <tips>
4545
#
4646
# # The Rust Build System Tip Line
4747
#
@@ -52,8 +52,9 @@
5252
# * check-$(crate) - Test a crate, e.g. `check-std`
5353
# * check-ref - Run the language reference tests
5454
# * check-docs - Test the documentation examples
55-
#
56-
# TODO: Lots more
55+
# * check-stage$(stage)-$(crate) - Test a crate in a specific stage
56+
# * check-stage$(stage)-{rpass,rfail,cfail,rmake,...} - Run tests in src/test/
57+
# * check-stage1-T-$(target)-H-$(host) - Run cross-compiled-tests
5758
#
5859
# Then mix in some of these environment variables to harness the
5960
# ultimate power of The Rust Build System.
@@ -71,25 +72,36 @@
7172
#
7273
# * `NO_REBUILD=1` - Don't rebootstrap when testing std
7374
# (and possibly other crates)
74-
# * `NO_MKFILE_DEPS=1` - Don rebuild for modified .mk files
75+
# * `NO_MKFILE_DEPS=1` - Don't rebuild for modified .mk files
7576
#
7677
# * `SAVE_TEMPS=1` - Use `--save-temps` flag on all `rustc` invocations
7778
# * `ASM_COMMENTS=1` - Use `-Z asm-comments`
7879
# * `TIME_PASSES=1` - Use `-Z time-passes`
7980
# * `TIME_LLVM_PASSES=1` - Use `-Z time-llvm-passes`
8081
# * `TRACE=1` - Use `-Z trace`
8182
#
83+
# # Rust recipes for build system success
84+
#
85+
# // Modifying libstd? Use this comment to run unit tests just on your change
86+
# make check-stage1-std NO_REBUILD=1 NO_BENCH=1
87+
#
88+
# // Added a run-pass test? Use this to test running your test
89+
# make check-stage1-rpass TESTNAME=my-shiny-new-test
90+
#
91+
# // Having trouble figuring out which test is failing? Turn off parallel tests
92+
# make check-stage1-std RUST_TEST_TASKS=1
93+
#
8294
# This is hardly all there is to know of The Rust Build System's
8395
# mysteries. The tale continues on the wiki[1][2].
8496
#
8597
# [1]: https://github.com/mozilla/rust/wiki/Note-build-system
8698
# [2]: https://github.com/mozilla/rust/wiki/Note-testsuite
8799
#
88-
# Unless you feel like getting your hands dirty, then:
100+
# If you really feel like getting your hands dirty, then:
89101
#
90-
# don't type `make nitty-gritty`
102+
# run `make nitty-gritty`
91103
#
92-
# </hottips>
104+
# </tips>
93105
#
94106
# <nittygritty>
95107
#

configure

+1-1
Original file line numberDiff line numberDiff line change
@@ -1103,5 +1103,5 @@ rm -f config.tmp
11031103
touch config.stamp
11041104

11051105
step_msg "complete"
1106-
msg "type \`make help\`"
1106+
msg "run \`make help\`"
11071107
msg

mk/tests.mk

+20
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,9 @@ check-ref: cleantestlibs cleantmptestlogs check-stage2-rpass \
194194
check-stage2-rfail check-stage2-cfail check-stage2-rmake
195195
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
196196

197+
check-docs: cleantestlibs cleantmptestlogs check-stage2-docs
198+
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
199+
197200
.PHONY: cleantmptestlogs cleantestlibs
198201

199202
cleantmptestlogs:
@@ -827,6 +830,23 @@ $(foreach stage,$(STAGES), \
827830
$(foreach group,$(TEST_GROUPS), \
828831
$(eval $(call DEF_CHECK_FOR_STAGE_AND_HOSTS_AND_GROUP,$(stage),$(host),$(group))))))
829832

833+
define DEF_CHECK_DOC_FOR_STAGE
834+
check-stage$(1)-docs: $$(foreach docname,$$(DOC_TEST_NAMES),\
835+
check-stage$(1)-T-$$(CFG_BUILD)-H-$$(CFG_BUILD)-doc-$$(docname)) \
836+
$$(foreach crate,$$(DOC_CRATE_NAMES),\
837+
check-stage$(1)-T-$$(CFG_BUILD)-H-$$(CFG_BUILD)-doc-$$(crate))
838+
endef
839+
840+
$(foreach stage,$(STAGES), \
841+
$(eval $(call DEF_CHECK_DOC_FOR_STAGE,$(stage))))
842+
843+
define DEF_CHECK_CRATE
844+
check-$(1): check-stage2-T-$$(CFG_BUILD)-H-$$(CFG_BUILD)-$(1)-exec
845+
endef
846+
847+
$(foreach crate,$(TEST_CRATES), \
848+
$(eval $(call DEF_CHECK_CRATE,$(crate))))
849+
830850
######################################################################
831851
# check-fast rules
832852
######################################################################

mk/util.mk

-8
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,5 @@ else
1616
E = echo $(1)
1717
endif
1818

19-
ifdef VERBOSE
20-
Q :=
21-
E =
22-
else
23-
Q := @
24-
E = echo $(1)
25-
endif
26-
2719
S := $(CFG_SRC_DIR)
2820

0 commit comments

Comments
 (0)