Skip to content

Commit f5853dd

Browse files
committed
Add tests for doc runs
1 parent 8f89b8a commit f5853dd

20 files changed

+1323
-118
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[package]
2+
name = "docs-rs-features"
3+
version = "0.1.0"
4+
authors = ["Joshua Nelson <jyn514@gmail.com>"]
5+
edition = "2018"
6+
7+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
8+
9+
[dependencies]
10+
11+
[package.metadata.docs.rs]
12+
features = ["docs_rs_feature"]
13+
14+
[features]
15+
docs_rs_feature = []
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#[cfg(any(doc, feature = "docs_rs_feature"))]
2+
compile_error!("oh no, a hidden regression!");
3+
4+
fn main() {
5+
println!("Hello, world!");
6+
}

src/runner/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ pub(super) fn test_rustdoc<DB: WriteResults>(
359359
let cargo_args = metadata.cargo_args();
360360
assert_eq!(cargo_args[0], "doc");
361361
let mut cargo_args: Vec<_> = cargo_args.iter().map(|s| s.as_str()).collect();
362-
cargo_args.push("frozen");
362+
cargo_args.push("--frozen");
363363
cargo_args.push("--message-format=json");
364364

365365
let res = run_cargo(

tests/minicrater/doc/config.toml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
[server.bot-acl]
2+
rust-teams = true
3+
github = ["pietroalbini"]
4+
5+
[server.labels]
6+
remove = "^S-"
7+
experiment-queued = "S-waiting-on-crater"
8+
experiment-completed = "S-waiting-on-review"
9+
10+
[server.distributed]
11+
chunk-size = 32
12+
13+
[demo-crates]
14+
crates = []
15+
github-repos = []
16+
local-crates = ["build-pass", "docs-rs-features"]
17+
18+
[sandbox]
19+
memory-limit = "512M"
20+
build-log-max-size = "2M"
21+
build-log-max-lines = 1000
22+
23+
[crates]
24+
25+
[github-repos]
26+
27+
[local-crates]
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"available_archives": [
3+
{
4+
"name": "All the crates",
5+
"path": "logs-archives/all.tar.gz"
6+
},
7+
{
8+
"name": "error crates",
9+
"path": "logs-archives/error.tar.gz"
10+
},
11+
{
12+
"name": "broken crates",
13+
"path": "logs-archives/broken.tar.gz"
14+
},
15+
{
16+
"name": "build-fail crates",
17+
"path": "logs-archives/build-fail.tar.gz"
18+
}
19+
],
20+
"crates_count": 17,
21+
"nav": [
22+
{
23+
"active": false,
24+
"label": "Summary",
25+
"url": "index.html"
26+
},
27+
{
28+
"active": false,
29+
"label": "Full report",
30+
"url": "full.html"
31+
},
32+
{
33+
"active": true,
34+
"label": "Downloads",
35+
"url": "downloads.html"
36+
}
37+
]
38+
}

0 commit comments

Comments
 (0)