Skip to content

Commit 1a2bf65

Browse files
Merge #472
472: Update svd2rust-regress once again r=adamgreig a=therealprof This bumps the arch dependencies to the current level, removes the "const-fn" flag support and uses newer reqwest and rayon dependencies to get rid of some 50 crate dependencies. Signed-off-by: Daniel Egger <[email protected]> Co-authored-by: Daniel Egger <[email protected]>
2 parents 72ec77f + d1552f6 commit 1a2bf65

File tree

2 files changed

+11
-19
lines changed

2 files changed

+11
-19
lines changed

ci/svd2rust-regress/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ version = "0.1.0"
55
authors = ["James Munns <[email protected]>", "The svd2rust developers"]
66

77
[dependencies]
8-
reqwest = "0.9"
9-
rayon = "1.1"
8+
reqwest = { version = "0.10", features= ["blocking"] }
9+
rayon = "1.4"
1010
structopt = "0.2"
1111
error-chain = "0.12"
1212
inflections = "1.1"

ci/svd2rust-regress/src/svd_test.rs

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
11
use crate::errors::*;
22
use crate::tests::TestCase;
3-
use reqwest;
43
use std::fs::{self, File, OpenOptions};
54
use std::io::prelude::*;
65
use std::path::PathBuf;
76
use std::process::{Command, Output};
87

9-
static CRATES_ALL: &[&str] = &["bare-metal = \"0.2.0\"", "vcell = \"0.1.0\""];
10-
static CRATES_MSP430: &[&str] = &["msp430 = \"0.1.0\""];
11-
static CRATES_CORTEX_M: &[&str] = &["cortex-m = \"0.5.0\"", "cortex-m-rt = \"0.5.0\""];
12-
static CRATES_RISCV: &[&str] = &["riscv = \"0.4.0\"", "riscv-rt = \"0.4.0\""];
13-
static CRATES_XTENSALX6: &[&str] = &["xtensa-lx6-rt = \"0.2.0\"", "xtensa-lx6 = \"0.1.0\""];
14-
static PROFILE_ALL: &[&str] = &["[profile.dev]", "incremental = false"];
15-
static FEATURES_ALL: &[&str] = &["[features]"];
16-
static FEATURES_CORTEX_M: &[&str] =
17-
&["const-fn = [\"bare-metal/const-fn\", \"cortex-m/const-fn\"]"];
18-
static FEATURES_EMPTY: &[&str] = &[];
8+
const CRATES_ALL: &[&str] = &["bare-metal = \"0.2.0\"", "vcell = \"0.1.0\""];
9+
const CRATES_MSP430: &[&str] = &["msp430 = \"0.2.2\""];
10+
const CRATES_CORTEX_M: &[&str] = &["cortex-m = \"0.6.0\"", "cortex-m-rt = \"0.6.0\""];
11+
const CRATES_RISCV: &[&str] = &["riscv = \"0.5.0\"", "riscv-rt = \"0.6.0\""];
12+
const CRATES_XTENSALX6: &[&str] = &["xtensa-lx6-rt = \"0.2.0\"", "xtensa-lx6 = \"0.1.0\""];
13+
const PROFILE_ALL: &[&str] = &["[profile.dev]", "incremental = false"];
14+
const FEATURES_ALL: &[&str] = &["[features]"];
1915

2016
fn path_helper(input: &[&str]) -> PathBuf {
2117
input.iter().collect()
@@ -137,19 +133,15 @@ pub fn test(
137133
XtensaLX => CRATES_XTENSALX6.iter(),
138134
})
139135
.chain(PROFILE_ALL.iter())
140-
.chain(FEATURES_ALL.iter())
141-
.chain(match &t.arch {
142-
CortexM => FEATURES_CORTEX_M.iter(),
143-
_ => FEATURES_EMPTY.iter(),
144-
});
136+
.chain(FEATURES_ALL.iter());
145137

146138
for c in crates {
147139
writeln!(file, "{}", c).chain_err(|| "Failed to append to file!")?;
148140
}
149141

150142
// Download the SVD as specified in the URL
151143
// TODO: Check for existing svd files? `--no-cache` flag?
152-
let svd = reqwest::get(&t.svd_url())
144+
let svd = reqwest::blocking::get(&t.svd_url())
153145
.chain_err(|| "Failed to get svd URL")?
154146
.text()
155147
.chain_err(|| "SVD is bad text")?;

0 commit comments

Comments
 (0)