-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add ability to run framework tests separately #4538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
e8f6f3d
3321ef2
5dcd5a9
ec3edc0
d05890b
32b0482
ab76fc9
b599bd1
4daf576
38bb4b6
1874b0c
96f9656
e75a3cd
5ba45c7
666a1ef
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -114,9 +114,26 @@ test: pyspec | |
| $(PRESET) \ | ||
| $(BLS) \ | ||
| --junitxml=$(TEST_REPORT_DIR)/test_results.xml \ | ||
| $(CURDIR)/tests/infra \ | ||
| $(PYSPEC_DIR)/eth2spec | ||
|
|
||
| # Run test framework tests. | ||
| # | ||
| # To run a specific test, append k=<test>, eg: | ||
| # make test k=test_verify_kzg_proof | ||
| # To run tests with a specific bls library, append bls=<bls>, eg: | ||
| # make test bls=arkworks | ||
| test_infra: MAYBE_TEST := $(if $(k),-k=$(k)) | ||
| # Disable parallelism which running a specific test. | ||
| # Parallelism makes debugging difficult (print doesn't work). | ||
| test_infra: MAYBE_PARALLEL := $(if $(k),,-n auto) | ||
| test_infra: pyspec | ||
| @mkdir -p $(TEST_REPORT_DIR) | ||
| @$(PYTHON_VENV) -m pytest \ | ||
| $(MAYBE_PARALLEL) \ | ||
| --capture=no \ | ||
| $(MAYBE_TEST) \ | ||
| $(CURDIR)/tests/infra | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I want to keep these tests bundled together.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, after deleting this, can we fix the typo on line 101:
Should be:
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I think going forward, as more framework tests get added, there would be value in allowing separate execution of these tests:
For now, until we improve the CI as in 2., we could add this new
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I understand, but there are better ways of doing this. This solution introduces unnecessary complexity for everyone: (1) we'll need to update documentation telling contributors that they need to run both commands; (2) we need to update the CI checks to run both commands; (3) we'll need to update the release action to run these; (4) we need to update the Makefile help section. There are two other solutions which I would prefer:
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added a TODO list. Additionally to what @danceratopz said I don't think the normal spec test developer will not need to run the infra tests, so another advantage of having them separated.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No that's not what I'm saying. Seriously, let's not add a separate make command for infrastructure tests. Please.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I pushed ec3edc0 which does it how I think it should be done. Just run
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. After thinking about it some more, I've come to this solution:
Are we okay with this? Does it do what you want it to? |
||
|
|
||
| ############################################################################### | ||
| # Coverage | ||
| ############################################################################### | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.