Skip to content

Commit 621382f

Browse files
committed
---
yaml --- r: 147346 b: refs/heads/try2 c: d4825b9 h: refs/heads/master v: v3
1 parent 297b3d4 commit 621382f

Some content is hidden

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

60 files changed

+1240
-977
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: b760ed6573aae61922ecdeeae75cc0a175c58e00
8+
refs/heads/try2: d4825b92bc6405b83e989522ee420f7c0110be81
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: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -910,11 +910,9 @@ do
910910
# Try to have LLVM pull in as few dependencies as possible (#9397)
911911
LLVM_OPTS="$LLVM_OPTS --disable-zlib --disable-libffi"
912912

913-
# Use win32 native thread/lock apis instead of pthread wrapper.
914-
# (llvm's configure tries to find pthread first, so we have to disable it explicitly.)
915-
# Also note that pthreads works badly on mingw-w64 systems: #8996
913+
# pthreads works badly on mingw-w64 systems: #8996
916914
case "$CFG_BUILD" in
917-
(*-mingw32)
915+
(*w64-mingw32)
918916
LLVM_OPTS="$LLVM_OPTS --disable-pthreads"
919917
;;
920918
esac

branches/try2/mk/llvm.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ $(S)src/librustc/lib/llvmdeps.rs: \
5151
$(LLVM_CONFIGS) \
5252
$(S)src/etc/mklldeps.py
5353
$(Q)$(CFG_PYTHON) $(S)src/etc/mklldeps.py \
54-
"$@" "$(LLVM_COMPONENTS)" $(LLVM_CONFIGS)
54+
"$(LLVM_COMPONENTS)" $(LLVM_CONFIGS) \
55+
> $@
5556

5657
$(foreach host,$(CFG_HOST), \
5758
$(eval $(call DEF_LLVM_RULES,$(host))))

branches/try2/mk/tests.mk

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,16 @@ $(foreach target,$(CFG_TARGET), \
133133
$(if $(findstring $(target),"arm-linux-androideabi"), \
134134
$(if $(findstring adb,$(CFG_ADB)), \
135135
$(if $(findstring device,$(shell $(CFG_ADB) devices 2>/dev/null | grep -E '^[_A-Za-z0-9-]+[[:blank:]]+device')), \
136-
$(info check: android device attached) \
137-
$(eval $(call DEF_ADB_DEVICE_STATUS, true)), \
138-
$(info check: android device not attached) \
139-
$(eval $(call DEF_ADB_DEVICE_STATUS, false)) \
136+
$(info check: $(target) test enabled \
137+
$(info check: android device attached) \
138+
$(eval $(call DEF_ADB_DEVICE_STATUS, true))), \
139+
$(info check: $(target) test disabled \
140+
$(info check: android device not attached) \
141+
$(eval $(call DEF_ADB_DEVICE_STATUS, false))) \
140142
), \
141-
$(info check: adb not found) \
142-
$(eval $(call DEF_ADB_DEVICE_STATUS, false)) \
143+
$(info check: $(target) test disabled \
144+
$(info check: adb not found) \
145+
$(eval $(call DEF_ADB_DEVICE_STATUS, false))) \
143146
), \
144147
) \
145148
)
@@ -448,8 +451,8 @@ check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4
448451

449452
$$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
450453
$(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2))
451-
@$$(call E, failing: no device for $$< )
452-
false
454+
@$$(call E, run: skipped $$< )
455+
@touch $$@
453456
endef
454457

455458
$(foreach host,$(CFG_HOST), \
@@ -917,15 +920,14 @@ $$(call TEST_OK_FILE,$(1),$(2),$(3),rmake): \
917920

918921
$(3)/test/run-make/%-$(1)-T-$(2)-H-$(3).ok: \
919922
$(S)src/test/run-make/%/Makefile \
920-
$$(CSREQ$(1)_T_$(2)_H_$(3))
923+
$$(HSREQ$(1)_H_$(3))
921924
@rm -rf $(3)/test/run-make/$$*
922925
@mkdir -p $(3)/test/run-make/$$*
923926
@echo maketest: $$*
924927
$$(Q)$$(CFG_PYTHON) $(S)src/etc/maketest.py $$(dir $$<) \
925928
$$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) \
926929
$(3)/test/run-make/$$* \
927-
"$$(CC_$(3)) $$(CFG_GCCISH_CFLAGS_$(3))" \
928-
$$(HBIN$(1)_H_$(3))/rustdoc$$(X_$(3))
930+
"$$(CC_$(3)) $$(CFG_GCCISH_CFLAGS_$(3))"
929931
@touch $$@
930932

