-
-
Notifications
You must be signed in to change notification settings - Fork 346
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
[Scons] Remove "install" target from "check_for_pytest" #1434
Conversation
The `check_for_pytest` depends on `check_for_ruamel_yaml` the pytest package is required on `install` phase and it results in the Cantera installation fail if pytest absent even if tests were not required. This patch swap `check_for_pytest` and `check_for_ruamel_yaml` dependency order. The explicit `test-python-convert`, `test-python` targets are dropped from `check_for_ruamel_yaml` because the `check_for_pytest` includes `target.startswith("test-python")`. Signed-off-by: Sergey Torokhov <torokhov-s-a@yandex.ru>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @band-a-prend. Changes look good to me - some tests appear to be failing for unrelated upstream reasons - I’ll retrigger them, expecting them to pass eventually.
@@ -1697,17 +1697,17 @@ ruamel_min_version = parse_version('0.15.34') | |||
# Minimum pytest version assumed based on Ubuntu 20.04 | |||
pytest_min_version = parse_version("4.6.9") | |||
|
|||
# Pytest is required only to test the Python module | |||
check_for_pytest = any( | |||
target.startswith("test-python") for target in COMMAND_LINE_TARGETS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the command line target test
should also trigger this check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is correct - sorry for jumping the gun on this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@speth
If cantera built without "python_full" or "python_minimal" should then "test" trigger the check_for_pytest? Is pytest required just for C++ library and Fortran wrapper testing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, of course not. But test
causes the Python test suite to be executed when the Python module is installed, so this check does need to happen in that case.
It's not clear from this line alone, but if you look further down where this test is actually handled, you'll see that it happens in a block that checks that env['python_package'] != 'none'
.
Addendum to Cantera#1434; update ensures that checks are run for all tests of the test suite that involve pytest.
Addendum to #1434; update ensures that checks are run for all tests of the test suite that involve pytest.
Changes proposed in this pull request
The
check_for_pytest
depends oncheck_for_ruamel_yaml
the pytest package is required oninstall
phase and it results in the Cantera installation fail if pytest absent even if tests were not required.This patch swap
check_for_pytest
andcheck_for_ruamel_yaml
dependency order.The explicit
test-python-convert
,test-python
targets are dropped fromcheck_for_ruamel_yaml
because thecheck_for_pytest
includestarget.startswith("test-python")
.If applicable, fill in the issue number this pull request is fixing
See commit 72734b1#r97347952 discussion
If applicable, provide an example illustrating new features this pull request is introducing
Checklist
scons build
&scons test
) and unit tests address code coverage