Skip to content

Commit bb7e492

Browse files
committed
Fix failing unit tests
1 parent baa43d8 commit bb7e492

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
4545
- name: Setup Rust
4646
run: |
47-
rustup update stable
47+
rustup install nightly
4848
rustup target add thumbv7em-none-eabihf
4949
cargo install cbindgen
5050

src/rustemu/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@ version = "0.1.0"
44
edition = "2021"
55
publish = false
66

7+
[profile.dev]
8+
panic = "abort"
9+
710
[profile.release]
811
opt-level = 'z' # turn on maximum optimizations. We only have 64kB
912
lto = true # Link-time-optimizations for further size reduction
13+
panic = "abort"
1014

1115
[lib]
1216
crate-type = ["staticlib"]

src/test/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ RUSTEMU_INCLUDE_DIR := $(RUSTEMU_DIR)/include/
2222
RUSTEMU_TARGET_DIR := $(RUSTEMU_DIR)/target/x86_64-unknown-linux-gnu/release
2323
RUSTEMU_HEADER := $(RUSTEMU_INCLUDE_DIR)/rustemu.h
2424
RUSTEMU_LIBRARY := $(RUSTEMU_TARGET_DIR)/librustemu.a
25-
RUSTEMU_SRC := $(shell find $(RUSTEMU_DIR)/src -name '*.rs')
25+
RUSTEMU_SOURCES := $(shell find $(RUSTEMU_DIR)/src -name '*.rs')
2626

2727
include $(ROOT)/make/system-id.mk
2828
include $(ROOT)/make/targets_list.mk
@@ -678,11 +678,11 @@ $(OBJECT_DIR)/gtest_main.a : $(OBJECT_DIR)/gtest-all.o $(OBJECT_DIR)/gtest_main.
678678
-include $(OBJECT_DIR)/gtest-all.d \
679679
$(OBJECT_DIR)/gtest_main.d
680680

681-
$(RUSTEMU_LIBRARY): $(RUSTEMU_SRC)
682-
cd $(ROOT)/src/rustemu && cargo build --release
681+
$(RUSTEMU_LIBRARY): $(RUSTEMU_SOURCES)
682+
cd $(ROOT)/src/rustemu && cargo +nightly build --release
683683

684684
$(RUSTEMU_HEADER): $(RUSTEMU_LIBRARY)
685-
cd $(ROOT)/src/rustemu && cbindgen --lang c -o $(PWD)/$(RUSTEMU_HEADER)
685+
cd $(ROOT)/src/rustemu && cbindgen --lang c++ -o $(PWD)/$(RUSTEMU_HEADER)
686686

687687
# includes in test dir must override includes in user dir, unless the user
688688
# specifies a list of endorsed directories in ${target}_INCLUDE_DIRS.

0 commit comments

Comments
 (0)