diff --git a/Makefile b/Makefile index 1c2f0d78c..431bbfaf4 100644 --- a/Makefile +++ b/Makefile @@ -93,11 +93,17 @@ libbacktrace: # builds and runs the test suite test: | build deps - echo fake test completed! + $(ENV_SCRIPT) nim test $(NIM_PARAMS) nimbus.nims # primitive reproducibility test test-reproducibility: - echo fake reproducability test completed! + + [ -e build/nimbus ] || $(MAKE) V=0 nimbus; \ + MD5SUM1=$$($(MD5SUM) build/nimbus | cut -d ' ' -f 1) && \ + rm -rf nimcache/*/nimbus && \ + $(MAKE) V=0 nimbus && \ + MD5SUM2=$$($(MD5SUM) build/nimbus | cut -d ' ' -f 1) && \ + [ "$$MD5SUM1" = "$$MD5SUM2" ] && echo -e "\e[92mSuccess: identical binaries.\e[39m" || \ + { echo -e "\e[91mFailure: the binary changed between builds.\e[39m"; exit 1; } # usual cleaning clean: | clean-common