Skip to content

Commit

Permalink
Merge pull request #4034 from jtraglia/fix-modcheck
Browse files Browse the repository at this point in the history
Fix modcheck CI test
  • Loading branch information
jtraglia authored Dec 3, 2024
2 parents 85b4d00 + baf9c36 commit 0d5ad32
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,10 @@ jobs:
- name: Install pyspec requirements
run: make install_test
- name: Run generators with --modcheck
run: make generate_tests modcheck=true
run: make generate_tests modcheck=true 2>&1 | tee consensustestgen.log
- name: Check for errors
run: |
if grep -q "\[ERROR\]" consensustestgen.log; then
echo "There is an error in the log"
exit 1
fi
11 changes: 3 additions & 8 deletions tests/generators/genesis/main.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from eth2spec.gen_helpers.gen_from_tests.gen import run_state_test_generators, combine_mods, check_mods
from eth2spec.gen_helpers.gen_from_tests.gen import run_state_test_generators, check_mods
from eth2spec.test.helpers.constants import PHASE0, ALTAIR, BELLATRIX, CAPELLA, DENEB, ELECTRA


Expand All @@ -8,13 +8,8 @@
'validity',
]}

altair_mods = phase_0_mods

# we have new unconditional lines in `initialize_beacon_state_from_eth1` and we want to test it
_new_bellatrix_mods = {key: 'eth2spec.test.bellatrix.genesis.test_' + key for key in [
'initialization',
]}
bellatrix_mods = combine_mods(_new_bellatrix_mods, altair_mods)
altair_mods = phase_0_mods # No additional Altair specific genesis tests
bellatrix_mods = altair_mods # No additional Bellatrix specific genesis tests
capella_mods = bellatrix_mods # No additional Capella specific genesis tests
deneb_mods = capella_mods # No additional Deneb specific genesis tests
electra_mods = deneb_mods # No additional Electra specific genesis tests
Expand Down

0 comments on commit 0d5ad32

Please sign in to comment.