Skip to content

Commit e2aa212

Browse files
committed
---
yaml --- r: 95897 b: refs/heads/dist-snap c: 1c6ae5c h: refs/heads/master i: 95895: 549d443 v: v3
1 parent fad8e45 commit e2aa212

File tree

66 files changed

+33
-275
lines changed

Some content is hidden

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

66 files changed

+33
-275
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: c274a6888410ce3e357e014568b43310ed787d36
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: b17d4e335db38db731581fca104212fa13e8776d
9+
refs/heads/dist-snap: 1c6ae5c5a2bbbbce634b58337cdea2c7a5ddd275
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/compiletest/compiletest.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -220,19 +220,6 @@ pub fn mode_str(mode: mode) -> ~str {
220220
}
221221

222222
pub fn run_tests(config: &config) {
223-
if config.target == ~"arm-linux-androideabi" {
224-
match config.mode{
225-
mode_debug_info => {
226-
println("arm-linux-androideabi debug-info \
227-
test uses tcp 5039 port. please reserve it");
228-
//arm-linux-androideabi debug-info test uses remote debugger
229-
//so, we test 1 task at once
230-
os::setenv("RUST_TEST_TASKS","1");
231-
}
232-
_ =>{}
233-
}
234-
}
235-
236223
let opts = test_opts(config);
237224
let tests = make_tests(config);
238225
// sadly osx needs some file descriptor limits raised for running tests in

branches/dist-snap/src/compiletest/procsrv.rs

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -67,26 +67,3 @@ pub fn run(lib_path: &str,
6767
err: str::from_utf8(output.error)
6868
}
6969
}
70-
71-
pub fn run_background(lib_path: &str,
72-
prog: &str,
73-
args: &[~str],
74-
env: ~[(~str, ~str)],
75-
input: Option<~str>) -> run::Process {
76-
77-
let env = env + target_env(lib_path, prog);
78-
let mut process = run::Process::new(prog, args, run::ProcessOptions {
79-
env: Some(env),
80-
dir: None,
81-
in_fd: None,
82-
out_fd: None,
83-
err_fd: None
84-
});
85-
86-
for input in input.iter() {
87-
process.input().write(input.as_bytes());
88-
}
89-
90-
return process;
91-
}
92-

branches/dist-snap/src/compiletest/runtest.rs

Lines changed: 22 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ use std::rt::io::File;
2626
use std::os;
2727
use std::str;
2828
use std::vec;
29-
use std::rt::io::net::tcp;
30-
use std::rt::io::net::ip::{Ipv4Addr, SocketAddr};
31-
use std::task;
32-
use std::rt::io::timer;
3329

3430
use extra::test::MetricMap;
3531

@@ -249,7 +245,6 @@ actual:\n\
249245
}
250246

