From c04d1ca2a4e36625e24844048e7947ad9c0443d6 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Fri, 30 Nov 2018 11:30:18 +0100 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20run=20warnings=20into=20errors?= =?UTF-8?q?=20when=20trying=20Nightly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- etc/taskcluster/decision_task.py | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/etc/taskcluster/decision_task.py b/etc/taskcluster/decision_task.py index 72404882d2c..ea62d282021 100644 --- a/etc/taskcluster/decision_task.py +++ b/etc/taskcluster/decision_task.py @@ -43,7 +43,7 @@ log_artifacts_expire_in = "1 year" build_env = { "RUST_BACKTRACE": "1", - "RUSTFLAGS": "-Dwarnings", + "RUSTFLAGS": "-Dwarnings", # If changing this, also adjust with_rust_nightly() "CARGO_INCREMENTAL": "0", } unix_build_env = { @@ -100,11 +100,21 @@ def macos_unit(): def with_rust_nightly(): - return linux_build_task("Linux x64: with Rust Nightly").with_script(""" - echo "nightly" > rust-toolchain - ./mach build --dev - ./mach test-unit - """).create() + modified_build_env = dict(build_env) + flags = build_env.pop("RUSTFLAGS").split(" ") + flags.remove("-Dwarnings") + if flags: # pragma: no cover + modified_build_env["RUSTFLAGS"] = " ".join(flags) + + return ( + linux_build_task("Linux x64: with Rust Nightly", build_env=modified_build_env) + .with_script(""" + echo "nightly" > rust-toolchain + ./mach build --dev + ./mach test-unit + """) + .create() + ) def android_arm32(): @@ -304,7 +314,7 @@ def macos_task(name): ) -def linux_build_task(name): +def linux_build_task(name, *, build_env=build_env): return ( linux_task(name) # https://docs.taskcluster.net/docs/reference/workers/docker-worker/docs/caches