Skip to content

Commit

Permalink
Do not use #[ignore] for tests that need data
Browse files Browse the repository at this point in the history
  • Loading branch information
cschwan committed Sep 15, 2023
1 parent ba4f97d commit 8c09c08
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
- name: Run tests
run: |
# we need stderr, but we can't run test twice because it'll regenerate/modify the binaries which interferes with `llvm-cov`
cargo test --all-features --no-fail-fast -- --include-ignored 2> >(tee stderr 1>&2)
cargo test --all-features --no-fail-fast 2> >(tee stderr 1>&2)
# from https://stackoverflow.com/a/51141872/812178
sed -i 's/\x1B\[[0-9;]\{1,\}[A-Za-z]//g' stderr
Expand Down
2 changes: 1 addition & 1 deletion maintainer/generate-coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export RUSTDOCFLAGS="-Cinstrument-coverage -Z unstable-options --persist-doctest

cargo clean
# -Z doctest-in-workspace is enabled by default starting from 1.72.0
cargo test -Z doctest-in-workspace --all-features -- --include-ignored 2> >(tee stderr 1>&2)
cargo test -Z doctest-in-workspace --all-features 2> >(tee stderr 1>&2)
# from https://stackoverflow.com/a/51141872/812178
sed -i 's/\x1B\[[0-9;]\{1,\}[A-Za-z]//g' stderr

Expand Down
5 changes: 0 additions & 5 deletions pineappl_cli/tests/evolve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ fn help() {
}

