-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
test: adding test for configure ninja #30033
test: adding test for configure ninja #30033
Conversation
10e8bac
to
8b9230f
Compare
@nodejs/build-files @nodejs/testing This could use some reviews. |
test/tools/test_configure.py
Outdated
) | ||
|
||
if __name__ == '__main__' and\ | ||
sys.platform in ['linux', 'linux2', 'darwin', 'cygwin']: |
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 awesome work! Thanks. Line 21 should be a backslash, not a slash? One minor nit. PEP8 strongly discourages the use of backslashes in Python code because one whitespace to the right of the backslash breaks the script on a change that is invisible to the reader. Could we instead use parens:
if (__name__ == '__main__' and
sys.platform in ('linux', 'linux2', 'darwin', 'cygwin')):
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.
Updated and fixed a few other pep8 warnings.
- Updated the tooltest target to run unittest module - Renamed test/tools/test-js2c.py to be discoverable by unittest module - Added test class for `configure` shell script - Added a test to ensure `configure` script exits with status code zero when passed the `--ninja` flag Closes nodejs#29415
8b9230f
to
08b5e13
Compare
@patrickhousley The failing Travis CI test was a fluke. It passed quickly when it was rerun. |
- Updated the tooltest target to run unittest module - Renamed test/tools/test-js2c.py to be discoverable by unittest module - Added test class for `configure` shell script - Added a test to ensure `configure` script exits with status code zero when passed the `--ninja` flag Closes: #29415 PR-URL: #30033 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Christian Clauss <[email protected]>
Landed in 85dd9e8. Thanks for the contribution! 🎉 |
This seems like it now always runs |
This reverts commit 85dd9e8. `make test` should never change the current set of `configure` flags. Refs: nodejs#30033
This reverts commit 85dd9e8. `make test` should never change the current set of `configure` flags. Refs: #30033 PR-URL: #30295 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Jiawen Geng <[email protected]>
@patrickhousley I’m sorry that this needed to be reverted – I think what we need for #29415 is a new job in our CI matrix, not something that we could really make part of our regular test suite that developers run locally |
@addaleax Is your objection to the addition of test/tools/test_configure.py? Would we be OK to create a new PR that redoes the change to Makefile and the rename test/tools/{test-js2c.py => test_js2c.py}? |
@cclauss The issue is that the test added by this PR reran |
@cclauss Yeah, I don’t have any objections to the rename/Makefile changes – other than that, 👍 to what @richardlau said. |
Hi @patrickhousley, Would you be willing to make a new pull request that just makes the changes to Makefile and test-js2c.py? Or would you like me to do that? |
Co-authored-by: @patrickhousley Fixes to Python tests to ensure that the following all pass: 1. __python2 -m pytest ./test ./tools__ # 30 tests pass 2. __python3 -m pytest ./test ./tools__ # 30 tests pass 3. __python2 -m unittest discover -s ./test/tools__ # 1 test passes 4. __python3 -m unittest discover -s ./test/tools__ # 1 test passes 5. __PYTHON=python2 make tooltest__ # 1 test passes 6. __PYTHON=python3 make tooltest__ # 1 test passes This is a subset of nodejs#30033
Co-authored-by: @patrickhousley Fixes to Python tests to ensure that the following all pass: 1. __python2 -m pytest ./test ./tools__ # 30 tests pass 2. __python3 -m pytest ./test ./tools__ # 30 tests pass 3. __python2 -m unittest discover -s ./test/tools__ # 1 test passes 4. __python3 -m unittest discover -s ./test/tools__ # 1 test passes 5. __PYTHON=python2 make tooltest__ # 1 test passes 6. __PYTHON=python3 make tooltest__ # 1 test passes This is a subset of #30033 PR-URL: #30340 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: David Carlier <[email protected]>
- Updated the tooltest target to run unittest module - Renamed test/tools/test-js2c.py to be discoverable by unittest module - Added test class for `configure` shell script - Added a test to ensure `configure` script exits with status code zero when passed the `--ninja` flag Closes: #29415 PR-URL: #30033 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Christian Clauss <[email protected]>
This reverts commit 85dd9e8. `make test` should never change the current set of `configure` flags. Refs: #30033 PR-URL: #30295 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Jiawen Geng <[email protected]>
Co-authored-by: @patrickhousley Fixes to Python tests to ensure that the following all pass: 1. __python2 -m pytest ./test ./tools__ # 30 tests pass 2. __python3 -m pytest ./test ./tools__ # 30 tests pass 3. __python2 -m unittest discover -s ./test/tools__ # 1 test passes 4. __python3 -m unittest discover -s ./test/tools__ # 1 test passes 5. __PYTHON=python2 make tooltest__ # 1 test passes 6. __PYTHON=python3 make tooltest__ # 1 test passes This is a subset of #30033 PR-URL: #30340 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: David Carlier <[email protected]>
Co-authored-by: @patrickhousley Fixes to Python tests to ensure that the following all pass: 1. __python2 -m pytest ./test ./tools__ # 30 tests pass 2. __python3 -m pytest ./test ./tools__ # 30 tests pass 3. __python2 -m unittest discover -s ./test/tools__ # 1 test passes 4. __python3 -m unittest discover -s ./test/tools__ # 1 test passes 5. __PYTHON=python2 make tooltest__ # 1 test passes 6. __PYTHON=python3 make tooltest__ # 1 test passes This is a subset of #30033 PR-URL: #30340 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: David Carlier <[email protected]>
Co-authored-by: @patrickhousley Fixes to Python tests to ensure that the following all pass: 1. __python2 -m pytest ./test ./tools__ # 30 tests pass 2. __python3 -m pytest ./test ./tools__ # 30 tests pass 3. __python2 -m unittest discover -s ./test/tools__ # 1 test passes 4. __python3 -m unittest discover -s ./test/tools__ # 1 test passes 5. __PYTHON=python2 make tooltest__ # 1 test passes 6. __PYTHON=python3 make tooltest__ # 1 test passes This is a subset of #30033 PR-URL: #30340 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: David Carlier <[email protected]>
configure
shell scriptconfigure
script exits with status code zerowhen passed the
--ninja
flagCloses #29415
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes