Skip to content

Commit

Permalink
Auto merge of rust-lang#33317 - michaelwoerister:fix-partitioning-tes…
Browse files Browse the repository at this point in the history
…ts-race, r=alexcrichton

Fix a race condition caused by concurrently executed codegen unit tests.

This hopefully fixes issue rust-lang#33315.

This short-term solution just makes sure that every test uses its own directory so they can't get into conflict with each other.

As a more long-term solution, I'd probably prefer to make the partitioning scheme specifiable via `-Ccodegen-units` (e.g. like `-Ccodegen-units=per-module`) so that we don't have to rely on `-Zincremental` in these test cases.

r? @alexcrichton
  • Loading branch information
bors committed May 1, 2016
2 parents 2a815a2 + a4128e5 commit a4b0481
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 10 deletions.
5 changes: 4 additions & 1 deletion src/test/codegen-units/partitioning/extern-drop-glue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
// except according to those terms.

// ignore-tidy-linelength
// compile-flags:-Zprint-trans-items=lazy -Zincremental=tmp

// We specify -Z incremental here because we want to test the partitioning for
// incremental compilation
// compile-flags:-Zprint-trans-items=lazy -Zincremental=tmp/partitioning-tests/extern-drop-glue

#![allow(dead_code)]
#![crate_type="lib"]
Expand Down
4 changes: 3 additions & 1 deletion src/test/codegen-units/partitioning/extern-generic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
// except according to those terms.

// ignore-tidy-linelength
// compile-flags:-Zprint-trans-items=eager -Zincremental=tmp
// We specify -Z incremental here because we want to test the partitioning for
// incremental compilation
// compile-flags:-Zprint-trans-items=eager -Zincremental=tmp/partitioning-tests/extern-generic

#![allow(dead_code)]
#![crate_type="lib"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
// except according to those terms.

// ignore-tidy-linelength
// compile-flags:-Zprint-trans-items=lazy -Zincremental=tmp
// We specify -Z incremental here because we want to test the partitioning for
// incremental compilation
// compile-flags:-Zprint-trans-items=lazy -Zincremental=tmp/partitioning-tests/inlining-from-extern-crate

#![crate_type="lib"]

Expand Down
4 changes: 3 additions & 1 deletion src/test/codegen-units/partitioning/local-drop-glue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
// except according to those terms.

// ignore-tidy-linelength
// compile-flags:-Zprint-trans-items=lazy -Zincremental=tmp
// We specify -Z incremental here because we want to test the partitioning for
// incremental compilation
// compile-flags:-Zprint-trans-items=lazy -Zincremental=tmp/partitioning-tests/local-drop-glue

#![allow(dead_code)]
#![crate_type="lib"]
Expand Down
4 changes: 3 additions & 1 deletion src/test/codegen-units/partitioning/local-generic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
// except according to those terms.

// ignore-tidy-linelength
// compile-flags:-Zprint-trans-items=eager -Zincremental=tmp
// We specify -Z incremental here because we want to test the partitioning for
// incremental compilation
// compile-flags:-Zprint-trans-items=eager -Zincremental=tmp/partitioning-tests/local-generic

#![allow(dead_code)]
#![crate_type="lib"]
Expand Down
4 changes: 3 additions & 1 deletion src/test/codegen-units/partitioning/local-inlining.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
// except according to those terms.

// ignore-tidy-linelength
// compile-flags:-Zprint-trans-items=lazy -Zincremental=tmp
// We specify -Z incremental here because we want to test the partitioning for
// incremental compilation
// compile-flags:-Zprint-trans-items=lazy -Zincremental=tmp/partitioning-tests/local-inlining

#![allow(dead_code)]
#![crate_type="lib"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
// except according to those terms.

// ignore-tidy-linelength
// compile-flags:-Zprint-trans-items=lazy -Zincremental=tmp
// We specify -Z incremental here because we want to test the partitioning for
// incremental compilation
// compile-flags:-Zprint-trans-items=lazy -Zincremental=tmp/partitioning-tests/local-transitive-inlining

#![allow(dead_code)]
#![crate_type="lib"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
// except according to those terms.

// ignore-tidy-linelength
// compile-flags:-Zprint-trans-items=lazy -Zincremental=tmp
// We specify -Z incremental here because we want to test the partitioning for
// incremental compilation
// compile-flags:-Zprint-trans-items=lazy -Zincremental=tmp/partitioning-tests/methods-are-with-self-type

#![allow(dead_code)]

Expand Down
4 changes: 3 additions & 1 deletion src/test/codegen-units/partitioning/regular-modules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
// except according to those terms.

// ignore-tidy-linelength
// compile-flags:-Zprint-trans-items=eager -Z incremental=tmp
// We specify -Z incremental here because we want to test the partitioning for
// incremental compilation
// compile-flags:-Zprint-trans-items=eager -Zincremental=tmp/partitioning-tests/regular-modules

#![allow(dead_code)]
#![crate_type="lib"]
Expand Down
4 changes: 3 additions & 1 deletion src/test/codegen-units/partitioning/statics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
// except according to those terms.

// ignore-tidy-linelength
// compile-flags:-Zprint-trans-items=lazy -Zincremental=tmp
// We specify -Z incremental here because we want to test the partitioning for
// incremental compilation
// compile-flags:-Zprint-trans-items=lazy -Zincremental=tmp/partitioning-tests/statics

#![crate_type="lib"]

Expand Down

0 comments on commit a4b0481

Please sign in to comment.