lighthouse/validator_client/slashing_protection/Makefile
Manu NALEPA ec8edfb89a
EIP-3076 tests - complete database (#4958)
* EIP-3076 interchange tests: Add `should_succeed_complete` boolean.

This new added `should_succeed_complete` boolean means the test should succeed using
complete anti-slashing DB, while the untouched `should_succeed` boolean is
still implicitely reserved for minimal anti-slashing DB.

Note:
This commit only adds the new `should_succeed_complete` boolean, and copy the value from
`should_succeed` without any meaning regarding the value this boolean should
take.

* `TestEIP3076SpecTests`: Modify two tests

Those two tests are modified in a way they both comply with minimal AND
complete anti-slashing DB.

* Disallow false positives and differentiate more minimal vs complete cases

* Fix my own typos

* Update to v5.3.0 tag

---------

Co-authored-by: Michael Sproul <michael@sigmaprime.io>
2023-12-05 10:49:50 +11:00

45 lines
1023 B
Makefile

TESTS_TAG := v5.3.0
GENERATE_DIR := generated-tests
OUTPUT_DIR := interchange-tests
TARBALL := $(OUTPUT_DIR)-$(TESTS_TAG).tar.gz
ARCHIVE_URL := https://github.com/eth-clients/slashing-protection-interchange-tests/tarball/$(TESTS_TAG)
ifeq ($(OS),Windows_NT)
ifeq (, $(shell where rm))
rmfile = if exist $(1) (del /F /Q $(1))
rmdir = if exist $(1) (rmdir /Q /S $(1))
makedir = if not exist $(1) (mkdir $(1))
else
rmfile = rm -f $(1)
rmdir = rm -rf $(1)
makedir = mkdir -p $(1)
endif
else
rmfile = rm -f $(1)
rmdir = rm -rf $(1)
makedir = mkdir -p $(1)
endif
$(OUTPUT_DIR): $(TARBALL)
$(call rmdir,$@)
$(call makedir,$@)
tar --strip-components=1 -xzf $^ -C $@
$(TARBALL):
curl --fail -L -o $@ $(ARCHIVE_URL)
clean-test-files:
$(call rmdir,$(OUTPUT_DIR))
clean-archives:
$(call rmfile,$(TARBALL))
generate:
$(call rmdir,$(GENERATE_DIR))
cargo run --release --bin test_generator -- $(GENERATE_DIR)
clean: clean-test-files clean-archives
.PHONY: clean clean-archives clean-test-files generate