Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up`./mach test --all` passes incorrect number of arguments to test-tidy #25554
Comments
|
After further testing (adding a print statement on line 175 of As can be seen the Testing this on my local machine did fix the problem. Will submit a PR tonight. |
Add default arguments so that ./mach test --all works <!-- Please describe your changes on the following line: --> Fix `./mach test --all` not getting any default values for `force_cpp` and `no_wpt` in [python/servo/testing_commands.py](https://github.com/servo/servo/blob/2a594821ba44ba2c13e9a39c6fd8c5a450bd06f4/python/servo/testing_commands.py#L319-L334). For `./mach test-tidy` the default values are obtained using the `@CommandArgument` decorator, but this does not apply for calling `test_tidy()` when using `./mach test --all` (which calls the function directly). This call is found on line 109 of `registrar.py` which should be located in something like `python/_virtualenv2.7/python2.7/site-packages/mach/registrar.py` (but not located in this git repository). --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #25554 (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because the change is minimal and non breaking. Any existing code should be able to work if it uses keyword arguments because the default values will be overriden. If there is code that calls `test_tidy()` with arguments by position this would cause breakage, but I do not believe this happens anywhere in the `testing_command.py` file. `./mach test-tidy` should still work because the arguments are set using the `@CommandArgument` decorator. <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Add default arguments so that ./mach test --all works <!-- Please describe your changes on the following line: --> Fix `./mach test --all` not getting any default values for `force_cpp` and `no_wpt` in [python/servo/testing_commands.py](https://github.com/servo/servo/blob/2a594821ba44ba2c13e9a39c6fd8c5a450bd06f4/python/servo/testing_commands.py#L319-L334). For `./mach test-tidy` the default values are obtained using the `@CommandArgument` decorator, but this does not apply for calling `test_tidy()` when using `./mach test --all` (which calls the function directly). This call is found on line 109 of `registrar.py` which should be located in something like `python/_virtualenv2.7/python2.7/site-packages/mach/registrar.py` (but not located in this git repository). --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #25554 (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because the change is minimal and non breaking. Any existing code should be able to work if it uses keyword arguments because the default values will be overriden. If there is code that calls `test_tidy()` with arguments by position this would cause breakage, but I do not believe this happens anywhere in the `testing_command.py` file. `./mach test-tidy` should still work because the arguments are set using the `@CommandArgument` decorator. <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Add default arguments so that ./mach test --all works <!-- Please describe your changes on the following line: --> Fix `./mach test --all` not getting any default values for `force_cpp` and `no_wpt` in [python/servo/testing_commands.py](https://github.com/servo/servo/blob/2a594821ba44ba2c13e9a39c6fd8c5a450bd06f4/python/servo/testing_commands.py#L319-L334). For `./mach test-tidy` the default values are obtained using the `@CommandArgument` decorator, but this does not apply for calling `test_tidy()` when using `./mach test --all` (which calls the function directly). This call is found on line 109 of `registrar.py` which should be located in something like `python/_virtualenv2.7/python2.7/site-packages/mach/registrar.py` (but not located in this git repository). --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #25554 (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because the change is minimal and non breaking. Any existing code should be able to work if it uses keyword arguments because the default values will be overriden. If there is code that calls `test_tidy()` with arguments by position this would cause breakage, but I do not believe this happens anywhere in the `testing_command.py` file. `./mach test-tidy` should still work because the arguments are set using the `@CommandArgument` decorator. <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
On Ubuntu 19.10,
./mach test --allfails on the current master branch with:#16071 seems related. The main file in question is python/servo/testing_commands.py.
Running
./mach test-tidy --self-testsucceeds with all 29 tests passing.Running
./mach test --all --self-testor./mach test tidy --self-testfail with the same error as./mach test --all. Perhaps --self-test was never meant to work with either of these options, I am not sure.