WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit df100d3

Browse files
authored
test(doc): Remove unused build script (#16344)
### What does this PR try to resolve? I am no seeing this as being relevant to the case under test and it takes up more disk space and takes longer to execute. ### How to test and review this PR?
2 parents 33be686 + 717f0f6 commit df100d3

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

tests/testsuite/doc.rs

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,55 +1062,56 @@ fn features() {
10621062
bar = []
10631063
"#,
10641064
)
1065-
.file(
1066-
"bar/build.rs",
1067-
r#"
1068-
fn main() {
1069-
println!("cargo::rustc-cfg=bar");
1070-
}
1071-
"#,
1072-
)
10731065
.file(
10741066
"bar/src/lib.rs",
10751067
r#"#[cfg(feature = "bar")] pub fn bar() {}"#,
10761068
)
10771069
.build();
10781070
p.cargo("doc --features foo")
1079-
.with_stderr_data(str![[r#"
1071+
.with_stderr_data(
1072+
str![[r#"
10801073
[LOCKING] 1 package to latest compatible version
1081-
[COMPILING] bar v0.0.1 ([ROOT]/foo/bar)
1074+
[CHECKING] bar v0.0.1 ([ROOT]/foo/bar)
10821075
[DOCUMENTING] bar v0.0.1 ([ROOT]/foo/bar)
10831076
[DOCUMENTING] foo v0.0.1 ([ROOT]/foo)
10841077
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
10851078
[GENERATED] [ROOT]/foo/target/doc/foo/index.html
10861079
1087-
"#]])
1080+
"#]]
1081+
.unordered(),
1082+
)
10881083
.run();
10891084
assert!(p.root().join("target/doc").is_dir());
10901085
assert!(p.root().join("target/doc/foo/fn.foo.html").is_file());
10911086
assert!(p.root().join("target/doc/bar/fn.bar.html").is_file());
10921087
// Check that turning the feature off will remove the files.
10931088
p.cargo("doc")
1094-
.with_stderr_data(str![[r#"
1095-
[COMPILING] bar v0.0.1 ([ROOT]/foo/bar)
1089+
.with_stderr_data(
1090+
str![[r#"
1091+
[CHECKING] bar v0.0.1 ([ROOT]/foo/bar)
10961092
[DOCUMENTING] bar v0.0.1 ([ROOT]/foo/bar)
10971093
[DOCUMENTING] foo v0.0.1 ([ROOT]/foo)
10981094
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
10991095
[GENERATED] [ROOT]/foo/target/doc/foo/index.html
11001096
1101-
"#]])
1097+
"#]]
1098+
.unordered(),
1099+
)
11021100
.run();
11031101
assert!(!p.root().join("target/doc/foo/fn.foo.html").is_file());
11041102
assert!(!p.root().join("target/doc/bar/fn.bar.html").is_file());
11051103
// And switching back will rebuild and bring them back.
11061104
p.cargo("doc --features foo")
1107-
.with_stderr_data(str![[r#"
1105+
.with_stderr_data(
1106+
str![[r#"
11081107
[DOCUMENTING] bar v0.0.1 ([ROOT]/foo/bar)
11091108
[DOCUMENTING] foo v0.0.1 ([ROOT]/foo)
11101109
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
11111110
[GENERATED] [ROOT]/foo/target/doc/foo/index.html
11121111
1113-
"#]])
1112+
"#]]
1113+
.unordered(),
1114+
)
11141115
.run();
11151116
assert!(p.root().join("target/doc/foo/fn.foo.html").is_file());
11161117
assert!(p.root().join("target/doc/bar/fn.bar.html").is_file());

0 commit comments

Comments
 (0)