Skip to content

Commit f9b8853

Browse files
committed
---
yaml --- r: 151674 b: refs/heads/try2 c: 93499b1 h: refs/heads/master v: v3
1 parent e54533a commit f9b8853

File tree

7 files changed

+139
-100
lines changed

7 files changed

+139
-100
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: 1440e0983916312009590947aeb07d80ea348f7b
8+
refs/heads/try2: 93499b1eaf74a58ff7de3ac9240afc4796ef57c8
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/compiletest/compiletest.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,8 @@ pub fn parse_config(args: Vec<~str> ) -> Config {
152152
"(none)" != opt_str2(matches.opt_str("adb-test-dir")) &&
153153
!opt_str2(matches.opt_str("adb-test-dir")).is_empty(),
154154
lldb_python_dir: matches.opt_str("lldb-python-dir"),
155-
test_shard: test::opt_shard(matches.opt_str("test-shard")),
155+
test_shard: test::opt_shard(matches.opt_str("test-shard")
156+
.map(|x| x.to_strbuf())),
156157
verbose: matches.opt_present("verbose")
157158
}
158159
}
@@ -235,7 +236,10 @@ pub fn run_tests(config: &Config) {
235236

236237
pub fn test_opts(config: &Config) -> test::TestOpts {
237238
test::TestOpts {
238-
filter: config.filter.clone(),
239+
filter: match config.filter {
240+
None => None,
241+
Some(ref filter) => Some(filter.to_strbuf()),
242+
},
239243
run_ignored: config.run_ignored,
240244
logfile: config.logfile.clone(),
241245
run_tests: true,
@@ -314,7 +318,9 @@ pub fn make_test_name(config: &Config, testfile: &Path) -> test::TestName {
314318
format!("{}/{}", dir.unwrap_or(""), filename.unwrap_or(""))
315319
}
316320

317-
test::DynTestName(format!("[{}] {}", config.mode, shorten(testfile)))
321+
test::DynTestName(format_strbuf!("[{}] {}",
322+
config.mode,
323+
shorten(testfile)))
318324
}
319325

320326
pub fn make_test_closure(config: &Config, testfile: &Path) -> test::TestFn {

branches/try2/src/librustc/front/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ fn mk_test_module(cx: &TestCtxt) -> @ast::Item {
327327
pub fn main() {
328328
#![main]
329329
use std::slice::Vector;
330-
test::test_main_static(::std::os::args().as_slice(), TESTS);
330+
test::test_main_static_x(::std::os::args().as_slice(), TESTS);
331331
}
332332
)).unwrap();
333333

branches/try2/src/librustdoc/markdown.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,6 @@ pub fn test(input: &str, libs: HashSet<Path>, mut test_args: Vec<StrBuf>) -> int
176176
let mut collector = Collector::new(input.to_strbuf(), libs, true, true);
177177
find_testable_code(input_str.as_slice(), &mut collector);
178178
test_args.unshift("rustdoctest".to_strbuf());
179-
testing::test_main(test_args.move_iter()
180-
.map(|x| x.to_str())
181-
.collect::<Vec<_>>()
182-
.as_slice(),
183-
collector.tests);
179+
testing::test_main(test_args.as_slice(), collector.tests);
184180
0
185181
}

branches/try2/src/librustdoc/test.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,7 @@ pub fn run(input: &str,
9292

9393
test_args.unshift("rustdoctest".to_strbuf());
9494

95-
testing::test_main(test_args.move_iter()
96-
.map(|x| x.to_str())
97-
.collect::<Vec<_>>()
98-
.as_slice(),
95+
testing::test_main(test_args.as_slice(),
9996
collector.tests.move_iter().collect());
10097
0
10198
}
@@ -235,9 +232,9 @@ impl Collector {
235232
pub fn add_test(&mut self, test: StrBuf, should_fail: bool, no_run: bool, should_ignore: bool) {
236233
let name = if self.use_headers {
237234
let s = self.current_header.as_ref().map(|s| s.as_slice()).unwrap_or("");
238-
format!("{}_{}", s, self.cnt)
235+
format_strbuf!("{}_{}", s, self.cnt)
239236
} else {
240-
format!("{}_{}", self.names.connect("::"), self.cnt)
237+
format_strbuf!("{}_{}", self.names.connect("::"), self.cnt)
241238
};
242239
self.cnt += 1;
243240
let libs = self.libs.clone();

0 commit comments

Comments
 (0)