Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix errors when running QEMU tests for OpenTitan
  • Loading branch information
nbdd0121 committed Jun 29, 2023
commit b09828129c1f35fdc7c6de7a2f2deb9401dddbb0
8 changes: 4 additions & 4 deletions boards/opentitan/earlgrey-cw310/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ endif
CARGO_FLAGS += -Zpanic-abort-tests

.PHONY: ot-check
OPENTITAN_ACTUAL_SHA := $(shell cd $(OPENTITAN_TREE); git show --pretty=format:"%H" --no-patch)
ifneq ($(OPENTITAN_TREE),)
OPENTITAN_ACTUAL_SHA := $(shell cd $(OPENTITAN_TREE); git show --pretty=format:"%H" --no-patch)
endif
# TODO: Theres mix and match of tab/space indenting in the block below,
# should be changed to using `RECIPEPREFIX` make syntax when CI supports
# make version > 3.81 (macos)
Expand Down Expand Up @@ -101,9 +103,7 @@ endif
mkdir -p $(TOCK_ROOT_DIRECTORY)target/$(TARGET)/release/deps/
$(Q)cp test_layout.ld $(TOCK_ROOT_DIRECTORY)target/$(TARGET)/release/deps/layout.ld
$(Q)cp ../../kernel_layout.ld $(TOCK_ROOT_DIRECTORY)target/$(TARGET)/
$(Q)RUSTFLAGS="$(RUSTC_FLAGS_TOCK)" QEMU_ENTRY_POINT=${QEMU_ENTRY_POINT} $(CARGO) test $(CARGO_FLAGS_TOCK) $(NO_RUN) --bin $(PLATFORM) --release
# Test layout should be removed so that following apps (non-test) load the correct layout.
$(Q)rm $(TOCK_ROOT_DIRECTORY)target/$(TARGET)/release/deps/layout.ld
Comment on lines -105 to -106
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't needed?

Copy link
Contributor Author

@nbdd0121 nbdd0121 Jun 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

run.sh already contains the code to delete the file. It's currently only needed because without TOCK_ROOT_DIRECTORY and TARGET being passed, the rm in run.sh failed.

$(Q)RUSTFLAGS="$(RUSTC_FLAGS_TOCK)" TOCK_ROOT_DIRECTORY=${TOCK_ROOT_DIRECTORY} QEMU_ENTRY_POINT=${QEMU_ENTRY_POINT} TARGET=${TARGET} $(CARGO) test $(CARGO_FLAGS_TOCK) $(NO_RUN) --bin $(PLATFORM) --release

test-hardware: ot-check
mkdir -p $(TOCK_ROOT_DIRECTORY)target/$(TARGET)/release/deps/
Expand Down