diff options
Diffstat (limited to 'tests/gemma.rs')
| -rw-r--r-- | tests/gemma.rs | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/tests/gemma.rs b/tests/gemma.rs index ae1a3c1..7ce47e3 100644 --- a/tests/gemma.rs +++ b/tests/gemma.rs @@ -27,6 +27,17 @@ fn ravanan_available() -> bool { .is_ok() } +/// True only when ccwl is actually runnable. compute_ravanan compiles +/// cwl/gemma/gemma-loco.scm to CWL with it before every ravanan run. +/// ccwl has no top-level --version; "compile --help" is the cheapest +/// subcommand invocation that doesn't need a real source file. +fn ccwl_available() -> bool { + std::process::Command::new("ccwl") + .args(["compile", "--help"]) + .output() + .is_ok() +} + fn test_data_path(name: &str) -> String { format!("{}/tests/test_data/{name}", env!("CARGO_MANIFEST_DIR")) } @@ -180,9 +191,9 @@ async fn compute_gemma_maps_a_qtl_from_the_bxd_fixtures() { #[tokio::test] async fn compute_gemma_ravanan_maps_a_qtl_from_the_bxd_fixtures() { - if !ravanan_available() || !gemma_wrapper_available() { + if !ravanan_available() || !gemma_wrapper_available() || !ccwl_available() { eprintln!( - "skipping compute_gemma_ravanan_maps_a_qtl_from_the_bxd_fixtures: ravanan or gemma-wrapper not on PATH" + "skipping compute_gemma_ravanan_maps_a_qtl_from_the_bxd_fixtures: ravanan, gemma-wrapper or ccwl not on PATH" ); return; } |
