Skip to content

Commit 1351461

Browse files
committed
---
yaml --- r: 151478 b: refs/heads/try2 c: 1868cf5 h: refs/heads/master v: v3
1 parent cf52540 commit 1351461

File tree

307 files changed

+6351
-8764
lines changed

Some content is hidden

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

307 files changed

+6351
-8764
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: a990920c6fff9b762c3d0968ff0a5fdcce6d2b39
8+
refs/heads/try2: 1868cf50736e76add8355f5104fe4fab437e8153
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/configure

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -466,26 +466,6 @@ probe CFG_PDFLATEX pdflatex
466466
probe CFG_XELATEX xelatex
467467
probe CFG_LUALATEX lualatex
468468
probe CFG_GDB gdb
469-
probe CFG_LLDB lldb
470-
471-
if [ ! -z "$CFG_LLDB" ]
472-
then
473-
# If CFG_LLDB_PYTHON_DIR is not already set from the outside and valid, try to read it from
474-
# LLDB via the -P commandline options.
475-
if [ -z "$CFG_LLDB_PYTHON_DIR" ] || [ ! -d "$CFG_LLDB_PYTHON_DIR" ]
476-
then
477-
CFG_LLDB_PYTHON_DIR=$($CFG_LLDB -P)
478-
479-
# If CFG_LLDB_PYTHON_DIR is not a valid directory, set it to something more readable
480-
if [ ! -d "$CFG_LLDB_PYTHON_DIR" ]
481-
then
482-
CFG_LLDB_PYTHON_DIR="LLDB_PYTHON_DIRECTORY_NOT_FOUND"
483-
fi
484-
485-
putvar CFG_LLDB_PYTHON_DIR
486-
fi
487-
fi
488-
489469
if [ "$CFG_OSTYPE" = "unknown-linux-gnu" ]
490470
then
491471
probe CFG_PAXCTL paxctl /sbin/paxctl
@@ -827,8 +807,7 @@ do
827807
make_dir $h/test/bench
828808
make_dir $h/test/perf
829809
make_dir $h/test/pretty
830-
make_dir $h/test/debuginfo-gdb
831-
make_dir $h/test/debuginfo-lldb
810+
make_dir $h/test/debug-info
832811
make_dir $h/test/codegen
833812
make_dir $h/test/doc-tutorial
834813
make_dir $h/test/doc-guide-ffi

branches/try2/mk/crates.mk

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
TARGET_CRATES := libc std green rustuv native flate arena glob term semver \
5353
uuid serialize sync getopts collections num test time rand \
5454
workcache url log regex graphviz core
55-
HOST_CRATES := syntax rustc rustdoc fourcc hexfloat regex_macros fmt_macros
55+
HOST_CRATES := syntax rustc rustdoc fourcc hexfloat regex_macros
5656
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
5757
TOOLS := compiletest rustdoc rustc
5858

@@ -61,7 +61,7 @@ DEPS_std := core libc native:rustrt native:compiler-rt native:backtrace
6161
DEPS_green := std rand native:context_switch
6262
DEPS_rustuv := std native:uv native:uv_support
6363
DEPS_native := std
64-
DEPS_syntax := std term serialize collections log fmt_macros
64+
DEPS_syntax := std term serialize collections log
6565
DEPS_rustc := syntax native:rustllvm flate arena serialize sync getopts \
6666
collections time log
6767
DEPS_rustdoc := rustc native:hoedown serialize sync getopts collections \
@@ -88,7 +88,6 @@ DEPS_workcache := std serialize collections log
8888
DEPS_log := std sync
8989
DEPS_regex := std collections
9090
DEPS_regex_macros = syntax std regex
91-
DEPS_fmt_macros = std
9291

9392
TOOL_DEPS_compiletest := test green rustuv getopts
9493
TOOL_DEPS_rustdoc := rustdoc native

branches/try2/mk/prepare.mk

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,7 @@ prepare-host-lib-$(1)-$(2)-$(3)-$(4): prepare-maybe-clean-$(4) \
106106
prepare-host-dirs-$(4)
107107
$$(if $$(findstring $(2), $$(PREPARE_STAGE)),\
108108
$$(if $$(findstring $(3), $$(PREPARE_HOST)),\
109-
$$(if $$(findstring 1,$$(ONLY_RLIB_$(1))),,\
110-
$$(call PREPARE_LIB,$$(call CFG_LIB_GLOB_$$(PREPARE_HOST),$(1)))),),)
109+
$$(call PREPARE_LIB,$$(call CFG_LIB_GLOB_$$(PREPARE_HOST),$(1))),),)
111110
endef
112111

113112

@@ -134,8 +133,7 @@ prepare-target-$(2)-host-$(3)-$(1)-$(4): prepare-maybe-clean-$(4) \
134133
$$(if $$(findstring $(3), $$(PREPARE_HOST)),\
135134
$$(call PREPARE_DIR,$$(PREPARE_WORKING_DEST_LIB_DIR))\
136135
$$(foreach crate,$$(TARGET_CRATES),\
137-
$$(if $$(findstring 1, $$(ONLY_RLIB_$$(crate))),,\
138-
$$(call PREPARE_LIB,$$(call CFG_LIB_GLOB_$(2),$$(crate))))\
136+
$$(call PREPARE_LIB,$$(call CFG_LIB_GLOB_$(2),$$(crate)))\
139137
$$(call PREPARE_LIB,$$(call CFG_RLIB_GLOB,$$(crate))))\
140138
$$(if $$(findstring $(2),$$(CFG_HOST)),\
141139
$$(foreach crate,$$(HOST_CRATES),\

branches/try2/mk/tests.mk

Lines changed: 12 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,7 @@ check-stage$(1)-T-$(2)-H-$(3)-exec: \
293293
check-stage$(1)-T-$(2)-H-$(3)-crates-exec \
294294
check-stage$(1)-T-$(2)-H-$(3)-doc-crates-exec \
295295
check-stage$(1)-T-$(2)-H-$(3)-bench-exec \
296-
check-stage$(1)-T-$(2)-H-$(3)-debuginfo-gdb-exec \
297-
check-stage$(1)-T-$(2)-H-$(3)-debuginfo-lldb-exec \
296+
check-stage$(1)-T-$(2)-H-$(3)-debuginfo-exec \
298297
check-stage$(1)-T-$(2)-H-$(3)-codegen-exec \
299298
check-stage$(1)-T-$(2)-H-$(3)-doc-exec \
300299
check-stage$(1)-T-$(2)-H-$(3)-pretty-exec
@@ -461,8 +460,7 @@ CFAIL_RC := $(wildcard $(S)src/test/compile-fail/*.rc)
461460
CFAIL_RS := $(wildcard $(S)src/test/compile-fail/*.rs)
462461
BENCH_RS := $(wildcard $(S)src/test/bench/*.rs)
463462
PRETTY_RS := $(wildcard $(S)src/test/pretty/*.rs)
464-
DEBUGINFO_GDB_RS := $(wildcard $(S)src/test/debuginfo/*.rs)
465-
DEBUGINFO_LLDB_RS := $(wildcard $(S)src/test/debuginfo/*.rs)
463+
DEBUGINFO_RS := $(wildcard $(S)src/test/debug-info/*.rs)
466464
CODEGEN_RS := $(wildcard $(S)src/test/codegen/*.rs)
467465
CODEGEN_CC := $(wildcard $(S)src/test/codegen/*.cc)
468466

@@ -478,8 +476,7 @@ CFAIL_TESTS := $(CFAIL_RC) $(CFAIL_RS)
478476
BENCH_TESTS := $(BENCH_RS)
479477
PERF_TESTS := $(PERF_RS)
480478
PRETTY_TESTS := $(PRETTY_RS)
481-
DEBUGINFO_GDB_TESTS := $(DEBUGINFO_GDB_RS)
482-
DEBUGINFO_LLDB_TESTS := $(DEBUGINFO_LLDB_RS)
479+
DEBUGINFO_TESTS := $(DEBUGINFO_RS)
483480
CODEGEN_TESTS := $(CODEGEN_RS) $(CODEGEN_CC)
484481

485482
CTEST_SRC_BASE_rpass = run-pass
@@ -517,15 +514,10 @@ CTEST_BUILD_BASE_perf = perf
517514
CTEST_MODE_perf = run-pass
518515
CTEST_RUNTOOL_perf = $(CTEST_PERF_RUNTOOL)
519516

520-
CTEST_SRC_BASE_debuginfo-gdb = debuginfo
521-
CTEST_BUILD_BASE_debuginfo-gdb = debuginfo-gdb
522-
CTEST_MODE_debuginfo-gdb = debuginfo-gdb
523-
CTEST_RUNTOOL_debuginfo-gdb = $(CTEST_RUNTOOL)
524-
525-
CTEST_SRC_BASE_debuginfo-lldb = debuginfo
526-
CTEST_BUILD_BASE_debuginfo-lldb = debuginfo-lldb
527-
CTEST_MODE_debuginfo-lldb = debuginfo-lldb
528-
CTEST_RUNTOOL_debuginfo-lldb = $(CTEST_RUNTOOL)
517+
CTEST_SRC_BASE_debuginfo = debug-info
518+
CTEST_BUILD_BASE_debuginfo = debug-info
519+
CTEST_MODE_debuginfo = debug-info
520+
CTEST_RUNTOOL_debuginfo = $(CTEST_RUNTOOL)
529521

530522
CTEST_SRC_BASE_codegen = codegen
531523
CTEST_BUILD_BASE_codegen = codegen
@@ -537,22 +529,15 @@ CTEST_RUNTOOL_codegen = $(CTEST_RUNTOOL)
537529
# during attempts to run those tests.
538530

539531
ifeq ($(CFG_GDB),)
540-
CTEST_DISABLE_debuginfo-gdb = "no gdb found"
541-
endif
542-
543-
ifeq ($(CFG_LLDB),)
544-
CTEST_DISABLE_debuginfo-lldb = "no lldb found"
532+
CTEST_DISABLE_debuginfo = "no gdb found"
545533
endif
546534

547-
# Completely disable LLDB tests for now
548-
CTEST_DISABLE_debuginfo-lldb = "LLDB tests are not enabled yet"
549-
550535
ifeq ($(CFG_CLANG),)
551536
CTEST_DISABLE_codegen = "no clang found"
552537
endif
553538

554539
ifeq ($(CFG_OSTYPE),apple-darwin)
555-
CTEST_DISABLE_debuginfo-gdb = "gdb on darwing needs root"
540+
CTEST_DISABLE_debuginfo = "gdb on darwing needs root"
556541
endif
557542

558543
# CTEST_DISABLE_NONSELFHOST_$(TEST_GROUP), if set, will cause that
@@ -602,7 +587,6 @@ CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \
602587
--adb-path=$(CFG_ADB) \
603588
--adb-test-dir=$(CFG_ADB_TEST_DIR) \
604589
--host-rustcflags "$(RUSTC_FLAGS_$(3)) $$(CTEST_RUSTC_FLAGS) -L $$(RT_OUTPUT_DIR_$(3))" \
605-
--lldb-python-dir=$(CFG_LLDB_PYTHON_DIR) \
606590
--target-rustcflags "$(RUSTC_FLAGS_$(2)) $$(CTEST_RUSTC_FLAGS) -L $$(RT_OUTPUT_DIR_$(2))" \
607591
$$(CTEST_TESTARGS)
608592

@@ -613,8 +597,7 @@ CTEST_DEPS_rfail_$(1)-T-$(2)-H-$(3) = $$(RFAIL_TESTS)
613597
CTEST_DEPS_cfail_$(1)-T-$(2)-H-$(3) = $$(CFAIL_TESTS)
614598
CTEST_DEPS_bench_$(1)-T-$(2)-H-$(3) = $$(BENCH_TESTS)
615599
CTEST_DEPS_perf_$(1)-T-$(2)-H-$(3) = $$(PERF_TESTS)
616-
CTEST_DEPS_debuginfo-gdb_$(1)-T-$(2)-H-$(3) = $$(DEBUGINFO_GDB_TESTS)
617-
CTEST_DEPS_debuginfo-lldb_$(1)-T-$(2)-H-$(3) = $$(DEBUGINFO_LLDB_TESTS)
600+
CTEST_DEPS_debuginfo_$(1)-T-$(2)-H-$(3) = $$(DEBUGINFO_TESTS)
618601
CTEST_DEPS_codegen_$(1)-T-$(2)-H-$(3) = $$(CODEGEN_TESTS)
619602

620603
endef
@@ -678,7 +661,7 @@ endif
678661

679662
endef
680663

681-
CTEST_NAMES = rpass rpass-full cfail-full rfail cfail bench perf debuginfo-gdb debuginfo-lldb codegen
664+
CTEST_NAMES = rpass rpass-full cfail-full rfail cfail bench perf debuginfo codegen
682665

683666
$(foreach host,$(CFG_HOST), \
684667
$(eval $(foreach target,$(CFG_TARGET), \
@@ -827,8 +810,7 @@ TEST_GROUPS = \
827810
bench \
828811
perf \
829812
rmake \
830-
debuginfo-gdb \
831-
debuginfo-lldb \
813+
debuginfo \
832814
codegen \
833815
doc \
834816
$(foreach docname,$(DOCS),doc-$(docname)) \

branches/try2/src/compiletest/common.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ pub enum mode {
1414
mode_run_fail,
1515
mode_run_pass,
1616
mode_pretty,
17-
mode_debug_info_gdb,
18-
mode_debug_info_lldb,
17+
mode_debug_info,
1918
mode_codegen
2019
}
2120

@@ -102,9 +101,6 @@ pub struct config {
102101
// status whether android device available or not
103102
pub adb_device_status: bool,
104103

105-
// the path containing LLDB's Python module
106-
pub lldb_python_dir: Option<~str>,
107-
108104
// Explain what's going on
109105
pub verbose: bool
110106

branches/try2/src/compiletest/compiletest.rs

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,14 @@ use std::os;
2828
use std::io;
2929
use std::io::fs;
3030
use getopts::{optopt, optflag, reqopt};
31-
use common::{config, mode_run_pass, mode_run_fail, mode_compile_fail, mode_pretty,
32-
mode_debug_info_gdb, mode_debug_info_lldb, mode_codegen, mode};
31+
use common::config;
32+
use common::mode_run_pass;
33+
use common::mode_run_fail;
34+
use common::mode_compile_fail;
35+
use common::mode_pretty;
36+
use common::mode_debug_info;
37+
use common::mode_codegen;
38+
use common::mode;
3339
use util::logv;
3440

3541
pub mod procsrv;
@@ -81,7 +87,6 @@ pub fn parse_config(args: Vec<~str> ) -> config {
8187
optopt("", "host", "the host to build for", "HOST"),
8288
optopt("", "adb-path", "path to the android debugger", "PATH"),
8389
optopt("", "adb-test-dir", "path to tests for the android debugger", "PATH"),
84-
optopt("", "lldb-python-dir", "directory containing LLDB's python module", "PATH"),
8590
optopt("", "test-shard", "run shard A, of B shards, worth of the testsuite", "A.B"),
8691
optflag("h", "help", "show this message"));
8792

@@ -149,7 +154,6 @@ pub fn parse_config(args: Vec<~str> ) -> config {
149154
"arm-linux-androideabi" == opt_str2(matches.opt_str("target")) &&
150155
"(none)" != opt_str2(matches.opt_str("adb-test-dir")) &&
151156
!opt_str2(matches.opt_str("adb-test-dir")).is_empty(),
152-
lldb_python_dir: matches.opt_str("lldb-python-dir"),
153157
test_shard: test::opt_shard(matches.opt_str("test-shard")),
154158
verbose: matches.opt_present("verbose")
155159
}
@@ -200,14 +204,13 @@ pub fn opt_str2(maybestr: Option<~str>) -> ~str {
200204

201205
pub fn str_mode(s: ~str) -> mode {
202206
match s.as_slice() {
203-
"compile-fail" => mode_compile_fail,
204-
"run-fail" => mode_run_fail,
205-
"run-pass" => mode_run_pass,
206-
"pretty" => mode_pretty,
207-
"debuginfo-gdb" => mode_debug_info_gdb,
208-
"debuginfo-lldb" => mode_debug_info_lldb,
209-
"codegen" => mode_codegen,
210-
s => fail!("invalid mode: " + s)
207+
"compile-fail" => mode_compile_fail,
208+
"run-fail" => mode_run_fail,
209+
"run-pass" => mode_run_pass,
210+
"pretty" => mode_pretty,
211+
"debug-info" => mode_debug_info,
212+
"codegen" => mode_codegen,
213+
_ => fail!("invalid mode")
211214
}
212215
}
213216

@@ -217,16 +220,15 @@ pub fn mode_str(mode: mode) -> ~str {
217220
mode_run_fail => "run-fail".to_owned(),
218221
mode_run_pass => "run-pass".to_owned(),
219222
mode_pretty => "pretty".to_owned(),
220-
mode_debug_info_gdb => "debuginfo-gdb".to_owned(),
221-
mode_debug_info_lldb => "debuginfo-lldb".to_owned(),
223+
mode_debug_info => "debug-info".to_owned(),
222224
mode_codegen => "codegen".to_owned(),
223225
}
224226
}
225227

226228
pub fn run_tests(config: &config) {
227229
if config.target == "arm-linux-androideabi".to_owned() {
228230
match config.mode{
229-
mode_debug_info_gdb => {
231+
mode_debug_info => {
230232
println!("arm-linux-androideabi debug-info \
231233
test uses tcp 5039 port. please reserve it");
232234
}

branches/try2/src/compiletest/header.rs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ pub struct TestProps {
2626
pub aux_builds: Vec<~str> ,
2727
// Environment settings to use during execution
2828
pub exec_env: Vec<(~str,~str)> ,
29+
// Commands to be given to the debugger, when testing debug info
30+
pub debugger_cmds: Vec<~str> ,
2931
// Lines to check if they appear in the expected debugger output
3032
pub check_lines: Vec<~str> ,
3133
// Flag to force a crate to be built with the host architecture
@@ -44,6 +46,7 @@ pub fn load_props(testfile: &Path) -> TestProps {
4446
let mut compile_flags = None;
4547
let mut run_flags = None;
4648
let mut pp_exact = None;
49+
let mut debugger_cmds = Vec::new();
4750
let mut check_lines = Vec::new();
4851
let mut force_host = false;
4952
let mut check_stdout = false;
@@ -88,6 +91,11 @@ pub fn load_props(testfile: &Path) -> TestProps {
8891
None => {}
8992
}
9093

94+
match parse_debugger_cmd(ln) {
95+
Some(dc) => debugger_cmds.push(dc),
96+
None => ()
97+
};
98+
9199
match parse_check_line(ln) {
92100
Some(cl) => check_lines.push(cl),
93101
None => ()
@@ -103,6 +111,7 @@ pub fn load_props(testfile: &Path) -> TestProps {
103111
pp_exact: pp_exact,
104112
aux_builds: aux_builds,
105113
exec_env: exec_env,
114+
debugger_cmds: debugger_cmds,
106115
check_lines: check_lines,
107116
force_host: force_host,
108117
check_stdout: check_stdout,
@@ -164,6 +173,10 @@ fn parse_run_flags(line: &str) -> Option<~str> {
164173
parse_name_value_directive(line, "run-flags".to_owned())
165174
}
166175

176+
fn parse_debugger_cmd(line: &str) -> Option<~str> {
177+
parse_name_value_directive(line, "debugger".to_owned())
178+
}
179+
167180
fn parse_check_line(line: &str) -> Option<~str> {
168181
parse_name_value_directive(line, "check".to_owned())
169182
}
@@ -213,7 +226,7 @@ fn parse_name_directive(line: &str, directive: &str) -> bool {
213226
line.contains(directive)
214227
}
215228

216-
pub fn parse_name_value_directive(line: &str,
229+
fn parse_name_value_directive(line: &str,
217230
directive: ~str) -> Option<~str> {
218231
let keycolon = directive + ":";
219232
match line.find_str(keycolon) {

0 commit comments

Comments
 (0)