2020-12-03 22:07:12 +00:00
|
|
|
TESTS_TAG := f495032df9c26c678536cd2b7854e836ea94c217
|
2020-10-02 01:42:27 +00:00
|
|
|
GENERATE_DIR := generated-tests
|
|
|
|
OUTPUT_DIR := interchange-tests
|
|
|
|
TARBALL := $(OUTPUT_DIR)-$(TESTS_TAG).tar.gz
|
|
|
|
ARCHIVE_URL := https://github.com/eth2-clients/slashing-protection-interchange-tests/tarball/$(TESTS_TAG)
|
|
|
|
|
2021-05-19 23:05:16 +00:00
|
|
|
ifeq ($(OS),Windows_NT)
|
|
|
|
ifeq (, $(shell where rm))
|
|
|
|
rmfile = if exist $(1) (del /F /Q $(1))
|
|
|
|
rmdir = if exist $(1) (rmdir /Q /S $(1))
|
|
|
|
else
|
|
|
|
rmfile = rm -f $(1)
|
|
|
|
rmdir = rm -rf $(1)
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
rmfile = rm -f $(1)
|
|
|
|
rmdir = rm -rf $(1)
|
|
|
|
endif
|
|
|
|
|
2020-10-02 01:42:27 +00:00
|
|
|
$(OUTPUT_DIR): $(TARBALL)
|
2021-05-19 23:05:16 +00:00
|
|
|
$(call rmdir,$@)
|
2020-10-02 01:42:27 +00:00
|
|
|
mkdir $@
|
|
|
|
tar --strip-components=1 -xzf $^ -C $@
|
|
|
|
|
|
|
|
$(TARBALL):
|
2020-12-03 22:07:12 +00:00
|
|
|
curl --fail -L -o $@ $(ARCHIVE_URL)
|
2020-10-02 01:42:27 +00:00
|
|
|
|
|
|
|
clean-test-files:
|
2021-05-19 23:05:16 +00:00
|
|
|
$(call rmdir,$(OUTPUT_DIR))
|
2020-10-02 01:42:27 +00:00
|
|
|
|
|
|
|
clean-archives:
|
2021-05-19 23:05:16 +00:00
|
|
|
$(call rmfile,$(TARBALL))
|
2020-10-02 01:42:27 +00:00
|
|
|
|
|
|
|
generate:
|
2021-05-19 23:05:16 +00:00
|
|
|
$(call rmdir,$(GENERATE_DIR))
|
2020-10-02 01:42:27 +00:00
|
|
|
cargo run --release --bin test_generator -- $(GENERATE_DIR)
|
|
|
|
|
|
|
|
clean: clean-test-files clean-archives
|
|
|
|
|
|
|
|
.PHONY: clean clean-archives clean-test-files generate
|
|
|
|
|