]> git.lizzy.rs Git - rust.git/commitdiff
test with opt levels 0 and 1
authorRalf Jung <post@ralfj.de>
Tue, 16 Oct 2018 15:57:03 +0000 (17:57 +0200)
committerRalf Jung <post@ralfj.de>
Tue, 16 Oct 2018 15:57:03 +0000 (17:57 +0200)
tests/compiletest.rs

index 82a2144a337ded071212f909089a1e803e25b3b1..b240fb31d2223fe53018d88a06c7594df80e0749 100644 (file)
@@ -104,7 +104,11 @@ fn miri_pass(sysroot: &Path, path: &str, target: &str, host: &str, need_fullmir:
         flags.push("-Zmiri-start-fn".to_owned());
     }
     if opt {
-        flags.push("-Zmir-opt-level=3".to_owned());
+        // FIXME: Using level 1 (instead of 3) for now, as the optimizer is pretty broken
+        // and crashes...
+        // Level 0 and 1 are not the same, so this still gives us *some* coverage.
+        // See https://github.com/rust-lang/rust/issues/50411
+        flags.push("-Zmir-opt-level=1".to_owned());
     } else {
         flags.push("-Zmir-opt-level=0".to_owned());
         // For now, only validate without optimizations.  Inlining breaks validation.
@@ -187,9 +191,7 @@ fn test() {
     // uses `libtest` which runs jobs in parallel.
 
     run_pass_miri(false);
-    // FIXME: Disabled for now, as the optimizer is pretty broken and crashes...
-    // See https://github.com/rust-lang/rust/issues/50411
-    //run_pass_miri(true);
+    run_pass_miri(true);
 
     compile_fail_miri();
 }