Skip to content

Commit 6f00978

Browse files
committed
---
yaml --- r: 140799 b: refs/heads/try2 c: 133aabc h: refs/heads/master i: 140797: 70dd1c2 140795: 48433ac 140791: c279acd 140783: 1f2df6b 140767: 96507ee 140735: 9cd40f6 140671: d49bf29 140543: 3f667cc 140287: 29fb8da v: v3
1 parent 799f9c0 commit 6f00978

File tree

7 files changed

+22
-72
lines changed

7 files changed

+22
-72
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: 06c46d514215e38a800dce1aa1913589eeb03b20
8+
refs/heads/try2: 133aabc5bb6786ff7038886baf5fefde974e460a
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: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -695,9 +695,6 @@ do
695695
# host lib dir
696696
make_dir $h/stage$i/$CFG_LIBDIR
697697

698-
# host test dir
699-
make_dir $h/stage$i/test
700-
701698
# target bin dir
702699
make_dir $h/stage$i/$CFG_LIBDIR/rustc/$t/bin
703700

branches/try2/mk/tests.mk

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -289,50 +289,50 @@ else
289289
STDTESTDEP_$(1)_$(2)_$(3) =
290290
endif
291291

292-
$(3)/stage$(1)/test/coretest-$(2)$$(X_$(2)): \
292+
$(3)/test/coretest.stage$(1)-$(2)$$(X_$(2)): \
293293
$$(CORELIB_CRATE) $$(CORELIB_INPUTS) \
294294
$$(STDTESTDEP_$(1)_$(2)_$(3))
295295
@$$(call E, compile_and_link: $$@)
296296
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
297297

298-
$(3)/stage$(1)/test/stdtest-$(2)$$(X_$(2)): \
298+
$(3)/test/stdtest.stage$(1)-$(2)$$(X_$(2)): \
299299
$$(STDLIB_CRATE) $$(STDLIB_INPUTS) \
300300
$$(STDTESTDEP_$(1)_$(2)_$(3))
301301
@$$(call E, compile_and_link: $$@)
302302
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
303303

304-
$(3)/stage$(1)/test/syntaxtest-$(2)$$(X_$(2)): \
304+
$(3)/test/syntaxtest.stage$(1)-$(2)$$(X_$(2)): \
305305
$$(LIBSYNTAX_CRATE) $$(LIBSYNTAX_INPUTS) \
306306
$$(STDTESTDEP_$(1)_$(2)_$(3))
307307
@$$(call E, compile_and_link: $$@)
308308
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
309309

310-
$(3)/stage$(1)/test/rustctest-$(2)$$(X_$(2)): \
310+
$(3)/test/rustctest.stage$(1)-$(2)$$(X_$(2)): \
311311
$$(COMPILER_CRATE) $$(COMPILER_INPUTS) \
312312
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_RUSTLLVM_$(2)) \
313313
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBSYNTAX_$(2))
314314
@$$(call E, compile_and_link: $$@)
315315
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
316316

317-
$(3)/stage$(1)/test/rustpkgtest-$(2)$$(X_$(2)): \
317+
$(3)/test/rustpkgtest.stage$(1)-$(2)$$(X_$(2)): \
318318
$$(RUSTPKG_LIB) $$(RUSTPKG_INPUTS) \
319319
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC_$(2))
320320
@$$(call E, compile_and_link: $$@)
321321
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
322322

323-
$(3)/stage$(1)/test/rustitest-$(2)$$(X_$(2)): \
323+
$(3)/test/rustitest.stage$(1)-$(2)$$(X_$(2)): \
324324
$$(RUSTI_LIB) $$(RUSTI_INPUTS) \
325325
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC_$(2))
326326
@$$(call E, compile_and_link: $$@)
327327
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
328328

329-
$(3)/stage$(1)/test/rusttest-$(2)$$(X_$(2)): \
329+
$(3)/test/rusttest.stage$(1)-$(2)$$(X_$(2)): \
330330
$$(RUST_LIB) $$(RUST_INPUTS) \
331331
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC_$(2))
332332
@$$(call E, compile_and_link: $$@)
333333
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
334334

335-
$(3)/stage$(1)/test/rustdoctest-$(2)$$(X_$(2)): \
335+
$(3)/test/rustdoctest.stage$(1)-$(2)$$(X_$(2)): \
336336
$$(RUSTDOC_LIB) $$(RUSTDOC_INPUTS) \
337337
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC_$(2))
338338
@$$(call E, compile_and_link: $$@)
@@ -349,7 +349,7 @@ define DEF_TEST_CRATE_RULES
349349
check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4))
350350

351351
$$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
352-
$(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2))
352+
$(3)/test/$(4)test.stage$(1)-$(2)$$(X_$(2))
353353
@$$(call E, run: $$<)
354354
$$(Q)$$(call CFG_RUN_TEST_$(2),$$<,$(2),$(3)) $$(TESTARGS) \
355355
--logfile $$(call TEST_LOG_FILE,$(1),$(2),$(3),$(4)) \
@@ -360,7 +360,7 @@ define DEF_TEST_CRATE_RULES_arm-linux-androideabi
360360
check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4))
361361

362362
$$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
363-
$(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2))
363+
$(3)/test/$(4)test.stage$(1)-$(2)$$(X_$(2))
364364
@$$(call E, run: $$< via adb)
365365
@$(CFG_ADB) push $$< $(CFG_ADB_TEST_DIR)
366366
@$(CFG_ADB) shell LD_LIBRARY_PATH=$(CFG_ADB_TEST_DIR) \
@@ -385,7 +385,7 @@ define DEF_TEST_CRATE_RULES_null
385385
check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4))
386386

387387
$$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
388-
$(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2))
388+
$(3)/test/$(4)test.stage$(1)-$(2)$$(X_$(2))
389389
@$$(call E, run: skipped $$< )
390390
@touch $$@
391391
endef

branches/try2/src/librusti/rusti.rc

Lines changed: 4 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ use std::rl;
3535
* A structure shared across REPL instances for storing history
3636
* such as statements and view items. I wish the AST was sendable.
3737
*/
38-
pub struct Repl {
38+
struct Repl {
3939
prompt: ~str,
4040
binary: ~str,
4141
running: bool,
@@ -122,7 +122,7 @@ fn run(repl: Repl, input: ~str) -> Repl {
122122

123123
debug!("building driver input");
124124
let head = include_str!("wrapper.rs").to_owned();
125-
let foot = fmt!("fn main() {\n%s\n%s\n\nprint({\n%s\n})\n}",
125+
let foot = fmt!("%s\nfn main() {\n%s\n\nprint({\n%s\n})\n}",
126126
repl.view_items, repl.stmts, input);
127127
let wrapped = driver::str_input(head + foot);
128128

@@ -328,8 +328,8 @@ fn run_cmd(repl: &mut Repl, _in: @io::Reader, _out: @io::Writer,
328328

329329
/// Executes a line of input, which may either be rust code or a
330330
/// :command. Returns a new Repl if it has changed.
331-
pub fn run_line(repl: &mut Repl, in: @io::Reader, out: @io::Writer, line: ~str,
332-
use_rl: bool)
331+
fn run_line(repl: &mut Repl, in: @io::Reader, out: @io::Writer, line: ~str,
332+
use_rl: bool)
333333
-> Option<Repl> {
334334
if line.starts_with(":") {
335335
let full = line.substr(1, line.len() - 1);
@@ -421,52 +421,3 @@ pub fn main() {
421421
}
422422
}
423423
}
424-
425-
#[cfg(test)]
426-
mod tests {
427-
use super::*;
428-
429-
fn repl() -> Repl {
430-
Repl {
431-
prompt: ~"rusti> ",
432-
binary: ~"rusti",
433-
running: true,
434-
view_items: ~"",
435-
lib_search_paths: ~[],
436-
stmts: ~""
437-
}
438-
}
439-
440-
fn run_cmds(cmds: &[&str]) {
441-
let mut r = repl();
442-
for cmds.each |&cmd| {
443-
let result = run_line(&mut r, io::stdin(), io::stdout(),
444-
cmd.to_owned(), false);
445-
r = result.expect(fmt!("the command '%s' failed", cmd));
446-
}
447-
}
448-
449-
#[test]
450-
fn run_all() {
451-
// By default, unit tests are run in parallel. Rusti, on the other hand,
452-
// does not enjoy doing this. I suspect that it is because the LLVM
453-
// bindings are not thread-safe (when running parallel tests, some tests
454-
// were triggering assertions in LLVM (or segfaults). Hence, this
455-
// function exists to run everything serially (sadface).
456-
//
457-
// To get some interesting output, run with RUST_LOG=rusti::tests
458-
459-
debug!("hopefully this runs");
460-
run_cmds([""]);
461-
462-
debug!("regression test for #5937");
463-
run_cmds(["use core;", ""]);
464-
465-
debug!("regression test for #5784");
466-
run_cmds(["let a = 1;"]);
467-
468-
debug!("regression test for #5803");
469-
run_cmds(["spawn( || println(\"Please don't segfault\") );",
470-
"do spawn { println(\"Please?\"); }"]);
471-
}
472-
}

branches/try2/src/librusti/wrapper.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
#[allow(unrecognized_lint)];
1919
#[allow(unused_imports)];
2020
#[allow(while_true)];
21-
#[allow(unused_variable)];
2221
#[allow(dead_assignment)];
22+
#[allow(unused_variable)];
2323
#[allow(unused_unsafe)];
2424
#[allow(unused_mut)];
2525

branches/try2/src/librustpkg/tests.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ fn is_rwx(p: &Path) -> bool {
7979

8080
fn test_sysroot() -> Path {
8181
// Totally gross hack but it's just for test cases.
82-
// Infer the sysroot from the exe name and pray that it's right.
83-
// (Did I mention it was a gross hack?)
82+
// Infer the sysroot from the exe name and tack "stage2"
83+
// onto it. (Did I mention it was a gross hack?)
8484
let self_path = os::self_exe_path().expect("Couldn't get self_exe path");
85-
self_path.pop()
85+
self_path.pop().push("stage2")
8686
}
8787

8888
#[test]

branches/try2/src/libstd/flatpipes.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -639,6 +639,7 @@ mod test {
639639
use core::io::BytesWriter;
640640

641641
#[test]
642+
#[ignore(reason = "ebml failure")]
642643
fn test_serializing_memory_stream() {
643644
let writer = BytesWriter();
644645
let chan = serial::writer_chan(writer);
@@ -671,6 +672,7 @@ mod test {
671672
}
672673

673674
#[test]
675+
#[ignore(reason = "ebml failure")]
674676
fn test_serializing_boxes() {
675677
let (port, chan) = serial::pipe_stream();
676678

0 commit comments

Comments
 (0)