Skip to content

Commit

Permalink
Adjust third_party test output
Browse files Browse the repository at this point in the history
  • Loading branch information
smoelius committed Sep 1, 2022
1 parent b71abbd commit 4d791ef
Showing 1 changed file with 32 additions and 21 deletions.
53 changes: 32 additions & 21 deletions cargo-test-fuzz/tests/third_party.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,36 +43,47 @@ lazy_static! {
// smoelius: This should match `scripts/update_patches.sh`.
const LINES_OF_CONTEXT: u32 = 2;

#[test]
fn cheap_tests() {
let version_meta = version_meta().unwrap();
for test in TESTS.iter() {
run_test(
test,
test.flags.contains(Flags::EXPENSIVE)
|| (test.flags.contains(Flags::SKIP_NIGHTLY)
&& version_meta.channel == Channel::Nightly),
);
mod cheap_tests {
use super::{test, *};
#[test]
fn test() {
let version_meta = version_meta().unwrap();
for test in TESTS.iter() {
run_test(
module_path!(),
test,
test.flags.contains(Flags::EXPENSIVE)
|| (test.flags.contains(Flags::SKIP_NIGHTLY)
&& version_meta.channel == Channel::Nightly),
);
}
}
}

#[test]
#[ignore]
fn all_tests() {
let version_meta = version_meta().unwrap();
for test in TESTS.iter() {
run_test(
test,
test.flags.contains(Flags::SKIP_NIGHTLY) && version_meta.channel == Channel::Nightly,
);
mod all_tests {
use super::{test, *};
#[test]
#[ignore]
fn test() {
let version_meta = version_meta().unwrap();
for test in TESTS.iter() {
run_test(
module_path!(),
test,
test.flags.contains(Flags::SKIP_NIGHTLY)
&& version_meta.channel == Channel::Nightly,
);
}
}
}

fn run_test(test: &Test, partial: bool) {
fn run_test(module_path: &str, test: &Test, partial: bool) {
let (_, module) = module_path.split_once("::").unwrap();
#[allow(clippy::explicit_write)]
writeln!(
stderr(),
"{}{}",
"{}: {}{}",
module,
test.url,
if partial { " (partial)" } else { "" }
)
Expand Down

0 comments on commit 4d791ef

Please sign in to comment.