Skip to content

Commit cf788b5

Browse files
author
John Kleint
committed
---
yaml --- r: 157458 b: refs/heads/snap-stage3 c: f0b7065 h: refs/heads/master v: v3
1 parent 3dd4a14 commit cf788b5

File tree

242 files changed

+2355
-3869
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

242 files changed

+2355
-3869
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 065caf34f5ff29e04605f95d9c5d511af219439a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: a34b8dec697014f15e725215e17ea8d956c0ab1a
4+
refs/heads/snap-stage3: f0b7065e6f2d8dcd64c536bb4ce3066186850a09
55
refs/heads/try: 0ee4d8b0b112c608646fa75463ab4dc59132efd9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/configure

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,6 @@ VAL_OPTIONS=""
411411

412412
opt valgrind 0 "run tests with valgrind (memcheck by default)"
413413
opt helgrind 0 "run tests with helgrind instead of memcheck"
414-
opt valgrind-rpass 1 "run rpass-valgrind tests with valgrind"
415414
opt docs 1 "build documentation"
416415
opt optimize 1 "build optimized rust code"
417416
opt optimize-cxx 1 "build optimized C++ code"
@@ -907,7 +906,6 @@ do
907906
done
908907

909908
make_dir $h/test/run-pass
910-
make_dir $h/test/run-pass-valgrind
911909
make_dir $h/test/run-pass-fulldeps
912910
make_dir $h/test/run-fail
913911
make_dir $h/test/compile-fail
@@ -1237,6 +1235,15 @@ then
12371235
putvar CFG_PANDOC
12381236
fi
12391237

1238+
# Valgrind is only reliable on Linux. On Windows it doesn't work at all, and
1239+
# on the Mac the dynamic linker causes Valgrind to emit a huge stream of
1240+
# errors.
1241+
if [ $CFG_OSTYPE != unknown-linux-gnu ] && [ $CFG_OSTYPE != apple-darwin ]
1242+
then
1243+
CFG_BAD_VALGRIND=1
1244+
putvar CFG_BAD_VALGRIND
1245+
fi
1246+
12401247
putvar CFG_LLVM_ROOT
12411248
putvar CFG_LLVM_SRC_DIR
12421249

branches/snap-stage3/mk/main.mk

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -157,13 +157,6 @@ RUSTFLAGS_STAGE1 += -C prefer-dynamic
157157
# by not emitting them.
158158
RUSTFLAGS_STAGE0 += -Z no-landing-pads
159159

160-
# Go fast for stage0, and also for stage1/stage2 if optimization is off.
161-
RUSTFLAGS_STAGE0 += -C codegen-units=4
162-
ifdef CFG_DISABLE_OPTIMIZE
163-
RUSTFLAGS_STAGE1 += -C codegen-units=4
164-
RUSTFLAGS_STAGE2 += -C codegen-units=4
165-
endif
166-
167160
# platform-specific auto-configuration
168161
include $(CFG_SRC_DIR)mk/platform.mk
169162

@@ -174,20 +167,16 @@ else
174167
CFG_VALGRIND_COMPILE :=
175168
endif
176169

177-
178-
ifndef CFG_DISABLE_VALGRIND_RPASS
179-
$(info cfg: enabling valgrind run-pass tests (CFG_ENABLE_VALGRIND_RPASS))
180-
CFG_VALGRIND_RPASS :=$(CFG_VALGRIND)
181-
else
182-
CFG_VALGRIND_RPASS :=
183-
endif
184-
185-
186170
ifdef CFG_ENABLE_VALGRIND
187171
$(info cfg: enabling valgrind (CFG_ENABLE_VALGRIND))
188172
else
189173
CFG_VALGRIND :=
190174
endif
175+
ifdef CFG_BAD_VALGRIND
176+
$(info cfg: disabling valgrind due to its unreliability on this platform)
177+
CFG_VALGRIND :=
178+
endif
179+
191180

192181
######################################################################
193182
# Target-and-rule "utility variables"

branches/snap-stage3/mk/platform.mk

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -58,20 +58,6 @@ ifdef CFG_VALGRIND
5858
endif
5959
endif
6060

61-
# If we actually want to run Valgrind on a given platform, set this variable
62-
define DEF_GOOD_VALGRIND
63-
ifeq ($(OSTYPE_$(1)),unknown-linux-gnu)
64-
GOOD_VALGRIND_$(1) = 1
65-
endif
66-
ifneq (,$(filter $(OSTYPE_$(1)),darwin freebsd))
67-
ifeq (HOST_$(1),x86_64)
68-
GOOD_VALGRIND_$(1) = 1
69-
endif
70-
endif
71-
endef
72-
$(foreach t,$(CFG_TARGET),$(eval $(call DEF_GOOD_VALGRIND,$(t))))
73-
$(foreach t,$(CFG_TARGET),$(info cfg: good valgrind for $(t) is $(GOOD_VALGRIND_$(t))))
74-
7561
ifneq ($(findstring linux,$(CFG_OSTYPE)),)
7662
ifdef CFG_PERF
7763
ifneq ($(CFG_PERF_WITH_LOGFD),)

