vyre-conform 0.1.0

Conformance suite for vyre backends — proves byte-identical output to CPU reference
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::fs;
use std::io;
use std::path::{Path, PathBuf};
use std::time::{Duration, Instant};
use crate::spec::types::MutationClass;
use super::mutation_cargo::{assert_source_matches_original, run_cargo_test};
pub use super::probe::{canary_plus_to_minus, mutation_probe};

/// Snapshots a file's contents on creation and restores them on drop.
/// If the drop handler fails to restore (disk full, permission error),
/// we emit an eprintln and set a global flag the probe checks before
/// exiting so the caller is alerted rather than silently corrupting
/// the working tree.
struct SourceSnapshot {
    path: PathBuf,
    original: Vec<u8>,
    restored: bool,
}