Expand description
Helpers for loading proprietary .pedal files from the pedalkernel-pro
private repository at test time.
The .pedal sources are proprietary and must never be committed to the
public engine repo, nor embedded via include_str! (that would fail to
compile on public CI where the pro repo is absent).
§Usage
use pedalkernel_validate::pro_pedal::{load_pro_pedal_sub, skip_if_missing};
#[test]
fn my_test() {
let source = skip_if_missing!(
load_pro_pedal_sub("pedals/legends/screamer.pedal"),
"pedals/legends/screamer.pedal"
);
// use source…
}§CI behaviour
When the pro repo is absent (public CI, forks, contributor machines), the
load_pro_pedal_sub function returns None. The skip_if_missing! macro
then calls return — causing the test to exit silently with no failure.
Rust’s test harness reports such a test as passed (not failed, not skipped
with the ignored attribute).
§Mirror note
pedalkernel::compiler::tb303_decomposition_tests::load_pro_pedal_sub mirrors
this logic for tests in the pedalkernel crate. A true shared crate is not
possible because pedalkernel-validate depends on pedalkernel, so a
reverse dependency would be circular.
Functions§
- load_
pro_ pedal_ sub - Try to load a file at
pro_sub_path(relative to the pedalkernel-pro repo root, e.g."crates/acidattack/acidattack-core/tb303_filter.pedal"or"pedals/legends/screamer.pedal").