Skip to content

Commit 85958ba

Browse files
committed
Put all coretests in a separate crate
1 parent fc0094f commit 85958ba

File tree

162 files changed

+36
-17
lines changed

Some content is hidden

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

162 files changed

+36
-17
lines changed

library/Cargo.lock

+4
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ dependencies = [
7272
[[package]]
7373
name = "core"
7474
version = "0.0.0"
75+
76+
[[package]]
77+
name = "coretests"
78+
version = "0.0.0"
7579
dependencies = [
7680
"rand",
7781
"rand_xorshift",

library/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ resolver = "1"
33
members = [
44
"std",
55
"sysroot",
6+
"coretests",
67
]
78

89
exclude = [

library/core/Cargo.toml

-13
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,6 @@ edition = "2021"
1515
test = false
1616
bench = false
1717

18-
[[test]]
19-
name = "coretests"
20-
path = "tests/lib.rs"
21-
22-
[[bench]]
23-
name = "corebenches"
24-
path = "benches/lib.rs"
25-
test = true
26-
27-
[dev-dependencies]
28-
rand = { version = "0.8.5", default-features = false }
29-
rand_xorshift = { version = "0.3.0", default-features = false }
30-
3118
[features]
3219
# Make panics and failed asserts immediately abort without formatting any message
3320
panic_immediate_abort = []

library/coretests/Cargo.toml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
[package]
2+
name = "coretests"
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 Core 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+
[[test]]
17+
name = "coretests"
18+
path = "tests/lib.rs"
19+
20+
[[bench]]
21+
name = "corebenches"
22+
path = "benches/lib.rs"
23+
test = true
24+
25+
[dev-dependencies]
26+
rand = { version = "0.8.5", default-features = false }
27+
rand_xorshift = { version = "0.3.0", default-features = false }
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

library/coretests/lib.rs

Whitespace-only changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/bootstrap/mk/Makefile.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ check-aux:
5555
$(BOOTSTRAP_ARGS)
5656
# Run standard library tests in Miri.
5757
$(Q)$(BOOTSTRAP) miri --stage 2 \
58-
library/core \
58+
library/coretests \
5959
library/alloc \
6060
$(BOOTSTRAP_ARGS) \
6161
--no-doc
6262
# Some doctests use file system operations to demonstrate dealing with `Result`.
6363
$(Q)MIRIFLAGS="-Zmiri-disable-isolation" \
6464
$(BOOTSTRAP) miri --stage 2 \
65-
library/core \
65+
library/coretests \
6666
library/alloc \
6767
$(BOOTSTRAP_ARGS) \
6868
--doc

src/bootstrap/src/core/build_steps/check.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ impl Step for Std {
4545
const DEFAULT: bool = true;
4646

4747
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
48-
run.crate_or_deps("sysroot").path("library")
48+
run.crate_or_deps("sysroot").crate_or_deps("coretests").path("library")
4949
}
5050

5151
fn make_run(run: RunConfig<'_>) {

src/bootstrap/src/core/build_steps/test.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2673,7 +2673,7 @@ impl Step for Crate {
26732673
const DEFAULT: bool = true;
26742674

26752675
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
2676-
run.crate_or_deps("sysroot")
2676+
run.crate_or_deps("sysroot").crate_or_deps("coretests")
26772677
}
26782678

26792679
fn make_run(run: RunConfig<'_>) {

0 commit comments

Comments
 (0)