931933
endef

branches/try2/src/compiletest/runtest.rs

Lines changed: 110 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,6 @@ use std::vec;
3737
use extra::test::MetricMap;
3838

3939
pub fn run(config: config, testfile: ~str) {
40-
41-
match config.target {
42-
43-
~"arm-linux-androideabi" => {
44-
if !config.adb_device_status {
45-
fail!("android device not available");
46-
}
47-
}
48-
49-
_=> { }
50-
}
51-
5240
let mut _mm = MetricMap::new();
5341
run_metrics(config, testfile, &mut _mm);
5442
}
@@ -111,8 +99,20 @@ fn run_rfail_test(config: &config, props: &TestProps, testfile: &Path) {
11199
fatal_ProcRes(~"run-fail test isn't valgrind-clean!", &ProcRes);
112100
}
113101
114-
check_correct_failure_status(&ProcRes);
115-
check_error_patterns(props, testfile, &ProcRes);
102+
match config.target {
103+
104+
~"arm-linux-androideabi" => {
105+
if (config.adb_device_status) {
106+
check_correct_failure_status(&ProcRes);
107+
check_error_patterns(props, testfile, &ProcRes);
108+
}
109+
}
110+
111+
_=> {
112+
check_correct_failure_status(&ProcRes);
113+
check_error_patterns(props, testfile, &ProcRes);
114+
}
115+
}
116116
}
117117

