Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use harness = false instead of #![feature(custom_test_frameworks)] #1784

Merged
merged 1 commit into from May 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,7 @@ colored = "2"
# This crate uses #[feature(rustc_private)].
# See https://github.com/rust-analyzer/rust-analyzer/pull/7891
rustc_private = true

[[test]]
name = "compiletest"
harness = false
6 changes: 1 addition & 5 deletions tests/compiletest.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
#![feature(custom_test_frameworks)]
// Custom test runner, to avoid libtest being wrapped around compiletest which wraps libtest.
#![test_runner(test_runner)]

use std::env;
use std::path::PathBuf;

Expand Down Expand Up @@ -83,7 +79,7 @@ fn get_target() -> String {
env::var("MIRI_TEST_TARGET").unwrap_or_else(|_| get_host())
}

fn test_runner(_tests: &[&()]) {
fn main() {
// Add a test env var to do environment communication tests.
env::set_var("MIRI_ENV_VAR_TEST", "0");
// Let the tests know where to store temp files (they might run for a different target, which can make this hard to find).
Expand Down