also test parts of std
requires disabling some tests that do not work
This commit is contained in:
parent
c0b564b767
commit
1242093da2
5 changed files with 16 additions and 1 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
// Disabling in Miri as these would take too long.
|
||||||
|
#![cfg(not(miri))]
|
||||||
#![feature(test)]
|
#![feature(test)]
|
||||||
|
|
||||||
extern crate test;
|
extern crate test;
|
||||||
|
|
|
@ -8,6 +8,7 @@ use std::str;
|
||||||
mod common;
|
mod common;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
#[cfg_attr(miri, ignore)] // Process spawning not supported by Miri
|
||||||
fn issue_15149() {
|
fn issue_15149() {
|
||||||
// If we're the parent, copy our own binary to a new directory.
|
// If we're the parent, copy our own binary to a new directory.
|
||||||
let my_path = env::current_exe().unwrap();
|
let my_path = env::current_exe().unwrap();
|
||||||
|
|
|
@ -51,6 +51,7 @@ fn switch_stdout_to(file: OwnedHandle) -> OwnedHandle {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
#[cfg_attr(miri, ignore)] // dup/SetStdHandle not supported by Miri
|
||||||
fn switch_stdout() {
|
fn switch_stdout() {
|
||||||
let temp = common::tmpdir();
|
let temp = common::tmpdir();
|
||||||
let path = temp.join("switch-stdout-output");
|
let path = temp.join("switch-stdout-output");
|
||||||
|
|
|
@ -5,7 +5,8 @@ use std::time::Duration;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg_attr(target_os = "emscripten", ignore)]
|
#[cfg_attr(target_os = "emscripten", ignore)]
|
||||||
fn sleep() {
|
#[cfg_attr(miri, ignore)] // Miri does not like the thread leak
|
||||||
|
fn sleep_very_long() {
|
||||||
let finished = Arc::new(Mutex::new(false));
|
let finished = Arc::new(Mutex::new(false));
|
||||||
let t_finished = finished.clone();
|
let t_finished = finished.clone();
|
||||||
thread::spawn(move || {
|
thread::spawn(move || {
|
||||||
|
|
|
@ -57,11 +57,21 @@ check-aux:
|
||||||
library/core \
|
library/core \
|
||||||
library/alloc \
|
library/alloc \
|
||||||
--no-doc
|
--no-doc
|
||||||
|
# Some doctests have intentional memory leaks.
|
||||||
$(Q)MIRIFLAGS="-Zmiri-ignore-leaks -Zmiri-disable-isolation" \
|
$(Q)MIRIFLAGS="-Zmiri-ignore-leaks -Zmiri-disable-isolation" \
|
||||||
$(BOOTSTRAP) miri --stage 2 \
|
$(BOOTSTRAP) miri --stage 2 \
|
||||||
library/core \
|
library/core \
|
||||||
library/alloc \
|
library/alloc \
|
||||||
--doc
|
--doc
|
||||||
|
# In `std` we cannot test everything, so we test the most target-dependent modules.
|
||||||
|
$(Q)MIRIFLAGS="-Zmiri-disable-isolation" BOOTSTRAP_SKIP_TARGET_SANITY=1 \
|
||||||
|
$(BOOTSTRAP) miri --stage 2 library/std \
|
||||||
|
--no-doc -- \
|
||||||
|
--skip fs:: --skip net:: --skip process:: --skip sys::pal::
|
||||||
|
$(Q)MIRIFLAGS="-Zmiri-ignore-leaks -Zmiri-disable-isolation" BOOTSTRAP_SKIP_TARGET_SANITY=1 \
|
||||||
|
$(BOOTSTRAP) miri --stage 2 library/std \
|
||||||
|
--doc -- \
|
||||||
|
--skip fs:: --skip net:: --skip process:: --skip sys::pal::
|
||||||
dist:
|
dist:
|
||||||
$(Q)$(BOOTSTRAP) dist $(BOOTSTRAP_ARGS)
|
$(Q)$(BOOTSTRAP) dist $(BOOTSTRAP_ARGS)
|
||||||
distcheck:
|
distcheck:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue