From dc07594b3084fc951740f1e00f4c70ac5228f62a Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Thu, 20 Oct 2022 19:40:41 +0200 Subject: [PATCH 1/2] CI: Enable debug assertions in Wasmer sandbox test Signed-off-by: Oliver Tale-Yazdi --- scripts/ci/gitlab/pipeline/test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/ci/gitlab/pipeline/test.yml b/scripts/ci/gitlab/pipeline/test.yml index e85ab85afe6ed..b405cfa1eb3a4 100644 --- a/scripts/ci/gitlab/pipeline/test.yml +++ b/scripts/ci/gitlab/pipeline/test.yml @@ -394,6 +394,10 @@ test-wasmer-sandbox: - .docker-env - .test-refs-wasmer-sandbox variables: + RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings" + RUST_BACKTRACE: 1 + WASM_BUILD_NO_COLOR: 1 + WASM_BUILD_RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings" CI_JOB_NAME: "test-wasmer-sandbox" parallel: 3 script: From 4c9fe08eaac63d1eedb8da70033cf0d7df301963 Mon Sep 17 00:00:00 2001 From: Oliver Tale-Yazdi Date: Thu, 20 Oct 2022 20:04:48 +0200 Subject: [PATCH 2/2] Fix feature dependant import Signed-off-by: Oliver Tale-Yazdi --- frame/support/test/tests/construct_runtime_ui.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/frame/support/test/tests/construct_runtime_ui.rs b/frame/support/test/tests/construct_runtime_ui.rs index 38aa780766835..42fd87ca95c0e 100644 --- a/frame/support/test/tests/construct_runtime_ui.rs +++ b/frame/support/test/tests/construct_runtime_ui.rs @@ -15,19 +15,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -use std::env; - #[rustversion::attr(not(stable), ignore)] #[cfg(not(feature = "disable-ui-tests"))] #[test] fn ui() { // Only run the ui tests when `RUN_UI_TESTS` is set. - if env::var("RUN_UI_TESTS").is_err() { + if std::env::var("RUN_UI_TESTS").is_err() { return } // As trybuild is using `cargo check`, we don't need the real WASM binaries. - env::set_var("SKIP_WASM_BUILD", "1"); + std::env::set_var("SKIP_WASM_BUILD", "1"); let t = trybuild::TestCases::new(); t.compile_fail("tests/construct_runtime_ui/*.rs");