From 42040a8bb48e3a8a8c5fd4aa5921e2824000befd Mon Sep 17 00:00:00 2001 From: Danny Ryan Date: Fri, 21 Jun 2019 13:38:13 -0600 Subject: [PATCH 1/5] add xdist parallelization --- Makefile | 4 ++-- test_libs/pyspec/requirements-testing.txt | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 9764b35286..f1a324a3d0 100644 --- a/Makefile +++ b/Makefile @@ -48,11 +48,11 @@ install_test: test: $(PY_SPEC_ALL_TARGETS) cd $(PY_SPEC_DIR); . venv/bin/activate; export PYTHONPATH="./"; \ - python -m pytest --cov=eth2spec.phase0.spec --cov=eth2spec.phase1.spec --cov-report="html:$(COV_HTML_OUT)" --cov-branch eth2spec + python -m pytest -n auto --cov=eth2spec.phase0.spec --cov=eth2spec.phase1.spec --cov-report="html:$(COV_HTML_OUT)" --cov-branch eth2spec citest: $(PY_SPEC_ALL_TARGETS) cd $(PY_SPEC_DIR); mkdir -p test-reports/eth2spec; . venv/bin/activate; \ - python -m pytest --junitxml=test-reports/eth2spec/test_results.xml eth2spec + python -m pytest -n auto --junitxml=test-reports/eth2spec/test_results.xml eth2spec open_cov: ((open "$(COV_INDEX_FILE)" || xdg-open "$(COV_INDEX_FILE)") &> /dev/null) & diff --git a/test_libs/pyspec/requirements-testing.txt b/test_libs/pyspec/requirements-testing.txt index ad9c4de3bc..b5229ae20f 100644 --- a/test_libs/pyspec/requirements-testing.txt +++ b/test_libs/pyspec/requirements-testing.txt @@ -1,6 +1,7 @@ -r requirements.txt -pytest>=3.6,<3.7 +pytest>=4.4 ../config_helpers flake8==3.7.7 mypy==0.701 pytest-cov +pytest-xdist From eb06d2d3f661bfdc32d2bd161d57494de43e5fcf Mon Sep 17 00:00:00 2001 From: Danny Ryan Date: Fri, 21 Jun 2019 13:45:04 -0600 Subject: [PATCH 2/5] reduce circleci cpus to 8 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f1a324a3d0..87107df410 100644 --- a/Makefile +++ b/Makefile @@ -52,7 +52,7 @@ test: $(PY_SPEC_ALL_TARGETS) citest: $(PY_SPEC_ALL_TARGETS) cd $(PY_SPEC_DIR); mkdir -p test-reports/eth2spec; . venv/bin/activate; \ - python -m pytest -n auto --junitxml=test-reports/eth2spec/test_results.xml eth2spec + python -m pytest -n 8 --junitxml=test-reports/eth2spec/test_results.xml eth2spec open_cov: ((open "$(COV_INDEX_FILE)" || xdg-open "$(COV_INDEX_FILE)") &> /dev/null) & From b2d863fa3deca8b0704f1fc69112af6fb07c6798 Mon Sep 17 00:00:00 2001 From: Danny Ryan Date: Fri, 21 Jun 2019 13:55:57 -0600 Subject: [PATCH 3/5] reduce cpus to 4 --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 87107df410..9090c3ef0e 100644 --- a/Makefile +++ b/Makefile @@ -48,11 +48,11 @@ install_test: test: $(PY_SPEC_ALL_TARGETS) cd $(PY_SPEC_DIR); . venv/bin/activate; export PYTHONPATH="./"; \ - python -m pytest -n auto --cov=eth2spec.phase0.spec --cov=eth2spec.phase1.spec --cov-report="html:$(COV_HTML_OUT)" --cov-branch eth2spec + python -m pytest -n 4 --cov=eth2spec.phase0.spec --cov=eth2spec.phase1.spec --cov-report="html:$(COV_HTML_OUT)" --cov-branch eth2spec citest: $(PY_SPEC_ALL_TARGETS) cd $(PY_SPEC_DIR); mkdir -p test-reports/eth2spec; . venv/bin/activate; \ - python -m pytest -n 8 --junitxml=test-reports/eth2spec/test_results.xml eth2spec + python -m pytest -n 4 --junitxml=test-reports/eth2spec/test_results.xml eth2spec open_cov: ((open "$(COV_INDEX_FILE)" || xdg-open "$(COV_INDEX_FILE)") &> /dev/null) & From ded8ce21d0dea4b38411f95b055684bfcc3f020a Mon Sep 17 00:00:00 2001 From: Danny Ryan Date: Fri, 21 Jun 2019 14:04:07 -0600 Subject: [PATCH 4/5] reduce circleci cpus to 2 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9090c3ef0e..767f357401 100644 --- a/Makefile +++ b/Makefile @@ -52,7 +52,7 @@ test: $(PY_SPEC_ALL_TARGETS) citest: $(PY_SPEC_ALL_TARGETS) cd $(PY_SPEC_DIR); mkdir -p test-reports/eth2spec; . venv/bin/activate; \ - python -m pytest -n 4 --junitxml=test-reports/eth2spec/test_results.xml eth2spec + python -m pytest -n 2 --junitxml=test-reports/eth2spec/test_results.xml eth2spec open_cov: ((open "$(COV_INDEX_FILE)" || xdg-open "$(COV_INDEX_FILE)") &> /dev/null) & From 4d247b6092492a856306896be5c3b6f9b212415d Mon Sep 17 00:00:00 2001 From: Danny Ryan Date: Fri, 21 Jun 2019 14:10:18 -0600 Subject: [PATCH 5/5] circleci back to 4 cpus --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 767f357401..9090c3ef0e 100644 --- a/Makefile +++ b/Makefile @@ -52,7 +52,7 @@ test: $(PY_SPEC_ALL_TARGETS) citest: $(PY_SPEC_ALL_TARGETS) cd $(PY_SPEC_DIR); mkdir -p test-reports/eth2spec; . venv/bin/activate; \ - python -m pytest -n 2 --junitxml=test-reports/eth2spec/test_results.xml eth2spec + python -m pytest -n 4 --junitxml=test-reports/eth2spec/test_results.xml eth2spec open_cov: ((open "$(COV_INDEX_FILE)" || xdg-open "$(COV_INDEX_FILE)") &> /dev/null) &