Skip to content

Commit 61fdedf

Browse files
Move memory exhaustion out of full
This test will always on Windows because its docker engine does not yet support the `State.OOMKilled` flag. We move it out of `full` and into its own minicrater run (which is disabled on Windows).
1 parent 1030d06 commit 61fdedf

File tree

6 files changed

+77
-16
lines changed

6 files changed

+77
-16
lines changed

tests/minicrater/driver.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,11 @@ impl MinicraterRun {
145145

146146
#[macro_export]
147147
macro_rules! minicrater {
148-
($($name:ident $opts:tt,)*) => {
148+
($( $(#[$cfg:meta])* $name:ident $opts:tt,)*) => {
149149
$(
150150
#[test]
151151
#[ignore]
152+
$(#[$cfg])*
152153
fn $name() {
153154
use $crate::minicrater::driver::MinicraterRun;
154155
MinicraterRun $opts.execute();

tests/minicrater/full/config.toml

+1
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ build-log-max-lines = 1000
2222
[github-repos]
2323

2424
[local-crates]
25+
memory-hungry = { skip = true }

tests/minicrater/full/results.expected.json

+9-15
Original file line numberDiff line numberDiff line change
@@ -90,21 +90,6 @@
9090
],
9191
"url": "https://github.com/rust-lang-nursery/crater/tree/master/local-crates/clippy-warn"
9292
},
93-
{
94-
"name": "memory-hungry (local)",
95-
"res": "spurious-fixed",
96-
"runs": [
97-
{
98-
"log": "stable/local/memory-hungry",
99-
"res": "build-fail:oom"
100-
},
101-
{
102-
"log": "beta/local/memory-hungry",
103-
"res": "test-fail:oom"
104-
}
105-
],
106-
"url": "https://github.com/rust-lang-nursery/crater/tree/master/local-crates/memory-hungry"
107-
},
10893
{
10994
"name": "missing-examples (local)",
11095
"res": "test-pass",
@@ -179,6 +164,15 @@
179164
}
180165
],
181166
"url": "https://github.com/rust-lang-nursery/crater/tree/master/local-crates/yanked-deps"
167+
},
168+
{
169+
"name": "memory-hungry (local)",
170+
"res": "skipped",
171+
"runs": [
172+
null,
173+
null
174+
],
175+
"url": "https://github.com/rust-lang-nursery/crater/tree/master/local-crates/memory-hungry"
182176
}
183177
]
184178
}

tests/minicrater/mod.rs

+7
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,11 @@ minicrater! {
4141
toolchains: &["stable", "stable+rustflags=-Dclippy::all"],
4242
..Default::default()
4343
},
44+
45+
#[cfg(not(windows))] // `State.OOMKilled` is not set on Windows
46+
resource_exhaustion {
47+
ex: "resource-exhaustion",
48+
crate_select: "demo",
49+
..Default::default()
50+
},
4451
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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+
[demo-crates]
11+
crates = []
12+
github-repos = []
13+
local-crates = ["build-pass", "memory-hungry"]
14+
15+
[sandbox]
16+
memory-limit = "512M"
17+
build-log-max-size = "2M"
18+
build-log-max-lines = 1000
19+
20+
[crates]
21+
22+
[github-repos]
23+
24+
[local-crates]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"crates": [
3+
{
4+
"name": "build-pass (local)",
5+
"res": "test-pass",
6+
"runs": [
7+
{
8+
"log": "stable/local/build-pass",
9+
"res": "test-pass"
10+
},
11+
{
12+
"log": "beta/local/build-pass",
13+
"res": "test-pass"
14+
}
15+
],
16+
"url": "https://github.com/rust-lang-nursery/crater/tree/master/local-crates/build-pass"
17+
},
18+
{
19+
"name": "memory-hungry (local)",
20+
"res": "spurious-fixed",
21+
"runs": [
22+
{
23+
"log": "stable/local/memory-hungry",
24+
"res": "build-fail:oom"
25+
},
26+
{
27+
"log": "beta/local/memory-hungry",
28+
"res": "test-fail:oom"
29+
}
30+
],
31+
"url": "https://github.com/rust-lang-nursery/crater/tree/master/local-crates/memory-hungry"
32+
}
33+
]
34+
}

0 commit comments

Comments
 (0)