branches/snap-stage3/mk/tests.mk

Lines changed: 20 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
1+
# Copyright 2012 The Rust Project Developers. See the COPYRIGHT
22
# file at the top-level directory of this distribution and at
33
# http://rust-lang.org/COPYRIGHT.
44
#
@@ -184,12 +184,12 @@ check-notidy: cleantmptestlogs cleantestlibs all check-stage2
184184
# A slightly smaller set of tests for smoke testing.
185185
check-lite: cleantestlibs cleantmptestlogs \
186186
$(foreach crate,$(TEST_TARGET_CRATES),check-stage2-$(crate)) \
187-
check-stage2-rpass check-stage2-rpass-valgrind \
187+
check-stage2-rpass \
188188
check-stage2-rfail check-stage2-cfail check-stage2-rmake
189189
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
190190

191191
# Only check the 'reference' tests: rpass/cfail/rfail/rmake.
192-
check-ref: cleantestlibs cleantmptestlogs check-stage2-rpass check-stage2-rpass-valgrind \
192+
check-ref: cleantestlibs cleantmptestlogs check-stage2-rpass \
193193
check-stage2-rfail check-stage2-cfail check-stage2-rmake
194194
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
195195

@@ -326,8 +326,7 @@ check-stage$(1)-T-$(2)-H-$(3)-exec: \
326326
check-stage$(1)-T-$(2)-H-$(3)-rpass-exec \
327327
check-stage$(1)-T-$(2)-H-$(3)-rfail-exec \
328328
check-stage$(1)-T-$(2)-H-$(3)-cfail-exec \
329-
check-stage$(1)-T-$(2)-H-$(3)-rpass-valgrind-exec \
330-
check-stage$(1)-T-$(2)-H-$(3)-rpass-full-exec \
329+
check-stage$(1)-T-$(2)-H-$(3)-rpass-full-exec \
331330
check-stage$(1)-T-$(2)-H-$(3)-cfail-full-exec \
332331
check-stage$(1)-T-$(2)-H-$(3)-rmake-exec \
333332
check-stage$(1)-T-$(2)-H-$(3)-crates-exec \
@@ -365,7 +364,6 @@ check-stage$(1)-T-$(2)-H-$(3)-doc-exec: \
365364

