Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix ui-cargo tests in CI
  • Loading branch information
flip1995 committed Aug 3, 2020
1 parent 2e0f8b6 commit 0e44ed5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/compile-test.rs
Expand Up @@ -3,7 +3,7 @@
use compiletest_rs as compiletest;
use compiletest_rs::common::Mode as TestMode;

use std::env::{self, set_var};
use std::env::{self, set_var, var};
use std::ffi::OsStr;
use std::fs;
use std::io;
Expand Down Expand Up @@ -136,7 +136,9 @@ fn run_ui_toml(config: &mut compiletest::Config) {

let tests = compiletest::make_tests(&config);

let manifest_dir = var("CARGO_MANIFEST_DIR").unwrap_or_default();
let res = run_tests(&config, tests);
set_var("CARGO_MANIFEST_DIR", &manifest_dir);
match res {
Ok(true) => {},
Ok(false) => panic!("Some tests failed"),
Expand Down

0 comments on commit 0e44ed5

Please sign in to comment.