Skip to content

Commit 1ea7ef0

Browse files
committed
this should fix CI
1 parent 72e5075 commit 1ea7ef0

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

ci/svd2rust-regress/src/diff.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -235,25 +235,25 @@ impl Diffing {
235235
) => last_args.as_deref(),
236236
None => None,
237237
});
238-
let join = |opt1: Option<&str>, opt2: Option<&str>| -> Option<String> {
238+
let join = |opt1: Option<&str>, opt2: Option<&str>| -> Option<Vec<String>> {
239239
match (opt1, opt2) {
240-
(Some(str1), Some(str2)) => Some(format!("{} {}", str1, str2)),
241-
(Some(str), None) | (None, Some(str)) => Some(str.to_owned()),
240+
(Some(str1), Some(str2)) => vec![str1.to_owned(), str2.to_owned()].into(),
241+
(Some(str), None) | (None, Some(str)) => Some(vec![str.to_owned()]),
242242
(None, None) => None,
243243
}
244244
};
245245
let baseline = test
246246
.setup_case(
247247
&opts.output_dir.join("baseline"),
248248
&baseline_bin,
249-
join(baseline_cmd, last_args).as_deref(),
249+
&join(baseline_cmd, last_args),
250250
)
251251
.with_context(|| "couldn't create head")?;
252252
let current = test
253253
.setup_case(
254254
&opts.output_dir.join("current"),
255255
&current_bin,
256-
join(current_cmd, last_args).as_deref(),
256+
&join(current_cmd, last_args),
257257
)
258258
.with_context(|| "couldn't create base")?;
259259

ci/svd2rust-regress/src/main.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ pub struct TestAll {
100100
#[clap(short = 'p', long = "svd2rust-path", default_value = default_svd2rust())]
101101
pub current_bin_path: PathBuf,
102102
#[clap(last = true)]
103-
pub command: Option<Vec<String>>,
103+
pub passthrough_opts: Option<Vec<String>>,
104104
// TODO: Specify smaller subset of tests? Maybe with tags?
105105
// TODO: Compile svd2rust?
106106
}
@@ -149,7 +149,7 @@ pub struct Test {
149149
#[clap(short = 'p', long = "svd2rust-path", default_value = default_svd2rust())]
150150
pub current_bin_path: PathBuf,
151151
#[clap(last = true)]
152-
pub command: Option<Vec<String>>,
152+
pub passthrough_opts: Option<Vec<String>>,
153153
}
154154

155155
impl Test {
@@ -191,7 +191,7 @@ impl Test {
191191
.ok_or_else(|| anyhow::anyhow!("no test found for chip"))?
192192
.to_owned()
193193
};
194-
test.test(opts, &self.current_bin_path, &self.command)?;
194+
test.test(opts, &self.current_bin_path, &self.passthrough_opts)?;
195195
Ok(())
196196
}
197197
}
@@ -247,7 +247,7 @@ impl TestAll {
247247
tests.par_iter().for_each(|t| {
248248
let start = Instant::now();
249249

250-
match t.test(opt, &self.current_bin_path, &self.command) {
250+
match t.test(opt, &self.current_bin_path, &self.passthrough_opts) {
251251
Ok(s) => {
252252
if let Some(stderrs) = s {
253253
let mut buf = String::new();

0 commit comments

Comments
 (0)