366365
check-stage$(1)-T-$(2)-H-$(3)-pretty-exec: \
367366
check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass-exec \
368-
check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass-valgrind-exec \
369367
check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass-full-exec \
370368
check-stage$(1)-T-$(2)-H-$(3)-pretty-rfail-exec \
371369
check-stage$(1)-T-$(2)-H-$(3)-pretty-bench-exec \
@@ -491,11 +489,15 @@ $(foreach host,$(CFG_HOST), \
491489
# Rules for the compiletest tests (rpass, rfail, etc.)
492490
######################################################################
493491

492+
RPASS_RC := $(wildcard $(S)src/test/run-pass/*.rc)
494493
RPASS_RS := $(wildcard $(S)src/test/run-pass/*.rs)
495-
RPASS_VALGRIND_RS := $(wildcard $(S)src/test/run-pass-valgrind/*.rs)
494+
RPASS_FULL_RC := $(wildcard $(S)src/test/run-pass-fulldeps/*.rc)
496495
RPASS_FULL_RS := $(wildcard $(S)src/test/run-pass-fulldeps/*.rs)
496+
CFAIL_FULL_RC := $(wildcard $(S)src/test/compile-fail-fulldeps/*.rc)
497497
CFAIL_FULL_RS := $(wildcard $(S)src/test/compile-fail-fulldeps/*.rs)
498+
RFAIL_RC := $(wildcard $(S)src/test/run-fail/*.rc)
498499
RFAIL_RS := $(wildcard $(S)src/test/run-fail/*.rs)
500+
CFAIL_RC := $(wildcard $(S)src/test/compile-fail/*.rc)
499501
CFAIL_RS := $(wildcard $(S)src/test/compile-fail/*.rs)
500502
BENCH_RS := $(wildcard $(S)src/test/bench/*.rs)
501503
PRETTY_RS := $(wildcard $(S)src/test/pretty/*.rs)
@@ -508,12 +510,11 @@ CODEGEN_CC := $(wildcard $(S)src/test/codegen/*.cc)
508510
# a performance monitor.
509511
PERF_RS := $(wildcard $(S)src/test/bench/*.rs)
510512

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)
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)
517518
BENCH_TESTS := $(BENCH_RS)
518519
PERF_TESTS := $(PERF_RS)
519520
PRETTY_TESTS := $(PRETTY_RS)
@@ -526,11 +527,6 @@ CTEST_BUILD_BASE_rpass = run-pass
526527
CTEST_MODE_rpass = run-pass
527528
CTEST_RUNTOOL_rpass = $(CTEST_RUNTOOL)
528529

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-
534530
CTEST_SRC_BASE_rpass-full = run-pass-fulldeps
535531
CTEST_BUILD_BASE_rpass-full = run-pass-fulldeps
536532
CTEST_MODE_rpass-full = run-pass
@@ -588,14 +584,13 @@ ifeq ($(CFG_LLDB),)
588584
CTEST_DISABLE_debuginfo-lldb = "no lldb found"
589585
endif
590586

587+
# Completely disable LLDB tests for now
588+
CTEST_DISABLE_debuginfo-lldb = "LLDB tests are not enabled yet"
589+
591590
ifeq ($(CFG_CLANG),)
592591
CTEST_DISABLE_codegen = "no clang found"
593592
endif
594593

595-
ifneq ($(CFG_OSTYPE),apple-darwin)
596-
CTEST_DISABLE_debuginfo-lldb = "lldb tests are only run on darwin"
597-
endif
598-
599594
ifeq ($(CFG_OSTYPE),apple-darwin)
600595
CTEST_DISABLE_debuginfo-gdb = "gdb on darwing needs root"
601596
endif
@@ -626,18 +621,13 @@ TEST_SREQ$(1)_T_$(2)_H_$(3) = \
626621
# remove directive, if present, from CFG_RUSTC_FLAGS (issue #7898).
627622
CTEST_RUSTC_FLAGS := $$(subst --cfg ndebug,,$$(CFG_RUSTC_FLAGS))
628623

629-
# The tests cannot be optimized while the rest of the compiler is optimized, so
624+
# The tests can not be optimized while the rest of the compiler is optimized, so
630625
# filter out the optimization (if any) from rustc and then figure out if we need
631626
# to be optimized
632627
CTEST_RUSTC_FLAGS := $$(subst -O,,$$(CTEST_RUSTC_FLAGS))
633628
ifndef CFG_DISABLE_OPTIMIZE_TESTS
634629
CTEST_RUSTC_FLAGS += -O
635630
endif
636-
# Force codegen-units=1 for compiletest tests. compiletest does its own
637-
# parallelization internally, so rustc's default codegen-units=2 will actually
638-
# slow things down.
639-
CTEST_RUSTC_FLAGS += -C codegen-units=1
640-
641631

642632
CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \
643633
--compile-lib-path $$(HLIB$(1)_H_$(3)) \
@@ -659,21 +649,7 @@ CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \
659649
--target-rustcflags "$(RUSTC_FLAGS_$(2)) $$(CTEST_RUSTC_FLAGS) -L $$(RT_OUTPUT_DIR_$(2))" \
660650
$$(CTEST_TESTARGS)
661651

662-
ifdef CFG_VALGRIND_RPASS
663-
ifdef GOOD_VALGRIND_$(2)
664-
$(info cfg: valgrind-path set to $(CFG_VALGRIND_RPASS))
665-
CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) += --valgrind-path "$(CFG_VALGRIND_RPASS)"
666-
endif
667-
endif
668-
669-
ifndef CFG_DISABLE_VALGRIND_RPASS
670-
ifdef GOOD_VALGRIND_$(2)
671-
CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) += --force-valgrind
672-
endif
673-
endif
674-
675652
CTEST_DEPS_rpass_$(1)-T-$(2)-H-$(3) = $$(RPASS_TESTS)
676-
CTEST_DEPS_rpass-valgrind_$(1)-T-$(2)-H-$(3) = $$(RPASS_VALGRIND_TESTS)
677653
CTEST_DEPS_rpass-full_$(1)-T-$(2)-H-$(3) = $$(RPASS_FULL_TESTS) $$(CSREQ$(1)_T_$(3)_H_$(3)) $$(SREQ$(1)_T_$(2)_H_$(3))
678654
CTEST_DEPS_cfail-full_$(1)-T-$(2)-H-$(3) = $$(CFAIL_FULL_TESTS) $$(CSREQ$(1)_T_$(3)_H_$(3)) $$(SREQ$(1)_T_$(2)_H_$(3))
679655
CTEST_DEPS_rfail_$(1)-T-$(2)-H-$(3) = $$(RFAIL_TESTS)
@@ -745,17 +721,16 @@ endif
745721

746722
endef
747723

748-
CTEST_NAMES = rpass rpass-valgrind rpass-full cfail-full rfail cfail bench perf debuginfo-gdb debuginfo-lldb codegen
724+
CTEST_NAMES = rpass rpass-full cfail-full rfail cfail bench perf debuginfo-gdb debuginfo-lldb codegen
749725

750726
$(foreach host,$(CFG_HOST), \
751727
$(eval $(foreach target,$(CFG_TARGET), \
752728
$(eval $(foreach stage,$(STAGES), \
753729
$(eval $(foreach name,$(CTEST_NAMES), \
754730
$(eval $(call DEF_RUN_COMPILETEST,$(stage),$(target),$(host),$(name))))))))))
755731

756-
PRETTY_NAMES = pretty-rpass pretty-rpass-valgrind pretty-rpass-full pretty-rfail pretty-bench pretty-pretty
732+
PRETTY_NAMES = pretty-rpass pretty-rpass-full pretty-rfail pretty-bench pretty-pretty
757733
PRETTY_DEPS_pretty-rpass = $(RPASS_TESTS)
758-
PRETTY_DEPS_pretty-rpass-valgrind = $(RPASS_VALGRIND_TESTS)
759734
PRETTY_DEPS_pretty-rpass-full = $(RPASS_FULL_TESTS)
760735
PRETTY_DEPS_pretty-rfail = $(RFAIL_TESTS)
761736
PRETTY_DEPS_pretty-bench = $(BENCH_TESTS)
@@ -768,7 +743,6 @@ PRETTY_DEPS$(1)_H_$(3)_pretty-rfail =
768743
PRETTY_DEPS$(1)_H_$(3)_pretty-bench =
769744
PRETTY_DEPS$(1)_H_$(3)_pretty-pretty =
770745
PRETTY_DIRNAME_pretty-rpass = run-pass
771-
PRETTY_DIRNAME_pretty-rpass-valgrind = run-pass-valgrind
772746
PRETTY_DIRNAME_pretty-rpass-full = run-pass-fulldeps
773747
PRETTY_DIRNAME_pretty-rfail = run-fail
774748
PRETTY_DIRNAME_pretty-bench = bench
@@ -916,7 +890,6 @@ TEST_GROUPS = \
916890
$(foreach crate,$(TEST_CRATES),$(crate)) \
917891
$(foreach crate,$(TEST_DOC_CRATES),doc-crate-$(crate)) \
918892
rpass \
919-
rpass-valgrind \
920893
rpass-full \
921894
cfail-full \
922895
rfail \
@@ -931,7 +904,6 @@ TEST_GROUPS = \
931904
$(foreach docname,$(DOCS),doc-$(docname)) \
932905
pretty \
933906
pretty-rpass \
934-
pretty-rpass-valgrind \
935907
pretty-rpass-full \
936908
pretty-rfail \
937909
pretty-bench \

branches/snap-stage3/src/compiletest/common.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ pub enum Mode {
1717
CompileFail,
1818
RunFail,
1919
RunPass,
20-
RunPassValgrind,
2120
Pretty,
2221
DebugInfoGdb,
2322
DebugInfoLldb,
@@ -30,7 +29,6 @@ impl FromStr for Mode {
3029
"compile-fail" => Some(CompileFail),
3130
"run-fail" => Some(RunFail),
3231
"run-pass" => Some(RunPass),
33-
"run-pass-valgrind" => Some(RunPassValgrind),
3432
"pretty" => Some(Pretty),
3533
"debuginfo-lldb" => Some(DebugInfoLldb),
3634
"debuginfo-gdb" => Some(DebugInfoGdb),
@@ -46,7 +44,6 @@ impl fmt::Show for Mode {
4644
CompileFail => "compile-fail",
4745
RunFail => "run-fail",
4846
RunPass => "run-pass",
49-
RunPassValgrind => "run-pass-valgrind",
5047
Pretty => "pretty",
5148
DebugInfoGdb => "debuginfo-gdb",
5249
DebugInfoLldb => "debuginfo-lldb",
@@ -73,13 +70,6 @@ pub struct Config {
7370
// The llvm binaries path
7471
pub llvm_bin_path: Option<Path>,
7572

76-
// The valgrind path
77-
pub valgrind_path: Option<String>,
78-
79-
// Whether to fail if we can't run run-pass-valgrind tests under valgrind
80-
// (or, alternatively, to silently run them like regular run-pass tests).
81-
pub force_valgrind: bool,
82-
8373
// The directory containing the tests to run
8474
pub src_base: Path,
8575

0 commit comments

Comments
 (0)