diff --git a/substrate/frame/support/test/tests/construct_runtime_ui.rs b/substrate/frame/support/test/tests/construct_runtime_ui.rs
index 38aa78076683521a975a3b4da6d650a102d4d4ea..42fd87ca95c0e9d02830ab35e3fb50ec48613ff6 100644
--- a/substrate/frame/support/test/tests/construct_runtime_ui.rs
+++ b/substrate/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");
diff --git a/substrate/scripts/ci/gitlab/pipeline/test.yml b/substrate/scripts/ci/gitlab/pipeline/test.yml
index e85ab85afe6ed411231ba03b8bd89713b3bbc105..b405cfa1eb3a41b1fc7de1051f58cadb1cb78043 100644
--- a/substrate/scripts/ci/gitlab/pipeline/test.yml
+++ b/substrate/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: