Skip to content

Commit 87b9d13

Browse files
committed
---
yaml --- r: 124367 b: refs/heads/auto c: 036b9e8 h: refs/heads/master i: 124365: a25120b 124363: d216aea 124359: 8f9fc67 124351: 92aa676 v: v3
1 parent d83266a commit 87b9d13

File tree

187 files changed

+1593
-6800
lines changed

Some content is hidden

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

187 files changed

+1593
-6800
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: 06c7ee9c56f7c768be94c89f699527b44be664ab
16+
refs/heads/auto: 036b9e8e3e79b6454f8b6dc92b6a2490b3910dc5
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/compiletest/compiletest.rs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ use std::io::fs;
3030
use std::from_str::FromStr;
3131
use getopts::{optopt, optflag, reqopt};
3232
use common::Config;
33-
use common::{Pretty, DebugInfoGdb, DebugInfoLldb, Codegen};
33+
use common::{Pretty, DebugInfoGdb, Codegen};
3434
use util::logv;
3535
use regex::Regex;
3636

@@ -241,16 +241,6 @@ pub fn run_tests(config: &Config) {
241241
os::setenv("RUST_TEST_TASKS","1");
242242
}
243243

244-
match config.mode {
245-
DebugInfoLldb => {
246-
// Some older versions of LLDB seem to have problems with multiple
247-
// instances running in parallel, so only run one test task at a
248-
// time.
249-
os::setenv("RUST_TEST_TASKS", "1");
250-
}
251-
_ => { /* proceed */ }
252-
}
253-
254244
let opts = test_opts(config);
255245
let tests = make_tests(config);
256246
// sadly osx needs some file descriptor limits raised for running tests in

branches/auto/src/compiletest/procsrv.rs

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

11+
use std::str;
1112
use std::io::process::{ProcessExit, Command, Process, ProcessOutput};
1213
use std::dynamic_lib::DynamicLibrary;
1314

@@ -24,7 +25,7 @@ fn add_target_env(cmd: &mut Command, lib_path: &str, aux_path: Option<&str>) {
2425
// Add the new dylib search path var
2526
let var = DynamicLibrary::envvar();
2627
let newpath = DynamicLibrary::create_path(path.as_slice());
27-
let newpath = String::from_utf8(newpath).unwrap();
28+
let newpath = str::from_utf8(newpath.as_slice()).unwrap().to_string();
2829
cmd.env(var.to_string(), newpath);
2930
}
3031

@@ -54,8 +55,8 @@ pub fn run(lib_path: &str,
5455

5556
Some(Result {
5657
status: status,
57-
out: String::from_utf8(output).unwrap(),
58-
err: String::from_utf8(error).unwrap()
58+
out: str::from_utf8(output.as_slice()).unwrap().to_string(),
59+
err: str::from_utf8(error.as_slice()).unwrap().to_string()
5960
})
6061
},
6162
Err(..) => None

branches/auto/src/compiletest/runtest.rs

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ fn run_pretty_test(config: &Config, props: &TestProps, testfile: &Path) {
158158
match props.pp_exact { Some(_) => 1, None => 2 };
159159

160160
let src = File::open(testfile).read_to_end().unwrap();
161-
let src = String::from_utf8(src.clone()).unwrap();
161+
let src = str::from_utf8(src.as_slice()).unwrap().to_string();
162162
let mut srcs = vec!(src);
163163

164164
let mut round = 0;
@@ -185,10 +185,10 @@ fn run_pretty_test(config: &Config, props: &TestProps, testfile: &Path) {
185185
Some(ref file) => {
186186
let filepath = testfile.dir_path().join(file);
187187
let s = File::open(&filepath).read_to_end().unwrap();
188-
String::from_utf8(s).unwrap()
189-
}
190-
None => { (*srcs.get(srcs.len() - 2u)).clone() }
191-
};
188+
str::from_utf8(s.as_slice()).unwrap().to_string()
189+
}
190+
None => { (*srcs.get(srcs.len() - 2u)).clone() }
191+
};
192192
let mut actual = (*srcs.get(srcs.len() - 1u)).clone();
193193

194194
if props.pp_exact.is_some() {
@@ -536,16 +536,6 @@ fn run_debuginfo_lldb_test(config: &Config, props: &TestProps, testfile: &Path)
536536
// We don't want to hang when calling `quit` while the process is still running
537537
let mut script_str = String::from_str("settings set auto-confirm true\n");
538538

539-
// Make LLDB emit its version, so we have it documented in the test output
540-
script_str.push_str("version\n");
541-
542-
// Switch LLDB into "Rust mode"
543-
script_str.push_str("command script import ./src/etc/lldb_rust_formatters.py\n");
544-
script_str.push_str("type summary add --no-value ");
545-
script_str.push_str("--python-function lldb_rust_formatters.print_val ");
546-
script_str.push_str("-x \".*\" --category Rust\n");
547-
script_str.push_str("type category enable Rust\n");
548-
549539
// Set breakpoints on every line that contains the string "#break"
550540
for line in breakpoint_lines.iter() {
551541
script_str.push_str(format!("breakpoint set --line {}\n",
@@ -592,8 +582,8 @@ fn run_debuginfo_lldb_test(config: &Config, props: &TestProps, testfile: &Path)
592582
process.wait_with_output().unwrap();
593583

594584
(status,
595-
String::from_utf8(output).unwrap(),
596-
String::from_utf8(error).unwrap())
585+
str::from_utf8(output.as_slice()).unwrap().to_string(),
586+
str::from_utf8(error.as_slice()).unwrap().to_string())
597587
},
598588
Err(e) => {
599589
fatal(format!("Failed to setup Python process for \
@@ -823,7 +813,7 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> ,
823813
c
824814
}
825815
} ).collect();
826-
String::from_chars(c.as_slice())
816+
str::from_chars(c.as_slice()).to_string()
827817
}
828818

829819
#[cfg(target_os = "win32")]

branches/auto/src/doc/guide.md

Lines changed: 53 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -279,12 +279,59 @@ program doesn't have any dependencies, so we'll only be using the first part of
279279
its functionality. Eventually, we'll add more. Since we started off by using
280280
Cargo, it'll be easy to add later.
281281

282-
Let's convert Hello World to Cargo. The first thing we need to do to begin
283-
using Cargo is to install Cargo. Luckily for us, the script we ran to install
284-
Rust includes Cargo by default. If you installed Rust some other way, you may
285-
want to [check the Cargo
286-
README](https://github.com/rust-lang/cargo#installing-cargo-from-nightlies)
287-
for specific instructions about installing it.
282+
Let's convert Hello World to Cargo. The first thing we need to do to begin using Cargo
283+
is to install Cargo. To do this, we need to build it from source. There are no binaries
284+
yet.
285+
286+
First, let's go back to our projects directory. We don't want Cargo to
287+
live in our project!
288+
289+
```{bash}
290+
$ cd ..
291+
```
292+
293+
Next, we need these commands:
294+
295+
```{bash}
296+
$ git clone --recursive https://github.com/rust-lang/cargo
297+
$ cd cargo
298+
$ make
299+
$ make install # may need sudo or admin permissions
300+
```
301+
302+
The `--recursive` downloads Cargo's own dependencies. You can't use Cargo to
303+
fetch dependencies until you have Cargo installed! Also, you will need to have
304+
`git` installed. Much of the Rust world assumes `git` usage, so it's a good
305+
thing to have around. Please check out [the git
306+
documentation](http://git-scm.com/book/en/Getting-Started-Installing-Git) for
307+
more on installing `git`.
308+
309+
We hope to give Cargo a binary installer, similar to Rust's own, so that
310+
this will not be necessary in the future.
311+
312+
Let's see if that worked. Try this:
313+
314+
```{bash}
315+
$ cargo
316+
Commands:
317+
build # compile the current project
318+
319+
Options (for all commands):
320+
321+
-v, [--verbose]
322+
-h, [--help]
323+
```
324+
325+
If you see this output when you run `cargo`, congrats! Cargo is working. If
326+
not, please [open an issue](https://github.com/rust-lang/cargo/issues/new) or
327+
drop by the Rust IRC, and we can help you out.
328+
329+
Let's move back into our `hello_world` directory now:
330+
331+
```{bash}
332+
$ cd .. # move back up into projects
333+
$ cd hello_world # move into hello_world
334+
```
288335

289336
To Cargo-ify our project, we need to do two things: Make a `Cargo.toml`
290337
configuration file, and put our source file in the right place. Let's

branches/auto/src/etc/lldb_batchmode.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
import re
3232
import atexit
3333

34+
# Terminate the debugger
35+
atexit.register(lambda: lldb.SBDebugger.Terminate())
36+
3437
# Set this to True for additional output
3538
DEBUG_OUTPUT = False
3639

0 commit comments

Comments
 (0)