1
- # Copyright 2012 The Rust Project Developers. See the COPYRIGHT
1
+ # Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
2
2
# file at the top-level directory of this distribution and at
3
3
# http://rust-lang.org/COPYRIGHT.
4
4
#
@@ -184,12 +184,12 @@ check-notidy: cleantmptestlogs cleantestlibs all check-stage2
184
184
# A slightly smaller set of tests for smoke testing.
185
185
check-lite : cleantestlibs cleantmptestlogs \
186
186
$(foreach crate,$(TEST_TARGET_CRATES ) ,check-stage2-$(crate ) ) \
187
- check-stage2-rpass \
187
+ check-stage2-rpass check-stage2-rpass-valgrind \
188
188
check-stage2-rfail check-stage2-cfail check-stage2-rmake
189
189
$(Q )$(CFG_PYTHON ) $(S ) src/etc/check-summary.py tmp/* .log
190
190
191
191
# Only check the 'reference' tests: rpass/cfail/rfail/rmake.
192
- check-ref : cleantestlibs cleantmptestlogs check-stage2-rpass \
192
+ check-ref : cleantestlibs cleantmptestlogs check-stage2-rpass check-stage2-rpass-valgrind \
193
193
check-stage2-rfail check-stage2-cfail check-stage2-rmake
194
194
$(Q )$(CFG_PYTHON ) $(S ) src/etc/check-summary.py tmp/* .log
195
195
@@ -326,7 +326,8 @@ check-stage$(1)-T-$(2)-H-$(3)-exec: \
326
326
check-stage$(1 ) -T-$(2 ) -H-$(3 ) -rpass-exec \
327
327
check-stage$(1 ) -T-$(2 ) -H-$(3 ) -rfail-exec \
328
328
check-stage$(1 ) -T-$(2 ) -H-$(3 ) -cfail-exec \
329
- check-stage$(1 ) -T-$(2 ) -H-$(3 ) -rpass-full-exec \
329
+ check-stage$(1 ) -T-$(2 ) -H-$(3 ) -rpass-valgrind-exec \
330
+ check-stage$(1 ) -T-$(2 ) -H-$(3 ) -rpass-full-exec \
330
331
check-stage$(1 ) -T-$(2 ) -H-$(3 ) -cfail-full-exec \
331
332
check-stage$(1 ) -T-$(2 ) -H-$(3 ) -rmake-exec \
332
333
check-stage$(1 ) -T-$(2 ) -H-$(3 ) -crates-exec \
@@ -364,6 +365,7 @@ check-stage$(1)-T-$(2)-H-$(3)-doc-exec: \
364
365
365
366
check-stage$(1 ) -T-$(2 ) -H-$(3 ) -pretty-exec: \
366
367
check-stage$(1 ) -T-$(2 ) -H-$(3 ) -pretty-rpass-exec \
368
+ check-stage$(1 ) -T-$(2 ) -H-$(3 ) -pretty-rpass-valgrind-exec \
367
369
check-stage$(1 ) -T-$(2 ) -H-$(3 ) -pretty-rpass-full-exec \
368
370
check-stage$(1 ) -T-$(2 ) -H-$(3 ) -pretty-rfail-exec \
369
371
check-stage$(1 ) -T-$(2 ) -H-$(3 ) -pretty-bench-exec \
@@ -489,15 +491,11 @@ $(foreach host,$(CFG_HOST), \
489
491
# Rules for the compiletest tests (rpass, rfail, etc.)
490
492
# #####################################################################
491
493
492
- RPASS_RC := $(wildcard $(S ) src/test/run-pass/* .rc)
493
494
RPASS_RS := $(wildcard $(S ) src/test/run-pass/* .rs)
494
- RPASS_FULL_RC := $(wildcard $(S ) src/test/run-pass-fulldeps /* .rc )
495
+ RPASS_VALGRIND_RS := $(wildcard $(S ) src/test/run-pass-valgrind /* .rs )
495
496
RPASS_FULL_RS := $(wildcard $(S ) src/test/run-pass-fulldeps/* .rs)
496
- CFAIL_FULL_RC := $(wildcard $(S ) src/test/compile-fail-fulldeps/* .rc)
497
497
CFAIL_FULL_RS := $(wildcard $(S ) src/test/compile-fail-fulldeps/* .rs)
498
- RFAIL_RC := $(wildcard $(S ) src/test/run-fail/* .rc)
499
498
RFAIL_RS := $(wildcard $(S ) src/test/run-fail/* .rs)
500
- CFAIL_RC := $(wildcard $(S ) src/test/compile-fail/* .rc)
501
499
CFAIL_RS := $(wildcard $(S ) src/test/compile-fail/* .rs)
502
500
BENCH_RS := $(wildcard $(S ) src/test/bench/* .rs)
503
501
PRETTY_RS := $(wildcard $(S ) src/test/pretty/* .rs)
@@ -510,11 +508,12 @@ CODEGEN_CC := $(wildcard $(S)src/test/codegen/*.cc)
510
508
# a performance monitor.
511
509
PERF_RS := $(wildcard $(S ) src/test/bench/* .rs)
512
510
513
- RPASS_TESTS := $(RPASS_RC ) $(RPASS_RS )
514
- RPASS_FULL_TESTS := $(RPASS_FULL_RC ) $(RPASS_FULL_RS )
515
- CFAIL_FULL_TESTS := $(CFAIL_FULL_RC ) $(CFAIL_FULL_RS )
516
- RFAIL_TESTS := $(RFAIL_RC ) $(RFAIL_RS )
517
- CFAIL_TESTS := $(CFAIL_RC ) $(CFAIL_RS )
511
+ RPASS_TESTS := $(RPASS_RS )
512
+ RPASS_VALGRIND_TESTS := $(RPASS_VALGRIND_RS )
513
+ RPASS_FULL_TESTS := $(RPASS_FULL_RS )
514
+ CFAIL_FULL_TESTS := $(CFAIL_FULL_RS )
515
+ RFAIL_TESTS := $(RFAIL_RS )
516
+ CFAIL_TESTS := $(CFAIL_RS )
518
517
BENCH_TESTS := $(BENCH_RS )
519
518
PERF_TESTS := $(PERF_RS )
520
519
PRETTY_TESTS := $(PRETTY_RS )
@@ -527,6 +526,19 @@ CTEST_BUILD_BASE_rpass = run-pass
527
526
CTEST_MODE_rpass = run-pass
528
527
CTEST_RUNTOOL_rpass = $(CTEST_RUNTOOL )
529
528
529
+ CTEST_SRC_BASE_rpass-valgrind = run-pass-valgrind
530
+ CTEST_BUILD_BASE_rpass-valgrind = run-pass-valgrind
531
+ CTEST_MODE_rpass-valgrind = run-pass-valgrind
532
+ CTEST_RUNTOOL_rpass-valgrind = $(CTEST_RUNTOOL )
533
+ ifdef VALGRIND_PATH
534
+ CTEST_TESTARGS += --valgrind-path "$(VALGRIND_PATH ) "
535
+ endif
536
+ ifndef CFG_BAD_VALGRIND
537
+ ifndef CFG_DISABLE_VALGRIND
538
+ CTEST_TESTARGS += --force-valgrind
539
+ endif
540
+ endif
541
+
530
542
CTEST_SRC_BASE_rpass-full = run-pass-fulldeps
531
543
CTEST_BUILD_BASE_rpass-full = run-pass-fulldeps
532
544
CTEST_MODE_rpass-full = run-pass
@@ -621,14 +633,15 @@ TEST_SREQ$(1)_T_$(2)_H_$(3) = \
621
633
# remove directive, if present, from CFG_RUSTC_FLAGS (issue #7898).
622
634
CTEST_RUSTC_FLAGS := $$(subst --cfg ndebug,,$$(CFG_RUSTC_FLAGS ) )
623
635
624
- # The tests can not be optimized while the rest of the compiler is optimized, so
636
+ # The tests cannot be optimized while the rest of the compiler is optimized, so
625
637
# filter out the optimization (if any) from rustc and then figure out if we need
626
638
# to be optimized
627
639
CTEST_RUSTC_FLAGS := $$(subst -O,,$$(CTEST_RUSTC_FLAGS ) )
628
640
ifndef CFG_DISABLE_OPTIMIZE_TESTS
629
641
CTEST_RUSTC_FLAGS += -O
630
642
endif
631
643
644
+
632
645
CTEST_COMMON_ARGS$(1 ) -T-$(2 ) -H-$(3 ) := \
633
646
--compile-lib-path $$(HLIB$(1 ) _H_$(3 ) ) \
634
647
--run-lib-path $$(TLIB$(1 ) _T_$(2 ) _H_$(3 ) ) \
@@ -650,6 +663,7 @@ CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \
650
663
$$(CTEST_TESTARGS )
651
664
652
665
CTEST_DEPS_rpass_$(1 ) -T-$(2 ) -H-$(3 ) = $$(RPASS_TESTS )
666
+ CTEST_DEPS_rpass-valgrind_$(1 ) -T-$(2 ) -H-$(3 ) = $$(RPASS_VALGRIND_TESTS )
653
667
CTEST_DEPS_rpass-full_$(1 ) -T-$(2 ) -H-$(3 ) = $$(RPASS_FULL_TESTS ) $$(CSREQ$(1 ) _T_$(3 ) _H_$(3 ) ) $$(SREQ$(1 ) _T_$(2 ) _H_$(3 ) )
654
668
CTEST_DEPS_cfail-full_$(1 ) -T-$(2 ) -H-$(3 ) = $$(CFAIL_FULL_TESTS ) $$(CSREQ$(1 ) _T_$(3 ) _H_$(3 ) ) $$(SREQ$(1 ) _T_$(2 ) _H_$(3 ) )
655
669
CTEST_DEPS_rfail_$(1 ) -T-$(2 ) -H-$(3 ) = $$(RFAIL_TESTS )
@@ -721,16 +735,17 @@ endif
721
735
722
736
endef
723
737
724
- CTEST_NAMES = rpass rpass-full cfail-full rfail cfail bench perf debuginfo-gdb debuginfo-lldb codegen
738
+ CTEST_NAMES = rpass rpass-valgrind rpass- full cfail-full rfail cfail bench perf debuginfo-gdb debuginfo-lldb codegen
725
739
726
740
$(foreach host,$(CFG_HOST), \
727
741
$(eval $(foreach target,$(CFG_TARGET), \
728
742
$(eval $(foreach stage,$(STAGES), \
729
743
$(eval $(foreach name,$(CTEST_NAMES), \
730
744
$(eval $(call DEF_RUN_COMPILETEST,$(stage),$(target),$(host),$(name))))))))))
731
745
732
- PRETTY_NAMES = pretty-rpass pretty-rpass-full pretty-rfail pretty-bench pretty-pretty
746
+ PRETTY_NAMES = pretty-rpass pretty-rpass-valgrind pretty-rpass- full pretty-rfail pretty-bench pretty-pretty
733
747
PRETTY_DEPS_pretty-rpass = $(RPASS_TESTS )
748
+ PRETTY_DEPS_pretty-rpass-valgrind = $(RPASS_VALGRIND_TESTS )
734
749
PRETTY_DEPS_pretty-rpass-full = $(RPASS_FULL_TESTS )
735
750
PRETTY_DEPS_pretty-rfail = $(RFAIL_TESTS )
736
751
PRETTY_DEPS_pretty-bench = $(BENCH_TESTS )
@@ -743,6 +758,7 @@ PRETTY_DEPS$(1)_H_$(3)_pretty-rfail =
743
758
PRETTY_DEPS$(1)_H_$(3)_pretty-bench =
744
759
PRETTY_DEPS$(1)_H_$(3)_pretty-pretty =
745
760
PRETTY_DIRNAME_pretty-rpass = run-pass
761
+ PRETTY_DIRNAME_pretty-rpass-valgrind = run-pass-valgrind
746
762
PRETTY_DIRNAME_pretty-rpass-full = run-pass-fulldeps
747
763
PRETTY_DIRNAME_pretty-rfail = run-fail
748
764
PRETTY_DIRNAME_pretty-bench = bench
@@ -890,6 +906,7 @@ TEST_GROUPS = \
890
906
$(foreach crate,$(TEST_CRATES ) ,$(crate ) ) \
891
907
$(foreach crate,$(TEST_DOC_CRATES ) ,doc-crate-$(crate ) ) \
892
908
rpass \
909
+ rpass-valgrind \
893
910
rpass-full \
894
911
cfail-full \
895
912
rfail \
@@ -904,6 +921,7 @@ TEST_GROUPS = \
904
921
$(foreach docname,$(DOCS ) ,doc-$(docname ) ) \
905
922
pretty \
906
923
pretty-rpass \
924
+ pretty-rpass-valgrind \
907
925
pretty-rpass-full \
908
926
pretty-rfail \
909
927
pretty-bench \
0 commit comments