Skip to content

Commit 073f5cd

Browse files
committed
Add parallel rustc ui tests
1 parent 0984bec commit 073f5cd

7 files changed

+78
-1
lines changed

src/tools/tidy/src/ui_tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use std::path::{Path, PathBuf};
1414
// #73494.
1515
const ENTRY_LIMIT: usize = 900;
1616
const ISSUES_ENTRY_LIMIT: usize = 1807;
17-
const ROOT_ENTRY_LIMIT: usize = 870;
17+
const ROOT_ENTRY_LIMIT: usize = 871;
1818

1919
const EXPECTED_TEST_FILE_EXTENSIONS: &[&str] = &[
2020
"rs", // test source files
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// compile-flags: -Z threads=16
2+
// build-fail
3+
4+
#![crate_type="rlib"]
5+
#![allow(warnings)]
6+
7+
#[export_name="fail"]
8+
pub fn a() {
9+
}
10+
11+
#[export_name="fail"]
12+
pub fn b() {
13+
//~^ Error symbol `fail` is already defined
14+
}
15+
16+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
error: symbol `fail` is already defined
2+
--> $DIR/cache-after-waiting-issue-111528.rs:12:1
3+
|
4+
LL | pub fn b() {
5+
| ^^^^^^^^^^
6+
7+
error: aborting due to 1 previous error
8+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// compile-flags:-C extra-filename=-1 -Z threads=16
2+
// no-prefer-dynamic
3+
// build-pass
4+
#![crate_name = "crateresolve1"]
5+
#![crate_type = "lib"]
6+
7+
pub fn f() -> isize { 10 }
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// compile-flags: -Z threads=16
2+
// build-pass
3+
4+
pub static GLOBAL: isize = 3;
5+
6+
static GLOBAL0: isize = 4;
7+
8+
pub static GLOBAL2: &'static isize = &GLOBAL0;
9+
10+
pub fn verify_same(a: &'static isize) {
11+
let a = a as *const isize as usize;
12+
let b = &GLOBAL as *const isize as usize;
13+
assert_eq!(a, b);
14+
}
15+
16+
pub fn verify_same2(a: &'static isize) {
17+
let a = a as *const isize as usize;
18+
let b = GLOBAL2 as *const isize as usize;
19+
assert_eq!(a, b);
20+
}
21+
22+
fn main() {}
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// compile-flags: -Z threads=8
2+
// run-pass
3+
4+
fn main() {
5+
println!("Hello world!");
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// compile-flags: -Z threads=16
2+
// run-pass
3+
4+
#[repr(transparent)]
5+
struct Sched {
6+
i: i32,
7+
}
8+
impl Sched {
9+
extern "C" fn get(self) -> i32 { self.i }
10+
}
11+
12+
fn main() {
13+
let s = Sched { i: 4 };
14+
let f = || -> i32 {
15+
s.get()
16+
};
17+
println!("f: {}", f());
18+
}

0 commit comments

Comments
 (0)