Skip to content

Commit fb04372

Browse files
committed
Move all alloc integration tests to a new alloctests crate
1 parent 03eb454 commit fb04372

Some content is hidden

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

58 files changed

+73
-25
lines changed

library/Cargo.lock

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@ version = "0.2.21"
4040
source = "registry+https://github.com/rust-lang/crates.io-index"
4141
checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923"
4242

43+
[[package]]
44+
name = "alloctests"
45+
version = "0.0.0"
46+
dependencies = [
47+
"rand",
48+
"rand_xorshift",
49+
]
50+
4351
[[package]]
4452
name = "cc"
4553
version = "1.2.0"

library/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ members = [
44
"std",
55
"sysroot",
66
"coretests",
7+
"alloctests",
78
]
89

910
exclude = [

library/alloc/Cargo.toml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,6 @@ compiler_builtins = { version = "=0.1.151", features = ['rustc-dep-of-std'] }
1818
rand = { version = "0.9.0", default-features = false, features = ["alloc"] }
1919
rand_xorshift = "0.4.0"
2020

21-
[[test]]
22-
name = "alloctests"
23-
path = "tests/lib.rs"
24-
25-
[[test]]
26-
name = "vec_deque_alloc_error"
27-
path = "tests/vec_deque_alloc_error.rs"
28-
29-
[[bench]]
30-
name = "allocbenches"
31-
path = "benches/lib.rs"
32-
test = true
33-
34-
[[bench]]
35-
name = "vec_deque_append_bench"
36-
path = "benches/vec_deque_append.rs"
37-
harness = false
38-
3921
[features]
4022
compiler-builtins-mem = ['compiler_builtins/mem']
4123
compiler-builtins-c = ["compiler_builtins/c"]
File renamed without changes.
File renamed without changes.

library/alloctests/Cargo.toml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
[package]
2+
name = "alloctests"
3+
version = "0.0.0"
4+
license = "MIT OR Apache-2.0"
5+
repository = "https://github.com/rust-lang/rust.git"
6+
description = "Tests for the Rust Allocation Library"
7+
autotests = false
8+
autobenches = false
9+
edition = "2021"
10+
11+
[lib]
12+
path = "lib.rs"
13+
test = false
14+
bench = false
15+
16+
[dev-dependencies]
17+
rand = { version = "0.9.0", default-features = false, features = ["alloc"] }
18+
rand_xorshift = "0.4.0"
19+
20+
[[test]]
21+
name = "alloctests"
22+
path = "tests/lib.rs"
23+
24+
[[test]]
25+
name = "vec_deque_alloc_error"
26+
path = "tests/vec_deque_alloc_error.rs"
27+
28+
[[bench]]
29+
name = "allocbenches"
30+
path = "benches/lib.rs"
31+
test = true
32+
33+
[[bench]]
34+
name = "vec_deque_append_bench"
35+
path = "benches/vec_deque_append.rs"
36+
harness = false
37+
38+
[lints.rust.unexpected_cfgs]
39+
level = "warn"
40+
check-cfg = [
41+
'cfg(bootstrap)',
42+
'cfg(no_global_oom_handling)',
43+
'cfg(no_rc)',
44+
'cfg(no_sync)',
45+
'cfg(randomized_layouts)',
46+
]

0 commit comments

Comments
 (0)