From a6c01f82121ea6942c84bffb77923a543cb1452e Mon Sep 17 00:00:00 2001 From: protolambda Date: Fri, 26 Mar 2021 23:21:36 +0100 Subject: [PATCH] no phase1 in tests, per-feature testing now, executable specs will be re-enabled per feature --- Makefile | 4 ++-- tests/core/pyspec/eth2spec/test/context.py | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index d4e7c1258..1404568da 100644 --- a/Makefile +++ b/Makefile @@ -92,11 +92,11 @@ install_test: test: pyspec . venv/bin/activate; cd $(PY_SPEC_DIR); \ - python3 -m pytest -n 4 --disable-bls --cov=eth2spec.phase0.spec --cov=eth2spec.phase1.spec --cov=eth2spec.altair.spec --cov-report="html:$(COV_HTML_OUT)" --cov-branch eth2spec + python3 -m pytest -n 4 --disable-bls --cov=eth2spec.phase0.spec --cov=eth2spec.altair.spec --cov-report="html:$(COV_HTML_OUT)" --cov-branch eth2spec find_test: pyspec . venv/bin/activate; cd $(PY_SPEC_DIR); \ - python3 -m pytest -k=$(K) --disable-bls --cov=eth2spec.phase0.spec --cov=eth2spec.phase1.spec --cov=eth2spec.altair.spec --cov-report="html:$(COV_HTML_OUT)" --cov-branch eth2spec + python3 -m pytest -k=$(K) --disable-bls --cov=eth2spec.phase0.spec --cov=eth2spec.altair.spec --cov-report="html:$(COV_HTML_OUT)" --cov-branch eth2spec citest: pyspec mkdir -p tests/core/pyspec/test-reports/eth2spec; . venv/bin/activate; cd $(PY_SPEC_DIR); \ diff --git a/tests/core/pyspec/eth2spec/test/context.py b/tests/core/pyspec/eth2spec/test/context.py index 34a7016f5..dcc8906b8 100644 --- a/tests/core/pyspec/eth2spec/test/context.py +++ b/tests/core/pyspec/eth2spec/test/context.py @@ -61,7 +61,6 @@ class SpecAltair(Spec): ... -# add transfer, bridge, etc. as the spec evolves class SpecForks(TypedDict, total=False): PHASE0: SpecPhase0 ALTAIR: SpecAltair @@ -352,6 +351,9 @@ def with_phases(phases, other_phases=None): ret = fn(spec=spec_phase0, phases=phase_dir, *args, **kw) if ALTAIR in run_phases: ret = fn(spec=spec_altair, phases=phase_dir, *args, **kw) + + # TODO: merge, sharding, proof_of_custody and das are not executable yet. + # Tests that specify these features will not run, and get ignored for these specific phases. return ret return wrapper return decorator @@ -374,8 +376,8 @@ def with_configs(configs, reason=None): def is_post_altair(spec): - if spec.fork in [PHASE0, PHASE1]: - # TODO: PHASE1 fork is temporarily parallel to ALTAIR. - # Will make PHASE1 fork inherit ALTAIR later. + # TODO: everything runs in parallel to Altair. + # After features are rebased on the Altair fork, this can be reduced to just PHASE0. + if spec.fork in [PHASE0, MERGE, SHARDING, PROOF_OF_CUSTODY, DAS]: return False return True