AT_WDT_RUN = $(NAILING_CARGO_JUST_RUN) $(abspath $<)
-AT_RUN = $(AT_WDT_RUN) $(basename $(notdir $@))
+AT_RUN = $(AT_WDT_RUN) apitest --test=$(basename $(notdir $@))
WDT_RUN = $(AT_WDT_RUN) wdriver --test=$(basename $(notdir $@))
for-at: $(AT_DEPS)
path="apitest.rs"
[[bin]]
-name="at-otter"
-path="at-otter.rs"
+name="apitest"
+path="main.rs"
[dependencies]
s
} else {
let s = s.strip_prefix("--test=")
- .expect("found non-long-option looking for --test={wdt,at}-*");
+ .expect(&format!(
+ "found non-long-option looking for --test={}-*: {:?}",
+ prefix, s));
if ! plausible(s) {
panic!("found non --no-bwrap --{}-* option looking for --{}-*",
prefix,prefix);
}
#[throws(Explode)]
-fn main() {
+pub fn main() {
{
let (opts, _instance, su) = setup_core(
&[module_path!()],
- &mut |_|false
+ &mut |s: &OsStr| s.to_str().unwrap().starts_with("--test=")
)?;
let spec = su.ds.game_spec_data()?;
let mut mc = su.mgmt_conn();
--- /dev/null
+// Copyright 2020-2021 Ian Jackson and contributors to Otter
+// SPDX-License-Identifier: AGPL-3.0-or-later
+// There is NO WARRANTY.
+
+pub use otter_api_tests::*;
+
+portmanteau_has!("at-otter.rs", at_otter);
+
+#[throws(AE)]
+fn main() { portmanteau_main("at")? }