Skip to content

Commit 039574b

Browse files
committed
Update top-level Makefile
1 parent 8a1b74a commit 039574b

File tree

2 files changed

+14
-15
lines changed

2 files changed

+14
-15
lines changed

.ci/gdbstub-test.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ if [ -z ${GDB} ]; then
2121
exit 1
2222
fi
2323

24-
build/rv32emu -g build/puzzle.elf &
24+
build/rv32emu -g build/bin/riscv32/puzzle &
2525
PID=$!
2626

2727
# Before starting GDB, we should ensure rv32emu is still running.
@@ -31,9 +31,9 @@ fi
3131

3232
OPTS=
3333
tmpfile=/tmp/rv32emu-gdbstub.$PID
34-
breakpoints=(0x10700 0x10800 0x10900)
34+
breakpoints=(0x10500 0x10600 0x10700)
3535
bkpt_count=${#breakpoints[@]}
36-
OPTS+="-ex 'file build/puzzle.elf' "
36+
OPTS+="-ex 'file build/bin/riscv32/puzzle' "
3737
OPTS+="-ex 'target remote :1234' "
3838
for t in ${breakpoints[@]}; do
3939
OPTS+="-ex 'break *$t' "

Makefile

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -229,36 +229,35 @@ tool: $(TOOLS_BIN)
229229
include mk/riscv-arch-test.mk
230230
include mk/tests.mk
231231

232-
CHECK_ELF_FILES := \
233-
hello \
234-
puzzle \
235-
fcalc
232+
# the prebuilt executables are built for "rv32im"
233+
CHECK_ELF_FILES :=
236234

237235
ifeq ($(call has, EXT_M), 1)
238236
CHECK_ELF_FILES += \
237+
puzzle \
238+
fcalc \
239239
pi
240240
endif
241241

242-
EXPECTED_hello = Hello World!
243242
EXPECTED_puzzle = success in 2005 trials
244243
EXPECTED_fcalc = Performed 12 tests, 0 failures, 100% success rate.
245244
EXPECTED_pi = 3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117067982148086
246245

247-
check: $(BIN)
246+
check: $(BIN) build-testbenches
248247
$(Q)$(foreach e,$(CHECK_ELF_FILES),\
249-
$(PRINTF) "Running $(e).elf ... "; \
250-
if [ "$(shell $(BIN) $(OUT)/$(e).elf | uniq)" = "$(strip $(EXPECTED_$(e))) inferior exit code 0" ]; then \
248+
$(PRINTF) "Running $(e) ... "; \
249+
if [ "$(shell $(BIN) $(OUT)/bin/riscv32/$(e) | uniq)" = "$(strip $(EXPECTED_$(e))) inferior exit code 0" ]; then \
251250
$(call notice, [OK]); \
252251
else \
253252
$(PRINTF) "Failed.\n"; \
254253
exit 1; \
255254
fi; \
256255
)
257256

258-
EXPECTED_aes_sha1 = 1242a6757c8aef23e50b5264f5941a2f4b4a347e -
259-
misalign: $(BIN)
260-
$(Q)$(PRINTF) "Running aes.elf ... ";
261-
$(Q)if [ "$(shell $(BIN) -m $(OUT)/aes.elf | $(SHA1SUM))" = "$(EXPECTED_aes_sha1)" ]; then \
257+
EXPECTED_aes_sha1 = f9924635666d3d58d5b60c0bde8b986a2a99effb -
258+
misalign: $(BIN) build-testbenches
259+
$(Q)$(PRINTF) "Running aes ... ";
260+
$(Q)if [ "$(shell $(BIN) -m $(OUT)/bin/riscv32/aes | $(SHA1SUM))" = "$(EXPECTED_aes_sha1)" ]; then \
262261
$(call notice, [OK]); \
263262
else \
264263
$(PRINTF) "Failed.\n"; \

0 commit comments

Comments
 (0)