2017-07-18 22:14:39 +02:00
|
|
|
extern crate compiletest_rs as compiletest;
|
|
|
|
|
|
|
|
use std::path::PathBuf;
|
|
|
|
|
|
|
|
use compiletest::common::Mode;
|
2017-09-22 13:46:05 +02:00
|
|
|
use compiletest::Config;
|
2017-07-18 22:14:39 +02:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn cfail() {
|
2017-09-22 13:46:05 +02:00
|
|
|
let mut config = Config::default();
|
2017-07-18 22:14:39 +02:00
|
|
|
config.mode = Mode::CompileFail;
|
|
|
|
config.src_base = PathBuf::from(format!("tests/cfail"));
|
2018-05-07 17:46:26 +02:00
|
|
|
config.target = "x86_64-unknown-linux-gnu".to_owned();
|
2018-05-14 21:22:50 +02:00
|
|
|
config.target_rustcflags = Some(
|
|
|
|
"-C panic=abort \
|
|
|
|
-L target/debug/deps \
|
|
|
|
-L target/x86_64-unknown-linux-gnu/debug \
|
|
|
|
-L target/x86_64-unknown-linux-gnu/debug/deps "
|
|
|
|
.to_string(),
|
|
|
|
);
|
2017-07-18 22:14:39 +02:00
|
|
|
|
|
|
|
compiletest::run_tests(&config);
|
|
|
|
}
|