@@ -229,36 +229,35 @@ tool: $(TOOLS_BIN)
229229include mk/riscv-arch-test.mk
230230include mk/tests.mk
231231
232- CHECK_ELF_FILES := \
233- hello \
234- puzzle \
235- fcalc
232+ # the prebuilt executables are build from "rv32im"
233+ CHECK_ELF_FILES :=
236234
237235ifeq ($(call has, EXT_M) , 1)
238236CHECK_ELF_FILES += \
237+ puzzle \
238+ fcalc \
239239 pi
240240endif
241241
242- EXPECTED_hello = Hello World!
243242EXPECTED_puzzle = success in 2005 trials
244243EXPECTED_fcalc = Performed 12 tests, 0 failures, 100% success rate.
245244EXPECTED_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