Skip to content

Commit

Permalink
Make the messages more consistent
Browse files Browse the repository at this point in the history
It is not worthwhile to retrieve small remote files of about 1 KB using
wget with the progress option enabled. Instead, non-fatal errors are not
reported.
  • Loading branch information
jserv committed Sep 12, 2024
1 parent d0a6060 commit 8939a82
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ EXPECTED_fcalc = Performed 12 tests, 0 failures, 100% success rate.
EXPECTED_pi = 3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117067982148086

check-hello: $(BIN)
$(Q)$(PRINTF) "Running hello.elf ..."; \
$(Q)$(PRINTF) "Running hello.elf ... "; \
if [ "$(shell $(BIN) $(OUT)/hello.elf | uniq)" = "$(strip $(EXPECTED_hello)) inferior exit code 0" ]; then \
$(call notice, [OK]); \
else \
Expand Down
13 changes: 7 additions & 6 deletions mk/artifact.mk
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ endif

artifact: fetch-checksum ieeelib scimark2
ifeq ($(call has, PREBUILT), 1)
$(Q)$(PRINTF) "Checking SHA1 of binaries ...\n"
$(Q)$(PRINTF) "Checking SHA-1 of prebuilt binaries ... "

$(Q)$(eval PREBUILT_X86_FILENAME := $(shell cat $(BIN_DIR)/sha1sum-linux-x86-softfp | awk '{ print $$2 };'))
$(Q)$(eval PREBUILT_RV32_FILENAME := $(shell cat $(BIN_DIR)/sha1sum-riscv32 | awk '{ print $$2 };'))
Expand All @@ -66,10 +66,10 @@ ifeq ($(call has, PREBUILT), 1)
))

$(Q)if [ "$(RES)" = "1" ]; then \
$(PRINTF) "$(YELLOW)SHA1 verifications fail! Re-fetching prebuilt binaries from \"rv32emu-prebuilt\" ...\n$(NO_COLOR)"; \
$(PRINTF) "\n$(YELLOW)SHA-1 verification fails! Re-fetching prebuilt binaries from \"rv32emu-prebuilt\" ...\n$(NO_COLOR)"; \
wget -q --show-progress https://github.com/sysprog21/rv32emu-prebuilt/releases/download/$(LATEST_RELEASE)/rv32emu-prebuilt.tar.gz -O- | tar -C build --strip-components=1 -xz; \
else \
$(PRINTF) "$(PASS_COLOR)SHA1 verifications succeed!\n$(NO_COLOR)"; \
$(call notice, [OK]); \
fi
else
git submodule update --init $(addprefix ./tests/,$(foreach tb,$(TEST_SUITES),$(tb)))
Expand Down Expand Up @@ -106,9 +106,10 @@ endif

fetch-checksum:
ifeq ($(call has, PREBUILT), 1)
$(Q)$(PRINTF) "Fetching SHA1 of binaries ...\n"
$(Q)wget -q --show-progress -O $(BIN_DIR)/sha1sum-linux-x86-softfp https://github.com/sysprog21/rv32emu-prebuilt/releases/download/$(LATEST_RELEASE)/sha1sum-linux-x86-softfp
$(Q)wget -q --show-progress -O $(BIN_DIR)/sha1sum-riscv32 https://github.com/sysprog21/rv32emu-prebuilt/releases/download/$(LATEST_RELEASE)/sha1sum-riscv32
$(Q)$(PRINTF) "Fetching SHA-1 of prebuilt binaries ... "
$(Q)wget -q -O $(BIN_DIR)/sha1sum-linux-x86-softfp https://github.com/sysprog21/rv32emu-prebuilt/releases/download/$(LATEST_RELEASE)/sha1sum-linux-x86-softfp
$(Q)wget -q -O $(BIN_DIR)/sha1sum-riscv32 https://github.com/sysprog21/rv32emu-prebuilt/releases/download/$(LATEST_RELEASE)/sha1sum-riscv32
$(Q)$(call notice, [OK])
endif

scimark2:
Expand Down

0 comments on commit 8939a82

Please sign in to comment.