mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 17:53:56 +00:00
Add configure and make machinery to activate perf metrics and ratchets.
This commit is contained in:
parent
bc4c89c10a
commit
cdce33a421
1
configure
vendored
1
configure
vendored
@ -372,6 +372,7 @@ opt optimize 1 "build optimized rust code"
|
|||||||
opt optimize-cxx 1 "build optimized C++ code"
|
opt optimize-cxx 1 "build optimized C++ code"
|
||||||
opt optimize-llvm 1 "build optimized LLVM"
|
opt optimize-llvm 1 "build optimized LLVM"
|
||||||
opt debug 0 "build with extra debug fun"
|
opt debug 0 "build with extra debug fun"
|
||||||
|
opt ratchet-bench 0 "ratchet benchmarks"
|
||||||
opt fast-make 0 "use .gitmodules as timestamp for submodule deps"
|
opt fast-make 0 "use .gitmodules as timestamp for submodule deps"
|
||||||
opt manage-submodules 1 "let the build manage the git submodules"
|
opt manage-submodules 1 "let the build manage the git submodules"
|
||||||
opt mingw-cross 0 "cross-compile for win32 using mingw"
|
opt mingw-cross 0 "cross-compile for win32 using mingw"
|
||||||
|
19
mk/tests.mk
19
mk/tests.mk
@ -60,6 +60,21 @@ endif
|
|||||||
TEST_LOG_FILE=tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).log
|
TEST_LOG_FILE=tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).log
|
||||||
TEST_OK_FILE=tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).ok
|
TEST_OK_FILE=tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).ok
|
||||||
|
|
||||||
|
TEST_RATCHET_FILE=tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4)-metrics.json
|
||||||
|
TEST_RATCHET_NOISE_PERCENT=10.0
|
||||||
|
|
||||||
|
# Whether to ratchet or merely save benchmarks
|
||||||
|
ifdef CFG_RATCHET_BENCH
|
||||||
|
CRATE_TEST_BENCH_ARGS=\
|
||||||
|
--test --bench \
|
||||||
|
--ratchet-metrics $(call TEST_RATCHET_FILE,$(1),$(2),$(3),$(4)) \
|
||||||
|
--ratchet-noise-percent $(TEST_RATCHET_NOISE_PERCENT)
|
||||||
|
else
|
||||||
|
CRATE_TEST_BENCH_ARGS=\
|
||||||
|
--test --bench \
|
||||||
|
--save-metrics $(call TEST_RATCHET_FILE,$(1),$(2),$(3),$(4))
|
||||||
|
endif
|
||||||
|
|
||||||
define DEF_TARGET_COMMANDS
|
define DEF_TARGET_COMMANDS
|
||||||
|
|
||||||
ifdef CFG_UNIXY_$(1)
|
ifdef CFG_UNIXY_$(1)
|
||||||
@ -359,11 +374,14 @@ $(foreach host,$(CFG_HOST_TRIPLES), \
|
|||||||
define DEF_TEST_CRATE_RULES
|
define DEF_TEST_CRATE_RULES
|
||||||
check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4))
|
check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4))
|
||||||
|
|
||||||
|
check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4))
|
||||||
|
|
||||||
$$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
|
$$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
|
||||||
$(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2))
|
$(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2))
|
||||||
@$$(call E, run: $$<)
|
@$$(call E, run: $$<)
|
||||||
$$(Q)$$(call CFG_RUN_TEST_$(2),$$<,$(2),$(3)) $$(TESTARGS) \
|
$$(Q)$$(call CFG_RUN_TEST_$(2),$$<,$(2),$(3)) $$(TESTARGS) \
|
||||||
--logfile $$(call TEST_LOG_FILE,$(1),$(2),$(3),$(4)) \
|
--logfile $$(call TEST_LOG_FILE,$(1),$(2),$(3),$(4)) \
|
||||||
|
$$(call CRATE_TEST_BENCH_ARGS,$(1),$(2),$(3),$(4)) \
|
||||||
&& touch $$@
|
&& touch $$@
|
||||||
endef
|
endef
|
||||||
|
|
||||||
@ -552,6 +570,7 @@ CTEST_ARGS$(1)-T-$(2)-H-$(3)-$(4) := \
|
|||||||
$$(CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3)) \
|
$$(CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3)) \
|
||||||
--src-base $$(S)src/test/$$(CTEST_SRC_BASE_$(4))/ \
|
--src-base $$(S)src/test/$$(CTEST_SRC_BASE_$(4))/ \
|
||||||
--build-base $(3)/test/$$(CTEST_BUILD_BASE_$(4))/ \
|
--build-base $(3)/test/$$(CTEST_BUILD_BASE_$(4))/ \
|
||||||
|
--ratchet-metrics $(call TEST_RATCHET_FILE,$(1),$(2),$(3),$(4)) \
|
||||||
--mode $$(CTEST_MODE_$(4)) \
|
--mode $$(CTEST_MODE_$(4)) \
|
||||||
$$(CTEST_RUNTOOL_$(4))
|
$$(CTEST_RUNTOOL_$(4))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user