diff --git a/tests/minicrater/driver.rs b/tests/minicrater/driver.rs index 236ff6ca6..a5b70250a 100644 --- a/tests/minicrater/driver.rs +++ b/tests/minicrater/driver.rs @@ -145,10 +145,11 @@ impl MinicraterRun { #[macro_export] macro_rules! minicrater { - ($($name:ident $opts:tt,)*) => { + ($( $(#[$cfg:meta])* $name:ident $opts:tt,)*) => { $( #[test] #[ignore] + $(#[$cfg])* fn $name() { use $crate::minicrater::driver::MinicraterRun; MinicraterRun $opts.execute(); diff --git a/tests/minicrater/full/config.toml b/tests/minicrater/full/config.toml index b59a6cab0..2348580af 100644 --- a/tests/minicrater/full/config.toml +++ b/tests/minicrater/full/config.toml @@ -22,3 +22,4 @@ build-log-max-lines = 1000 [github-repos] [local-crates] +memory-hungry = { skip = true } diff --git a/tests/minicrater/full/results.expected.json b/tests/minicrater/full/results.expected.json index f413537e2..b9b65fcd1 100644 --- a/tests/minicrater/full/results.expected.json +++ b/tests/minicrater/full/results.expected.json @@ -90,21 +90,6 @@ ], "url": "https://github.com/rust-lang-nursery/crater/tree/master/local-crates/clippy-warn" }, - { - "name": "memory-hungry (local)", - "res": "spurious-fixed", - "runs": [ - { - "log": "stable/local/memory-hungry", - "res": "build-fail:oom" - }, - { - "log": "beta/local/memory-hungry", - "res": "test-fail:oom" - } - ], - "url": "https://github.com/rust-lang-nursery/crater/tree/master/local-crates/memory-hungry" - }, { "name": "missing-examples (local)", "res": "test-pass", @@ -179,6 +164,15 @@ } ], "url": "https://github.com/rust-lang-nursery/crater/tree/master/local-crates/yanked-deps" + }, + { + "name": "memory-hungry (local)", + "res": "skipped", + "runs": [ + null, + null + ], + "url": "https://github.com/rust-lang-nursery/crater/tree/master/local-crates/memory-hungry" } ] } diff --git a/tests/minicrater/mod.rs b/tests/minicrater/mod.rs index cfd1d7901..c04f311e3 100644 --- a/tests/minicrater/mod.rs +++ b/tests/minicrater/mod.rs @@ -41,4 +41,11 @@ minicrater! { toolchains: &["stable", "stable+rustflags=-Dclippy::all"], ..Default::default() }, + + #[cfg(not(windows))] // `State.OOMKilled` is not set on Windows + resource_exhaustion { + ex: "resource-exhaustion", + crate_select: "demo", + ..Default::default() + }, } diff --git a/tests/minicrater/resource-exhaustion/config.toml b/tests/minicrater/resource-exhaustion/config.toml new file mode 100644 index 000000000..22c23d98f --- /dev/null +++ b/tests/minicrater/resource-exhaustion/config.toml @@ -0,0 +1,24 @@ +[server.bot-acl] +rust-teams = true +github = ["pietroalbini"] + +[server.labels] +remove = "^S-" +experiment-queued = "S-waiting-on-crater" +experiment-completed = "S-waiting-on-review" + +[demo-crates] +crates = [] +github-repos = [] +local-crates = ["build-pass", "memory-hungry"] + +[sandbox] +memory-limit = "512M" +build-log-max-size = "2M" +build-log-max-lines = 1000 + +[crates] + +[github-repos] + +[local-crates] diff --git a/tests/minicrater/resource-exhaustion/results.expected.json b/tests/minicrater/resource-exhaustion/results.expected.json new file mode 100644 index 000000000..07236917d --- /dev/null +++ b/tests/minicrater/resource-exhaustion/results.expected.json @@ -0,0 +1,34 @@ +{ + "crates": [ + { + "name": "build-pass (local)", + "res": "test-pass", + "runs": [ + { + "log": "stable/local/build-pass", + "res": "test-pass" + }, + { + "log": "beta/local/build-pass", + "res": "test-pass" + } + ], + "url": "https://github.com/rust-lang-nursery/crater/tree/master/local-crates/build-pass" + }, + { + "name": "memory-hungry (local)", + "res": "spurious-fixed", + "runs": [ + { + "log": "stable/local/memory-hungry", + "res": "build-fail:oom" + }, + { + "log": "beta/local/memory-hungry", + "res": "test-fail:oom" + } + ], + "url": "https://github.com/rust-lang-nursery/crater/tree/master/local-crates/memory-hungry" + } + ] +}