Skip to content

Commit f868247

Browse files
committed
Fix cortex-m-rt compiletest tests
1 parent 91f69a9 commit f868247

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

cortex-m-rt/Cargo.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,14 @@ links = "cortex-m-rt" # Prevent multiple versions of cortex-m-rt being linked
1818

1919
[dependencies]
2020
cortex-m-rt-macros = { path = "macros", version = "=0.7.0" }
21-
# Note: Do not depend on `cortex-m` here. This crate is used for testing `cortex-m`, so we need to
22-
# avoid pulling in multiple versions of `cortex-m`.
2321

2422
[dev-dependencies]
2523
cortex-m = { version = "0.7.4", path = ".." }
2624
panic-halt = "0.2.0"
2725
cortex-m-semihosting = "0.3"
2826

2927
[target.'cfg(not(target_os = "none"))'.dev-dependencies]
30-
compiletest_rs = "0.4.0"
28+
compiletest_rs = "0.7"
3129

3230
[[example]]
3331
name = "device"

cortex-m-rt/tests/compile-fail/non-static-resource.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#![no_std]
77
#![no_main]
88

9-
extern crate cortex_m;
109
extern crate cortex_m_rt;
1110
extern crate panic_halt;
1211

cortex-m-rt/tests/compiletest.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ fn run_mode(mode: &'static str) {
77

88
config.mode = mode.parse().expect("Invalid mode");
99
config.src_base = PathBuf::from(format!("tests/{}", mode));
10-
// config.link_deps(); // Populate config.target_rustcflags with dependencies on the path
1110
config.target_rustcflags = Some(
12-
"-L target/debug -L target/debug/deps -C panic=abort --cfg feature=\"device\"".to_owned(),
11+
"-L ../target/debug -L ../target/debug/deps -C panic=abort --cfg feature=\"device\""
12+
.to_owned(),
1313
);
14-
// config.clean_rmeta(); // If your tests import the parent crate, this helps with E0464
14+
config.clean_rmeta(); // If your tests import the parent crate, this helps with E0464
1515

1616
compiletest::run_tests(&config);
1717
}

0 commit comments

Comments
 (0)