Skip to content

Commit d0dbe63

Browse files
committed
remove 2 tests
These 2 tests showcase some optimization between build time and runtime unit sharing that is not applicable anymore with the general debuginfo removal for all build dependencies.
1 parent 7f02ff0 commit d0dbe63

File tree

2 files changed

+0
-126
lines changed

2 files changed

+0
-126
lines changed

tests/testsuite/build_script.rs

-61
Original file line numberDiff line numberDiff line change
@@ -4502,67 +4502,6 @@ fn optional_build_script_dep() {
45024502
p.cargo("run --features bar").with_stdout("1\n").run();
45034503
}
45044504

4505-
#[cargo_test]
4506-
fn optional_build_dep_and_required_normal_dep() {
4507-
let p = project()
4508-
.file(
4509-
"Cargo.toml",
4510-
r#"
4511-
[package]
4512-
name = "foo"
4513-
version = "0.1.0"
4514-
authors = []
4515-
4516-
[dependencies]
4517-
bar = { path = "./bar", optional = true }
4518-
4519-
[build-dependencies]
4520-
bar = { path = "./bar" }
4521-
"#,
4522-
)
4523-
.file("build.rs", "extern crate bar; fn main() { bar::bar(); }")
4524-
.file(
4525-
"src/main.rs",
4526-
r#"
4527-
#[cfg(feature = "bar")]
4528-
extern crate bar;
4529-
4530-
fn main() {
4531-
#[cfg(feature = "bar")] {
4532-
println!("{}", bar::bar());
4533-
}
4534-
#[cfg(not(feature = "bar"))] {
4535-
println!("0");
4536-
}
4537-
}
4538-
"#,
4539-
)
4540-
.file("bar/Cargo.toml", &basic_manifest("bar", "0.5.0"))
4541-
.file("bar/src/lib.rs", "pub fn bar() -> u32 { 1 }");
4542-
let p = p.build();
4543-
4544-
p.cargo("run")
4545-
.with_stdout("0")
4546-
.with_stderr(
4547-
"\
4548-
[COMPILING] bar v0.5.0 ([..])
4549-
[COMPILING] foo v0.1.0 ([..])
4550-
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
4551-
[RUNNING] `[..]foo[EXE]`",
4552-
)
4553-
.run();
4554-
4555-
p.cargo("run --all-features")
4556-
.with_stdout("1")
4557-
.with_stderr(
4558-
"\
4559-
[COMPILING] foo v0.1.0 ([..])
4560-
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
4561-
[RUNNING] `[..]foo[EXE]`",
4562-
)
4563-
.run();
4564-
}
4565-
45664505
#[cargo_test]
45674506
fn using_rerun_if_changed_does_not_rebuild() {
45684507
let p = project()

tests/testsuite/features2.rs

-65
Original file line numberDiff line numberDiff line change
@@ -1047,71 +1047,6 @@ fn decouple_proc_macro() {
10471047
.exists());
10481048
}
10491049

1050-
#[cargo_test]
1051-
fn proc_macro_ws() {
1052-
// Checks for bug with proc-macro in a workspace with dependency (shouldn't panic).
1053-
let p = project()
1054-
.file(
1055-
"Cargo.toml",
1056-
r#"
1057-
[workspace]
1058-
members = ["foo", "pm"]
1059-
resolver = "2"
1060-
"#,
1061-
)
1062-
.file(
1063-
"foo/Cargo.toml",
1064-
r#"
1065-
[package]
1066-
name = "foo"
1067-
version = "0.1.0"
1068-
1069-
[features]
1070-
feat1 = []
1071-
"#,
1072-
)
1073-
.file("foo/src/lib.rs", "")
1074-
.file(
1075-
"pm/Cargo.toml",
1076-
r#"
1077-
[package]
1078-
name = "pm"
1079-
version = "0.1.0"
1080-
1081-
[lib]
1082-
proc-macro = true
1083-
1084-
[dependencies]
1085-
foo = { path = "../foo", features=["feat1"] }
1086-
"#,
1087-
)
1088-
.file("pm/src/lib.rs", "")
1089-
.build();
1090-
1091-
p.cargo("check -p pm -v")
1092-
.with_stderr_contains("[RUNNING] `rustc --crate-name foo [..]--cfg[..]feat1[..]")
1093-
.run();
1094-
// This may be surprising that `foo` doesn't get built separately. It is
1095-
// because pm might have other units (binaries, tests, etc.), and so the
1096-
// feature resolver must assume that normal deps get unified with it. This
1097-
// is related to the bigger issue where the features selected in a
1098-
// workspace depend on which packages are selected.
1099-
p.cargo("check --workspace -v")
1100-
.with_stderr(
1101-
"\
1102-
[FRESH] foo v0.1.0 [..]
1103-
[FRESH] pm v0.1.0 [..]
1104-
[FINISHED] dev [..]
1105-
",
1106-
)
1107-
.run();
1108-
// Selecting just foo will build without unification.
1109-
p.cargo("check -p foo -v")
1110-
// Make sure `foo` is built without feat1
1111-
.with_stderr_line_without(&["[RUNNING] `rustc --crate-name foo"], &["--cfg[..]feat1"])
1112-
.run();
1113-
}
1114-
11151050
#[cargo_test]
11161051
fn has_dev_dep_for_test() {
11171052
// Check for a bug where the decision on whether or not "dev dependencies"

0 commit comments

Comments
 (0)