Format with nightly rustfmt-preview, then with rustfmt-0.9 again.
This commit is contained in:
@@ -4,13 +4,13 @@
|
||||
//! concurrently.
|
||||
|
||||
use cretonne::timing;
|
||||
use num_cpus;
|
||||
use std::panic::catch_unwind;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::sync::mpsc::{channel, Receiver, Sender};
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::thread;
|
||||
use std::time::Duration;
|
||||
use num_cpus;
|
||||
use {runone, TestResult};
|
||||
|
||||
/// Request sent to worker threads contains jobid and path.
|
||||
|
||||
@@ -14,16 +14,16 @@ extern crate cton_reader;
|
||||
extern crate filecheck;
|
||||
extern crate num_cpus;
|
||||
|
||||
use std::path::Path;
|
||||
use std::time;
|
||||
use cton_reader::TestCommand;
|
||||
use runner::TestRunner;
|
||||
use std::path::Path;
|
||||
use std::time;
|
||||
|
||||
mod concurrent;
|
||||
mod match_directive;
|
||||
mod runner;
|
||||
mod runone;
|
||||
mod subtest;
|
||||
mod match_directive;
|
||||
|
||||
mod test_binemit;
|
||||
mod test_cat;
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
//! This module implements the `TestRunner` struct which manages executing tests as well as
|
||||
//! scanning directories for tests.
|
||||
|
||||
use concurrent::{ConcurrentRunner, Reply};
|
||||
use std::error::Error;
|
||||
use std::fmt::{self, Display};
|
||||
use std::ffi::OsStr;
|
||||
use std::fmt::{self, Display};
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::time;
|
||||
use {runone, TestResult};
|
||||
use concurrent::{ConcurrentRunner, Reply};
|
||||
|
||||
/// Timeout in seconds when we're not making progress.
|
||||
const TIMEOUT_PANIC: usize = 10;
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
//! Run the tests in a single test file.
|
||||
|
||||
use std::borrow::Cow;
|
||||
use std::path::Path;
|
||||
use std::time;
|
||||
use std::io::{self, Read};
|
||||
use std::fs;
|
||||
use cretonne::ir::Function;
|
||||
use cretonne::isa::TargetIsa;
|
||||
use cretonne::print_errors::pretty_verifier_error;
|
||||
use cretonne::settings::Flags;
|
||||
use cretonne::timing;
|
||||
use cretonne::verify_function;
|
||||
use cretonne::print_errors::pretty_verifier_error;
|
||||
use cton_reader::parse_test;
|
||||
use cton_reader::IsaSpec;
|
||||
use {new_subtest, TestResult};
|
||||
use cton_reader::parse_test;
|
||||
use std::borrow::Cow;
|
||||
use std::fs;
|
||||
use std::io::{self, Read};
|
||||
use std::path::Path;
|
||||
use std::time;
|
||||
use subtest::{Context, Result, SubTest};
|
||||
use {new_subtest, TestResult};
|
||||
|
||||
/// Read an entire file into a string.
|
||||
fn read_to_string<P: AsRef<Path>>(path: P) -> io::Result<String> {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
//! `SubTest` trait.
|
||||
|
||||
use std::result;
|
||||
use std::borrow::Cow;
|
||||
use cretonne::ir::Function;
|
||||
use cretonne::isa::TargetIsa;
|
||||
use cretonne::settings::{Flags, FlagsOrIsa};
|
||||
use cton_reader::{Comment, Details};
|
||||
use filecheck::{Checker, CheckerBuilder, NO_VARIABLES};
|
||||
use std::borrow::Cow;
|
||||
use std::result;
|
||||
|
||||
pub type Result<T> = result::Result<T, String>;
|
||||
|
||||
|
||||
@@ -3,18 +3,18 @@
|
||||
//! The `binemit` test command generates binary machine code for every instruction in the input
|
||||
//! functions and compares the results to the expected output.
|
||||
|
||||
use std::borrow::Cow;
|
||||
use std::collections::HashMap;
|
||||
use std::fmt::Write;
|
||||
use cretonne::binemit;
|
||||
use cretonne::binemit::RegDiversions;
|
||||
use cretonne::dbg::DisplayList;
|
||||
use cretonne::ir;
|
||||
use cretonne::ir::entities::AnyEntity;
|
||||
use cretonne::binemit::RegDiversions;
|
||||
use cretonne::print_errors::pretty_error;
|
||||
use cton_reader::TestCommand;
|
||||
use subtest::{Context, Result, SubTest};
|
||||
use match_directive::match_directive;
|
||||
use std::borrow::Cow;
|
||||
use std::collections::HashMap;
|
||||
use std::fmt::Write;
|
||||
use subtest::{Context, Result, SubTest};
|
||||
|
||||
struct TestBinEmit;
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
//! The `cat` subtest.
|
||||
|
||||
use std::borrow::Cow;
|
||||
use cretonne::ir::Function;
|
||||
use cton_reader::TestCommand;
|
||||
use std::borrow::Cow;
|
||||
use subtest::{self, Context, Result as STResult, SubTest};
|
||||
|
||||
/// Object implementing the `test cat` sub-test.
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
//!
|
||||
//! The `compile` test command runs each function through the full code generator pipeline
|
||||
|
||||
use cretonne;
|
||||
use cretonne::binemit;
|
||||
use cretonne::ir;
|
||||
use cretonne;
|
||||
use cretonne::print_errors::pretty_error;
|
||||
use cton_reader::TestCommand;
|
||||
use subtest::{run_filecheck, Context, Result, SubTest};
|
||||
use std::borrow::Cow;
|
||||
use std::fmt::Write;
|
||||
use subtest::{run_filecheck, Context, Result, SubTest};
|
||||
|
||||
struct TestCompile;
|
||||
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
//!
|
||||
//! The resulting function is sent to `filecheck`.
|
||||
|
||||
use cretonne::ir::Function;
|
||||
use cretonne;
|
||||
use cretonne::ir::Function;
|
||||
use cretonne::print_errors::pretty_error;
|
||||
use cton_reader::TestCommand;
|
||||
use subtest::{run_filecheck, Context, Result, SubTest};
|
||||
use std::borrow::Cow;
|
||||
use std::fmt::Write;
|
||||
use subtest::{run_filecheck, Context, Result, SubTest};
|
||||
|
||||
struct TestDCE;
|
||||
|
||||
|
||||
@@ -17,12 +17,12 @@ use cretonne::flowgraph::ControlFlowGraph;
|
||||
use cretonne::ir::Function;
|
||||
use cretonne::ir::entities::AnyEntity;
|
||||
use cton_reader::TestCommand;
|
||||
use subtest::{run_filecheck, Context, Result, SubTest};
|
||||
use match_directive::match_directive;
|
||||
use std::borrow::{Borrow, Cow};
|
||||
use std::collections::HashMap;
|
||||
use std::fmt::{self, Write};
|
||||
use std::result;
|
||||
use match_directive::match_directive;
|
||||
use subtest::{run_filecheck, Context, Result, SubTest};
|
||||
|
||||
struct TestDomtree;
|
||||
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
//! The `test legalizer` test command runs each function through `legalize_function()` and sends
|
||||
//! the result to filecheck.
|
||||
|
||||
use std::borrow::Cow;
|
||||
use cretonne;
|
||||
use cretonne::ir::Function;
|
||||
use cretonne::print_errors::pretty_error;
|
||||
use cton_reader::TestCommand;
|
||||
use subtest::{run_filecheck, Context, Result, SubTest};
|
||||
use std::borrow::Cow;
|
||||
use std::fmt::Write;
|
||||
use subtest::{run_filecheck, Context, Result, SubTest};
|
||||
|
||||
struct TestLegalizer;
|
||||
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
//!
|
||||
//! The resulting function is sent to `filecheck`.
|
||||
|
||||
use cretonne::ir::Function;
|
||||
use cretonne;
|
||||
use cretonne::ir::Function;
|
||||
use cretonne::print_errors::pretty_error;
|
||||
use cton_reader::TestCommand;
|
||||
use subtest::{run_filecheck, Context, Result, SubTest};
|
||||
use std::borrow::Cow;
|
||||
use std::fmt::Write;
|
||||
use subtest::{run_filecheck, Context, Result, SubTest};
|
||||
|
||||
struct TestLICM;
|
||||
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
//!
|
||||
//! The resulting function is sent to `filecheck`.
|
||||
|
||||
use cretonne::ir::Function;
|
||||
use cretonne;
|
||||
use cretonne::ir::Function;
|
||||
use cretonne::print_errors::pretty_error;
|
||||
use cton_reader::TestCommand;
|
||||
use subtest::{run_filecheck, Context, Result, SubTest};
|
||||
use std::borrow::Cow;
|
||||
use std::fmt::Write;
|
||||
use subtest::{run_filecheck, Context, Result, SubTest};
|
||||
|
||||
struct TestPostopt;
|
||||
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
//!
|
||||
//! The resulting function is sent to `filecheck`.
|
||||
|
||||
use cretonne::ir::Function;
|
||||
use cretonne;
|
||||
use cretonne::ir::Function;
|
||||
use cretonne::print_errors::pretty_error;
|
||||
use cton_reader::TestCommand;
|
||||
use subtest::{run_filecheck, Context, Result, SubTest};
|
||||
use std::borrow::Cow;
|
||||
use std::fmt::Write;
|
||||
use subtest::{run_filecheck, Context, Result, SubTest};
|
||||
|
||||
struct TestPreopt;
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
use std::borrow::Cow;
|
||||
|
||||
use cretonne::ir::Function;
|
||||
use cretonne::cfg_printer::CFGPrinter;
|
||||
use cretonne::ir::Function;
|
||||
use cton_reader::TestCommand;
|
||||
use subtest::{self, Context, Result as STResult, SubTest};
|
||||
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
//!
|
||||
//! The resulting function is sent to `filecheck`.
|
||||
|
||||
use cretonne::ir::Function;
|
||||
use cretonne;
|
||||
use cretonne::ir::Function;
|
||||
use cretonne::print_errors::pretty_error;
|
||||
use cton_reader::TestCommand;
|
||||
use subtest::{run_filecheck, Context, Result, SubTest};
|
||||
use std::borrow::Cow;
|
||||
use std::fmt::Write;
|
||||
use subtest::{run_filecheck, Context, Result, SubTest};
|
||||
|
||||
struct TestRegalloc;
|
||||
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
//!
|
||||
//! The resulting function is sent to `filecheck`.
|
||||
|
||||
use cretonne::ir::Function;
|
||||
use cretonne;
|
||||
use cretonne::ir::Function;
|
||||
use cretonne::print_errors::pretty_error;
|
||||
use cton_reader::TestCommand;
|
||||
use subtest::{run_filecheck, Context, Result, SubTest};
|
||||
use std::borrow::Cow;
|
||||
use std::fmt::Write;
|
||||
use subtest::{run_filecheck, Context, Result, SubTest};
|
||||
|
||||
struct TestSimpleGVN;
|
||||
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
//! This annotation means that the verifier is expected to given an error for the jump instruction
|
||||
//! containing the substring "jump to non-existent EBB".
|
||||
|
||||
use std::borrow::{Borrow, Cow};
|
||||
use cretonne::verify_function;
|
||||
use cretonne::ir::Function;
|
||||
use cretonne::verify_function;
|
||||
use cton_reader::TestCommand;
|
||||
use subtest::{Context, Result, SubTest};
|
||||
use match_directive::match_directive;
|
||||
use std::borrow::{Borrow, Cow};
|
||||
use subtest::{Context, Result, SubTest};
|
||||
|
||||
struct TestVerifier;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user