CI: replace compiletest-rs with trybuild

We use compiletest to run compile-fail tests but compiletest depends on compiler
internals so it breaks every now and then and requires nightly. With trybuild we
can also run compile-fail tests but it works on stable and it already has
reached version 1.0
This commit is contained in:
Jorge Aparicio 2019-11-06 19:05:37 -05:00
parent 72e84cb297
commit 31b392fe3a
12 changed files with 23 additions and 47 deletions

View file

@ -1,19 +1,7 @@
use std::path::PathBuf;
use compiletest_rs::{common::Mode, Config};
use trybuild::TestCases;
#[test]
fn ui() {
let mut config = Config::default();
config.mode = Mode::Ui;
config.src_base = PathBuf::from("ui/single");
config.target_rustcflags = Some(
"--edition=2018 -L target/debug/deps -Z unstable-options --extern rtfm --extern lm3s6965"
.to_owned(),
);
config.link_deps();
config.clean_rmeta();
compiletest_rs::run_tests(&config);
let t = TestCases::new();
t.compile_fail("ui/single/*.rs");
}