mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-30 21:16:27 +03:00
update miri-seed handling for run-pass test suite
This commit is contained in:
@@ -68,7 +68,7 @@ fn compile_fail(path: &str, target: &str, opt: bool) {
|
||||
run_tests("compile-fail", path, target, flags);
|
||||
}
|
||||
|
||||
fn miri_pass(path: &str, target: &str, opt: bool, noseed: bool) {
|
||||
fn miri_pass(path: &str, target: &str, opt: bool) {
|
||||
let opt_str = if opt { " with optimizations" } else { "" };
|
||||
eprintln!("{}", format!(
|
||||
"## Running run-pass tests in {} against miri for target {}{}",
|
||||
@@ -80,9 +80,6 @@ fn miri_pass(path: &str, target: &str, opt: bool, noseed: bool) {
|
||||
let mut flags = Vec::new();
|
||||
if opt {
|
||||
flags.push("-Zmir-opt-level=3".to_owned());
|
||||
} else if !noseed {
|
||||
// Run with intptrcast. Avoid test matrix explosion by doing either this or opt-level=3.
|
||||
flags.push("-Zmiri-seed=".to_owned());
|
||||
}
|
||||
|
||||
run_tests("ui", path, target, flags);
|
||||
@@ -106,8 +103,7 @@ fn get_target() -> String {
|
||||
}
|
||||
|
||||
fn run_pass_miri(opt: bool) {
|
||||
miri_pass("tests/run-pass", &get_target(), opt, false);
|
||||
miri_pass("tests/run-pass-noseed", &get_target(), opt, true);
|
||||
miri_pass("tests/run-pass", &get_target(), opt);
|
||||
}
|
||||
|
||||
fn compile_fail_miri(opt: bool) {
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// compile-flags: -Zmiri-seed=0000000000000000
|
||||
|
||||
use std::collections::{self, HashMap};
|
||||
use std::hash::{BuildHasherDefault, BuildHasher};
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// compile-flags: -Zmiri-seed=
|
||||
#![feature(allocator_api)]
|
||||
|
||||
use std::ptr::NonNull;
|
||||
@@ -1,5 +1,3 @@
|
||||
// compile-flags: -Zmiri-seed=0000000000000000
|
||||
|
||||
// This returns a miri pointer at type usize, if the argument is a proper pointer
|
||||
fn transmute_ptr_to_int<T>(x: *const T) -> usize {
|
||||
unsafe { std::mem::transmute(x) }
|
||||
@@ -1,5 +1,4 @@
|
||||
//ignore-windows: Uses POSIX APIs
|
||||
//compile-flags: -Zmiri-seed=
|
||||
|
||||
#![feature(rustc_private)]
|
||||
|
||||
Reference in New Issue
Block a user