251247
fn run_debuginfo_test(config: &config, props: &TestProps, testfile: &Path) {
252-
253248
// do not optimize debuginfo tests
254249
let mut config = match config.rustcflags {
255250
Some(ref flags) => config {
@@ -259,125 +254,39 @@ fn run_debuginfo_test(config: &config, props: &TestProps, testfile: &Path) {
259254
None => (*config).clone()
260255
};
261256
let config = &mut config;
257+
let cmds = props.debugger_cmds.connect("\n");
262258
let check_lines = &props.check_lines;
263-
let mut cmds = props.debugger_cmds.connect("\n");
264259

265260
// compile test file (it shoud have 'compile-flags:-g' in the header)
266261
let mut ProcRes = compile_test(config, props, testfile);
267262
if ProcRes.status != 0 {
268263
fatal_ProcRes(~"compilation failed!", &ProcRes);
269264
}
270265

266+
// write debugger script
267+
let script_str = [~"set charset UTF-8",
268+
cmds,
269+
~"quit\n"].connect("\n");
270+
debug!("script_str = {}", script_str);
271+
dump_output_file(config, testfile, script_str, "debugger.script");
272+
273+
// run debugger script with gdb
274+
#[cfg(windows)]
275+
fn debugger() -> ~str { ~"gdb.exe" }
276+
#[cfg(unix)]
277+
fn debugger() -> ~str { ~"gdb" }
278+
let debugger_script = make_out_name(config, testfile, "debugger.script");
271279
let exe_file = make_exe_name(config, testfile);
272-
273-
let mut ProcArgs;
274-
match config.target {
275-
~"arm-linux-androideabi" => {
276-
if (config.adb_device_status) {
277-
278-
cmds = cmds.replace("run","continue");
279-
280-
// write debugger script
281-
let script_str = [~"set charset UTF-8",
282-
format!("file {}",exe_file.as_str().unwrap().to_owned()),
283-
~"target remote :5039",
284-
cmds,
285-
~"quit"].connect("\n");
286-
debug!("script_str = {}", script_str);
287-
dump_output_file(config, testfile, script_str, "debugger.script");
288-
289-
290-
procsrv::run("", config.adb_path.clone(),
291-
[~"push", exe_file.as_str().unwrap().to_owned(), config.adb_test_dir.clone()],
292-
~[(~"",~"")], Some(~""));
293-
294-
procsrv::run("", config.adb_path,
295-
[~"forward", ~"tcp:5039", ~"tcp:5039"],
296-
~[(~"",~"")], Some(~""));
297-
298-
let adb_arg = format!("export LD_LIBRARY_PATH={}; gdbserver :5039 {}/{}",
299-
config.adb_test_dir.clone(), config.adb_test_dir.clone(),
300-
str::from_utf8(exe_file.filename().unwrap())).clone();
301-
302-
let mut process = procsrv::run_background("", config.adb_path.clone(),
303-
[~"shell",adb_arg.clone()],~[(~"",~"")], Some(~""));
304-
loop {
305-
//waiting 1 second for gdbserver start
306-
timer::sleep(1000);
307-
let result = do task::try {
308-
tcp::TcpStream::connect(
309-
SocketAddr { ip: Ipv4Addr(127, 0, 0, 1), port: 5039 });
310-
};
311-
if result.is_err() {
312-
continue;
313-
}
314-
break;
315-
}
316-
317-
let args = split_maybe_args(&config.rustcflags);
318-
let mut tool_path:~str = ~"";
319-
for arg in args.iter() {
320-
if arg.contains("--android-cross-path=") {
321-
tool_path = arg.replace("--android-cross-path=","");
322-
break;
323-
}
324-
}
325-
326-
if tool_path.equals(&~"") {
327-
fatal(~"cannot found android cross path");
328-
}
329-
330-
let debugger_script = make_out_name(config, testfile, "debugger.script");
331-
// FIXME (#9639): This needs to handle non-utf8 paths
332-
let debugger_opts = ~[~"-quiet", ~"-batch", ~"-nx",
333-
"-command=" + debugger_script.as_str().unwrap().to_owned()];
334-
335-
let procsrv::Result{ out, err, status }=
336-
procsrv::run("",
337-
tool_path.append("/bin/arm-linux-androideabi-gdb"),
338-
debugger_opts, ~[(~"",~"")], None);
339-
let cmdline = {
340-
let cmdline = make_cmdline("", "arm-linux-androideabi-gdb", debugger_opts);
341-
logv(config, format!("executing {}", cmdline));
342-
cmdline
343-
};
344-
345-
ProcRes = ProcRes {status: status,
346-
stdout: out,
347-
stderr: err,
348-
cmdline: cmdline};
349-
process.force_destroy();
350-
}
351-
}
352-
353-
_=> {
354-
// write debugger script
355-
let script_str = [~"set charset UTF-8",
356-
cmds,
357-
~"quit\n"].connect("\n");
358-
debug!("script_str = {}", script_str);
359-
dump_output_file(config, testfile, script_str, "debugger.script");
360-
361-
// run debugger script with gdb
362-
#[cfg(windows)]
363-
fn debugger() -> ~str { ~"gdb.exe" }
364-
#[cfg(unix)]
365-
fn debugger() -> ~str { ~"gdb" }
366-
367-
let debugger_script = make_out_name(config, testfile, "debugger.script");
368-
369-
// FIXME (#9639): This needs to handle non-utf8 paths
370-
let debugger_opts = ~[~"-quiet", ~"-batch", ~"-nx",
371-
"-command=" + debugger_script.as_str().unwrap().to_owned(),
372-
exe_file.as_str().unwrap().to_owned()];
373-
ProcArgs = ProcArgs {prog: debugger(), args: debugger_opts};
374-
ProcRes = compose_and_run(config, testfile, ProcArgs, ~[], "", None);
375-
}
376-
}
377-
280+
// FIXME (#9639): This needs to handle non-utf8 paths
281+
let debugger_opts = ~[~"-quiet", ~"-batch", ~"-nx",
282+
~"-command=" + debugger_script.as_str().unwrap().to_owned(),
283+
exe_file.as_str().unwrap().to_owned()];
284+
let ProcArgs = ProcArgs {prog: debugger(), args: debugger_opts};
285+
ProcRes = compose_and_run(config, testfile, ProcArgs, ~[], "", None);
378286
if ProcRes.status != 0 {
379287
fatal(~"gdb failed to execute");
380288
}
289+
381290
let num_check_lines = check_lines.len();
382291
if num_check_lines > 0 {
383292
// Allow check lines to leave parts unspecified (e.g., uninitialized
@@ -925,6 +834,7 @@ fn _arm_exec_compiled_test(config: &config, props: &TestProps,
925834
for tv in args.args.iter() {
926835
runargs.push(tv.to_owned());
927836
}
837+
928838
procsrv::run("", config.adb_path, runargs, ~[(~"",~"")], Some(~""));
929839

930840
// get exitcode of result

branches/dist-snap/src/librustc/back/rpath.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ pub fn get_rpath_relative_to_output(os: session::Os,
118118
let prefix = match os {
119119
session::OsAndroid | session::OsLinux | session::OsFreebsd
120120
=> "$ORIGIN",
121-
session::OsMacos => "@loader_path",
121+
session::OsMacos => "@executable_path",
122122
session::OsWin32 => unreachable!()
123123
};
124124

@@ -241,7 +241,7 @@ mod test {
241241
let res = get_rpath_relative_to_output(o,
242242
&Path::new("bin/rustc"),
243243
&Path::new("lib/libstd.so"));
244-
assert_eq!(res.as_slice(), "@loader_path/../lib");
244+
assert_eq!(res.as_slice(), "@executable_path/../lib");
245245
}
246246
247247
#[test]

branches/dist-snap/src/libstd/libc.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ pub mod types {
297297
}
298298
#[cfg(target_arch = "x86")]
299299
pub mod posix01 {
300-
use libc::types::os::arch::c95::{c_char, c_short, c_long, time_t};
300+
use libc::types::os::arch::c95::{c_short, c_long, time_t};
301301
use libc::types::os::arch::posix88::{dev_t, gid_t, ino_t};
302302
use libc::types::os::arch::posix88::{mode_t, off_t};
303303
use libc::types::os::arch::posix88::{uid_t};
@@ -330,12 +330,12 @@ pub mod types {
330330
}
331331

332332
pub struct pthread_attr_t {
333-
__size: [c_char, ..36]
333+
__size: [u32, ..9]
334334
}
335335
}
336336
#[cfg(target_arch = "arm")]
337337
pub mod posix01 {
338-
use libc::types::os::arch::c95::{c_char, c_uchar, c_uint, c_ulong, time_t};
338+
use libc::types::os::arch::c95::{c_uchar, c_uint, c_ulong, time_t};
339339
use libc::types::os::arch::c99::{c_longlong, c_ulonglong};
340340
use libc::types::os::arch::posix88::{uid_t, gid_t, ino_t};
341341

@@ -366,12 +366,12 @@ pub mod types {
366366
}
367367

368368
pub struct pthread_attr_t {
369-
__size: [c_char, ..36]
369+
__size: [u32, ..9]
370370
}
371371
}
372372
#[cfg(target_arch = "mips")]
373373
pub mod posix01 {
374-
use libc::types::os::arch::c95::{c_char, c_long, c_ulong, time_t};
374+
use libc::types::os::arch::c95::{c_long, c_ulong, time_t};
375375
use libc::types::os::arch::posix88::{gid_t, ino_t};
376376
use libc::types::os::arch::posix88::{mode_t, off_t};
377377
use libc::types::os::arch::posix88::{uid_t};
@@ -404,7 +404,7 @@ pub mod types {
404404
}
405405

406406
pub struct pthread_attr_t {
407-
__size: [c_char, ..36]
407+
__size: [u32, ..9]
408408
}
409409
}
410410
pub mod posix08 {}
@@ -450,7 +450,7 @@ pub mod types {
450450
pub type ssize_t = i64;
451451
}
452452
pub mod posix01 {
453-
use libc::types::os::arch::c95::{c_char, c_int, c_long, time_t};
453+
use libc::types::os::arch::c95::{c_int, c_long, time_t};
454454
use libc::types::os::arch::posix88::{dev_t, gid_t, ino_t};
455455
use libc::types::os::arch::posix88::{mode_t, off_t};
456456
use libc::types::os::arch::posix88::{uid_t};
@@ -480,7 +480,7 @@ pub mod types {
480480
}
481481

482482
pub struct pthread_attr_t {
483-
__size: [c_char, ..56]
483+
__size: [u64, ..7]
484484
}
485485
}
486486
pub mod posix08 {

branches/dist-snap/src/test/debug-info/basic-types-metadata.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// xfail-android
12-
1311
// compile-flags:-Z extra-debug-info
1412
// debugger:rbreak zzz
1513
// debugger:run

branches/dist-snap/src/test/debug-info/basic-types.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
// about UTF-32 character encoding and will print a rust char as only
1515
// its numerical value.
1616

17-
// xfail-android
18-
1917
// compile-flags:-Z extra-debug-info
2018
// debugger:rbreak zzz
2119
// debugger:run

branches/dist-snap/src/test/debug-info/borrowed-basic.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// xfail-android
12-
1311
// Gdb doesn't know about UTF-32 character encoding and will print a rust char as only
1412
// its numerical value.
1513

branches/dist-snap/src/test/debug-info/borrowed-c-style-enum.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// xfail-android
12-
1311
// compile-flags:-Z extra-debug-info
1412
// debugger:rbreak zzz
1513
// debugger:run

branches/dist-snap/src/test/debug-info/borrowed-enum.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// xfail-android
12-
1311
// compile-flags:-Z extra-debug-info
1412
// debugger:rbreak zzz
1513
// debugger:run

branches/dist-snap/src/test/debug-info/boxed-vec.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// xfail-android
12-
1311
#[feature(managed_boxes)];
1412

1513
// compile-flags:-Z extra-debug-info

branches/dist-snap/src/test/debug-info/by-value-non-immediate-argument.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// xfail-android
12-
1311
// compile-flags:-Z extra-debug-info
1412
// debugger:rbreak zzz
1513
// debugger:run

branches/dist-snap/src/test/debug-info/by-value-self-argument-in-trait-impl.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// xfail-android
12-
1311
#[feature(managed_boxes)];
1412

1513
// compile-flags:-Z extra-debug-info

branches/dist-snap/src/test/debug-info/c-style-enum.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// xfail-android
12-
1311
// compile-flags:-Z extra-debug-info
1412
// debugger:rbreak zzz
1513
// debugger:run

0 commit comments

Comments
 (0)