#[test]
#[ignore]
fn lhcb_wp_7tev() {
let output = NamedTempFile::new("fktable1a.lz4").unwrap();

Expand Down Expand Up @@ -193,7 +192,6 @@ fn lhcb_wp_7tev() {
}

#[test]
#[ignore]
fn e906nlo_bin_00() {
let output = NamedTempFile::new("fktable2.lz4").unwrap();

Expand All @@ -213,7 +211,6 @@ fn e906nlo_bin_00() {
}

#[test]
#[ignore]
fn nutev_cc_nu_fe_sigmared() {
let output = NamedTempFile::new("fktable3.lz4").unwrap();

Expand All @@ -234,7 +231,6 @@ fn nutev_cc_nu_fe_sigmared() {
}

#[test]
#[ignore]
fn lhcb_dy_8tev() {
let output = NamedTempFile::new("fktable4.lz4").unwrap();

Expand All @@ -255,7 +251,6 @@ fn lhcb_dy_8tev() {
}

#[test]
#[ignore]
fn cms_ttb_8tev_2d_ttm_trap_tot() {
let output = NamedTempFile::new("fktable5.lz4").unwrap();

Expand Down
2 changes: 0 additions & 2 deletions pineappl_cli/tests/export.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ fn help() {
}

#[test]
#[ignore]
#[cfg(feature = "applgrid")]
fn export_applgrid() {
let output = NamedTempFile::new("converted.appl").unwrap();
Expand All @@ -133,7 +132,6 @@ fn export_applgrid() {
}

#[test]
#[ignore]
#[cfg(feature = "applgrid")]
fn export_dis_applgrid() {
let output1 = NamedTempFile::new("remapped.pineappl.lz4").unwrap();
Expand Down
25 changes: 0 additions & 25 deletions pineappl_cli/tests/import.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,6 @@ fn help() {
}

#[test]
#[ignore]
#[cfg(feature = "fastnlo")]
fn import_fix_grid() {
let output = NamedTempFile::new("converted1.pineappl.lz4").unwrap();
Expand All @@ -337,7 +336,6 @@ fn import_fix_grid() {
}

#[test]
#[ignore]
#[cfg(feature = "fastnlo")]
fn import_flex_grid() {
let output = NamedTempFile::new("converted2.pineappl.lz4").unwrap();
Expand All @@ -357,7 +355,6 @@ fn import_flex_grid() {
}

#[test]
#[ignore]
#[cfg(feature = "fastnlo")]
fn import_flex_grid_scale_1() {
let output = NamedTempFile::new("converted2.pineappl.lz4").unwrap();
Expand All @@ -379,7 +376,6 @@ fn import_flex_grid_scale_1() {
}

#[test]
#[ignore]
#[cfg(feature = "fastnlo")]
fn import_flex_grid_scale_2() {
let output = NamedTempFile::new("converted2.pineappl.lz4").unwrap();
Expand All @@ -401,7 +397,6 @@ fn import_flex_grid_scale_2() {
}

#[test]
#[ignore]
#[cfg(feature = "fastnlo")]
fn import_flex_grid_quadratic_sum() {
let output = NamedTempFile::new("converted2.pineappl.lz4").unwrap();
Expand All @@ -425,7 +420,6 @@ fn import_flex_grid_quadratic_sum() {
}

#[test]
#[ignore]
#[cfg(feature = "fastnlo")]
fn import_flex_grid_quadratic_mean() {
let output = NamedTempFile::new("converted2.pineappl.lz4").unwrap();
Expand All @@ -449,7 +443,6 @@ fn import_flex_grid_quadratic_mean() {
}

#[test]
#[ignore]
#[cfg(feature = "fastnlo")]
fn import_flex_grid_5() {
let output = NamedTempFile::new("converted2.pineappl.lz4").unwrap();
Expand All @@ -471,7 +464,6 @@ fn import_flex_grid_5() {
}

#[test]
#[ignore]
#[cfg(feature = "fastnlo")]
fn import_flex_grid_6() {
let output = NamedTempFile::new("converted2.pineappl.lz4").unwrap();
Expand All @@ -493,7 +485,6 @@ fn import_flex_grid_6() {
}

#[test]
#[ignore]
#[cfg(feature = "fastnlo")]
fn import_flex_grid_7() {
let output = NamedTempFile::new("converted2.pineappl.lz4").unwrap();
Expand All @@ -515,7 +506,6 @@ fn import_flex_grid_7() {
}

#[test]
#[ignore]
#[cfg(feature = "fastnlo")]
fn import_flex_grid_8() {
let output = NamedTempFile::new("converted2.pineappl.lz4").unwrap();
Expand All @@ -537,7 +527,6 @@ fn import_flex_grid_8() {
}

#[test]
#[ignore]
#[cfg(feature = "fastnlo")]
fn import_flex_grid_9() {
let output = NamedTempFile::new("converted2.pineappl.lz4").unwrap();
Expand All @@ -559,7 +548,6 @@ fn import_flex_grid_9() {
}

#[test]
#[ignore]
#[cfg(feature = "fastnlo")]
fn import_flex_grid_10() {
let output = NamedTempFile::new("converted2.pineappl.lz4").unwrap();
Expand All @@ -581,7 +569,6 @@ fn import_flex_grid_10() {
}

#[test]
#[ignore]
#[cfg(feature = "fastnlo")]
fn import_flex_grid_11() {
let output = NamedTempFile::new("converted2.pineappl.lz4").unwrap();
Expand All @@ -603,7 +590,6 @@ fn import_flex_grid_11() {
}

#[test]
#[ignore]
#[cfg(feature = "fastnlo")]
fn import_flex_grid_12() {
let output = NamedTempFile::new("converted2.pineappl.lz4").unwrap();
Expand All @@ -625,7 +611,6 @@ fn import_flex_grid_12() {
}

#[test]
#[ignore]
#[cfg(feature = "fastnlo")]
fn import_flex_grid_13() {
let output = NamedTempFile::new("converted2.pineappl.lz4").unwrap();
Expand All @@ -647,7 +632,6 @@ fn import_flex_grid_13() {
}

#[test]
#[ignore]
#[cfg(feature = "fastnlo")]
fn import_flex_grid_14() {
let output = NamedTempFile::new("converted2.pineappl.lz4").unwrap();
Expand All @@ -669,7 +653,6 @@ fn import_flex_grid_14() {
}

#[test]
#[ignore]
#[cfg(feature = "fastnlo")]
fn import_flex_grid_15() {
let output = NamedTempFile::new("converted2.pineappl.lz4").unwrap();
Expand All @@ -691,7 +674,6 @@ fn import_flex_grid_15() {
}

#[test]
#[ignore]
#[cfg(feature = "fktable")]
fn import_dis_fktable() {
use pineappl::fk_table::FkTable;
Expand Down Expand Up @@ -869,7 +851,6 @@ fn import_dis_fktable() {
}

#[test]
#[ignore]
#[cfg(feature = "fktable")]
fn import_hadronic_fktable() {
use float_cmp::assert_approx_eq;
Expand Down Expand Up @@ -1189,7 +1170,6 @@ fn import_hadronic_fktable() {
}

#[test]
#[ignore]
#[cfg(feature = "applgrid")]
fn import_photon_grid() {
let output = NamedTempFile::new("converted5.pineappl.lz4").unwrap();
Expand All @@ -1209,7 +1189,6 @@ fn import_photon_grid() {
}

#[test]
#[ignore]
#[cfg(feature = "applgrid")]
fn import_applgrid() {
let output = NamedTempFile::new("converted6.pineappl.lz4").unwrap();
Expand All @@ -1229,7 +1208,6 @@ fn import_applgrid() {
}

#[test]
#[ignore]
#[cfg(feature = "applgrid")]
fn import_new_applgrid() {
let output = NamedTempFile::new("converted7.pineappl.lz4").unwrap();
Expand Down Expand Up @@ -1264,7 +1242,6 @@ fn import_file_format_failure() {
}

#[test]
#[ignore]
#[cfg(feature = "fastnlo")]
fn import_grid_comparison_failure() {
Command::cargo_bin("pineappl")
Expand All @@ -1284,7 +1261,6 @@ fn import_grid_comparison_failure() {
}

#[test]
#[ignore]
#[cfg(feature = "applgrid")]
fn import_dis_applgrid() {
let output = NamedTempFile::new("converted8.pineappl.lz4").unwrap();
Expand All @@ -1304,7 +1280,6 @@ fn import_dis_applgrid() {
}

#[test]
#[ignore]
#[cfg(feature = "fastnlo")]
fn import_double_hadronic_fastnlo() {
let output = NamedTempFile::new("converted9.pineappl.lz4").unwrap();
Expand Down

0 comments on commit 8c09c08

Please sign in to comment.