From: Andrew Waterman Date: Tue, 16 Aug 2016 07:46:27 +0000 (-0700) Subject: Make ENTROPY deterministic X-Git-Url: https://git.libre-soc.org/?p=riscv-tests.git;a=commitdiff_plain;h=84b2d377283780a365188599aeb324d22003e1e8 Make ENTROPY deterministic Base it on the output filename, not the pid. This still gets decent coverage, but is deterministic. --- diff --git a/isa/Makefile b/isa/Makefile index f4dab3f..a13acd8 100644 --- a/isa/Makefile +++ b/isa/Makefile @@ -29,8 +29,7 @@ default: all RISCV_PREFIX ?= riscv$(XLEN)-unknown-elf- RISCV_GCC ?= $(RISCV_PREFIX)gcc -ENTROPY ?= -DENTROPY=$(shell echo $$$$) -RISCV_GCC_OPTS ?= $(ENTROPY) -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles +RISCV_GCC_OPTS ?= -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles RISCV_OBJDUMP ?= $(RISCV_PREFIX)objdump --disassemble-all --disassemble-zeroes --section=.text --section=.text.startup --section=.text.init --section=.data RISCV_SIM ?= spike @@ -55,7 +54,7 @@ $$($(1)_p_tests): $(1)-p-%: $(1)/%.S $(1)_tests += $$($(1)_p_tests) $$($(1)_v_tests): $(1)-v-%: $(1)/%.S - $$(RISCV_GCC) $(2) $$(RISCV_GCC_OPTS) -std=gnu99 -O2 -I$(src_dir)/../env/v -I$(src_dir)/macros/scalar -T$(src_dir)/../env/v/link.ld $(src_dir)/../env/v/entry.S $(src_dir)/../env/v/*.c $$< -lc -o $$@ + $$(RISCV_GCC) $(2) $$(RISCV_GCC_OPTS) -DENTROPY=0x$$(shell echo \$$@ | md5sum | cut -c 1-7) -std=gnu99 -O2 -I$(src_dir)/../env/v -I$(src_dir)/macros/scalar -T$(src_dir)/../env/v/link.ld $(src_dir)/../env/v/entry.S $(src_dir)/../env/v/*.c $$< -lc -o $$@ $(1)_tests += $$($(1)_v_tests) $(1)_tests_dump = $$(addsuffix .dump, $$($(1)_tests))