118118
fn check_correct_failure_status(ProcRes: &ProcRes) {
@@ -275,86 +275,86 @@ fn run_debuginfo_test(config: &config, props: &TestProps, testfile: &Path) {
275275
let mut ProcArgs;
276276
match config.target {
277277
~"arm-linux-androideabi" => {
278-
279-
cmds = cmds.replace("run","continue");
280-
281-
// write debugger script
282-
let script_str = [~"set charset UTF-8",
283-
format!("file {}",exe_file.as_str().unwrap().to_owned()),
284-
~"target remote :5039",
285-
cmds,
286-
~"quit"].connect("\n");
287-
debug!("script_str = {}", script_str);
288-
dump_output_file(config, testfile, script_str, "debugger.script");
289-
290-
291-
procsrv::run("", config.adb_path,
292-
[~"push", exe_file.as_str().unwrap().to_owned(),
293-
config.adb_test_dir.clone()],
294-
~[(~"",~"")], Some(~""))
295-
.expect(format!("failed to exec `{}`", config.adb_path));
296-
297-
procsrv::run("", config.adb_path,
298-
[~"forward", ~"tcp:5039", ~"tcp:5039"],
299-
~[(~"",~"")], Some(~""))
300-
.expect(format!("failed to exec `{}`", config.adb_path));
301-
302-
let adb_arg = format!("export LD_LIBRARY_PATH={}; gdbserver :5039 {}/{}",
303-
config.adb_test_dir.clone(), config.adb_test_dir.clone(),
304-
str::from_utf8(exe_file.filename().unwrap()));
305-
306-
let mut process = procsrv::run_background("", config.adb_path,
307-
[~"shell",adb_arg.clone()],
308-
~[(~"",~"")], Some(~""))
309-
.expect(format!("failed to exec `{}`", config.adb_path));
310-
loop {
311-
//waiting 1 second for gdbserver start
312-
timer::sleep(1000);
313-
let result = do task::try {
314-
tcp::TcpStream::connect(
278+
if (config.adb_device_status) {
279+
280+
cmds = cmds.replace("run","continue");
281+
282+
// write debugger script
283+
let script_str = [~"set charset UTF-8",
284+
format!("file {}",exe_file.as_str().unwrap().to_owned()),
285+
~"target remote :5039",
286+
cmds,
287+
~"quit"].connect("\n");
288+
debug!("script_str = {}", script_str);
289+
dump_output_file(config, testfile, script_str, "debugger.script");
290+
291+
292+
procsrv::run("", config.adb_path,
293+
[~"push", exe_file.as_str().unwrap().to_owned(), config.adb_test_dir.clone()],
294+
~[(~"",~"")], Some(~""))
295+
.expect(format!("failed to exec `{}`", config.adb_path));
296+
297+
procsrv::run("", config.adb_path,
298+
[~"forward", ~"tcp:5039", ~"tcp:5039"],
299+
~[(~"",~"")], Some(~""))
300+
.expect(format!("failed to exec `{}`", config.adb_path));
301+
302+
let adb_arg = format!("export LD_LIBRARY_PATH={}; gdbserver :5039 {}/{}",
303+
config.adb_test_dir.clone(), config.adb_test_dir.clone(),
304+
str::from_utf8(exe_file.filename().unwrap()));
305+
306+
let mut process = procsrv::run_background("", config.adb_path,
307+
[~"shell",adb_arg.clone()],~[(~"",~"")], Some(~""))
308+
.expect(format!("failed to exec `{}`", config.adb_path));
309+
loop {
310+
//waiting 1 second for gdbserver start
311+
timer::sleep(1000);
312+
let result = do task::try {
313+
tcp::TcpStream::connect(
315314
SocketAddr { ip: Ipv4Addr(127, 0, 0, 1), port: 5039 });
316-
};
317-
if result.is_err() {
318-
continue;
315+
};
316+
if result.is_err() {
317+
continue;
318+
}
319+
break;
319320
}
320-
break;
321-
}
322321

323-
let args = split_maybe_args(&config.rustcflags);
324-
let mut tool_path:~str = ~"";
325-
for arg in args.iter() {
326-
if arg.contains("--android-cross-path=") {
327-
tool_path = arg.replace("--android-cross-path=","");
328-
break;
322+
let args = split_maybe_args(&config.rustcflags);
323+
let mut tool_path:~str = ~"";
324+
for arg in args.iter() {
325+
if arg.contains("--android-cross-path=") {
326+
tool_path = arg.replace("--android-cross-path=","");
327+
break;
328+
}
329329
}
330-
}
331330

332-
if tool_path.equals(&~"") {
333-
fatal(~"cannot found android cross path");
334-
}
331+
if tool_path.equals(&~"") {
332+
fatal(~"cannot found android cross path");
333+
}
335334

336-
let debugger_script = make_out_name(config, testfile, "debugger.script");
337-
// FIXME (#9639): This needs to handle non-utf8 paths
338-
let debugger_opts = ~[~"-quiet", ~"-batch", ~"-nx",
339-
"-command=" + debugger_script.as_str().unwrap().to_owned()];
340-
341-
let gdb_path = tool_path.append("/bin/arm-linux-androideabi-gdb");
342-
let procsrv::Result{ out, err, status }=
343-
procsrv::run("",
344-
gdb_path,
345-
debugger_opts, ~[(~"",~"")], None)
346-
.expect(format!("failed to exec `{}`", gdb_path));
347-
let cmdline = {
348-
let cmdline = make_cmdline("", "arm-linux-androideabi-gdb", debugger_opts);
349-
logv(config, format!("executing {}", cmdline));
350-
cmdline
351-
};
352-
353-
ProcRes = ProcRes {status: status,
354-
stdout: out,
355-
stderr: err,
356-
cmdline: cmdline};
357-
process.force_destroy();
335+
let debugger_script = make_out_name(config, testfile, "debugger.script");
336+
// FIXME (#9639): This needs to handle non-utf8 paths
337+
let debugger_opts = ~[~"-quiet", ~"-batch", ~"-nx",
338+
"-command=" + debugger_script.as_str().unwrap().to_owned()];
339+
340+
let gdb_path = tool_path.append("/bin/arm-linux-androideabi-gdb");
341+
let procsrv::Result{ out, err, status }=
342+
procsrv::run("",
343+
gdb_path,
344+
debugger_opts, ~[(~"",~"")], None)
345+
.expect(format!("failed to exec `{}`", gdb_path));
346+
let cmdline = {
347+
let cmdline = make_cmdline("", "arm-linux-androideabi-gdb", debugger_opts);
348+
logv(config, format!("executing {}", cmdline));
349+
cmdline
350+
};
351+
352+
ProcRes = ProcRes {status: status,
353+
stdout: out,
354+
stderr: err,
355+
cmdline: cmdline};
356+
process.force_destroy();
357+
}
358358
}
359359

360360
_=> {
@@ -662,7 +662,11 @@ fn exec_compiled_test(config: &config, props: &TestProps,
662662
match config.target {
663663

664664
~"arm-linux-androideabi" => {
665-
_arm_exec_compiled_test(config, props, testfile, env)
665+
if (config.adb_device_status) {
666+
_arm_exec_compiled_test(config, props, testfile, env)
667+
} else {
668+
_dummy_exec_compiled_test(config, props, testfile)
669+
}
666670
}
667671

668672
_=> {
@@ -706,7 +710,9 @@ fn compose_and_run_compiler(
706710
match config.target {
707711

708712
~"arm-linux-androideabi" => {
709-
_arm_push_aux_shared_library(config, testfile);
713+
if (config.adb_device_status) {
714+
_arm_push_aux_shared_library(config, testfile);
715+
}
710716
}
711717

712718
_=> { }
@@ -986,6 +992,20 @@ fn _arm_exec_compiled_test(config: &config, props: &TestProps,
986992
}
987993
}
988994

995+
fn _dummy_exec_compiled_test(config: &config, props: &TestProps,
996+
testfile: &Path) -> ProcRes {
997+
998+
let args = make_run_args(config, props, testfile);
999+
let cmdline = make_cmdline("", args.prog, args.args);
1000+
1001+
match config.mode {
1002+
mode_run_fail => ProcRes {status: process::ExitStatus(101), stdout: ~"",
1003+
stderr: ~"", cmdline: cmdline},
1004+
_ => ProcRes {status: process::ExitStatus(0), stdout: ~"",
1005+
stderr: ~"", cmdline: cmdline}
1006+
}
1007+
}
1008+
9891009
fn _arm_push_aux_shared_library(config: &config, testfile: &Path) {
9901010
let tdir = aux_output_dir_name(config, testfile);
9911011

branches/try2/src/etc/maketest.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
os.putenv('RUSTC', os.path.abspath(sys.argv[2]))
88
os.putenv('TMPDIR', os.path.abspath(sys.argv[3]))
99
os.putenv('CC', sys.argv[4])
10-
os.putenv('RUSTDOC', os.path.abspath(sys.argv[5]))
1110

1211
proc = subprocess.Popen(['make', '-C', sys.argv[1]],
1312
stdout = subprocess.PIPE,

branches/try2/src/etc/mklldeps.py

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@
44
import sys
55
import subprocess
66

7-
f = open(sys.argv[1], 'wb')
7+
components = sys.argv[1].split(' ')
88

9-
components = sys.argv[2].split(' ')
10-
11-
f.write("""// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
9+
print """// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
1210
// file at the top-level directory of this distribution and at
1311
// http://rust-lang.org/COPYRIGHT.
1412
//
@@ -20,10 +18,10 @@
2018
2119
// WARNING: THIS IS A GENERATED FILE, DO NOT MODIFY
2220
// take a look at src/etc/mklldeps.py if you're interested
23-
""")
21+
"""
2422

25-
for llconfig in sys.argv[3:]:
26-
f.write("\n")
23+
for llconfig in sys.argv[2:]:
24+
print
2725

2826
proc = subprocess.Popen([llconfig, '--host-target'], stdout = subprocess.PIPE)
2927
out, err = proc.communicate()
@@ -44,7 +42,7 @@
4442
"target_os = \"" + os + "\"",
4543
]
4644

47-
f.write("#[cfg(" + ', '.join(cfg) + ")]\n")
45+
print "#[cfg(" + ', '.join(cfg) + ")]"
4846

4947
args = [llconfig, '--libs']
5048
args.extend(components)
@@ -53,7 +51,8 @@
5351

5452
for lib in out.strip().split(' '):
5553
lib = lib[2:] # chop of the leading '-l'
56-
f.write("#[link(name = \"" + lib + "\", kind = \"static\")]\n")
54+
print "#[link(name = \"" + lib + "\", kind = \"static\")]"
5755
if os == 'win32':
58-
f.write("#[link(name = \"imagehlp\")]\n")
59-
f.write("extern {}\n")
56+
print "#[link(name = \"pthread\")]"
57+
print "#[link(name = \"imagehlp\")]"
58+
print "extern {}"

branches/try2/src/etc/snapshot.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ def scrub(b):
3232
}
3333

3434
winnt_runtime_deps = ["libgcc_s_dw2-1.dll",
35-
"libstdc++-6.dll"]
35+
"libstdc++-6.dll",
36+
"libpthread-2.dll"]
3637

3738
def parse_line(n, line):
3839
global snapshotfile

0 commit comments

Comments
 (0)