-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Build System: Python] Test restructure #29306
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
[Build System: Python] Test restructure #29306
Conversation
@@ -197,18 +197,18 @@ def test_invalid_swift_version(self): | |||
swift_version_type('100.0.56.1') | |||
|
|||
|
|||
class TestShellSplitType(object): | |||
class TestShellSplitType(unittest.TestCase): |
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.
Turns out this test class was not actually executed because it was subclassing object
... whoops.
@swift-ci please test |
b908c98
to
825f56f
Compare
@swift-ci please test |
Build failed |
Build failed |
825f56f
to
0bd11e2
Compare
@swift-ci please test |
Build failed |
Build failed |
0bd11e2
to
f93bb0a
Compare
@swift-ci please test |
Build failed |
Build failed |
f93bb0a
to
e61c987
Compare
@swift-ci please test |
Build failed |
Build failed |
…ts to contain a build_swift directory. Having the test directory match the module we are testing means we can have scripts in the top level of utils/build_swift which can also have tests. As part of this re-structure the test utilties have been simplified somewhat and all tests no longer use a custom TestCase, rather the standard one exposed by the unittest module.
…swift_build_support which is used to run the unit test suite.
…ls/update_checkout which is used to run the validation test.
…dated the contents to match the other tests.
… was causing the build_swift tests to fail when run with a Python 3 interpreter.
e61c987
to
68bf968
Compare
@swift-ci please test |
Build failed |
Build failed |
I'll likely merge this sometime later today, but only when I have time to keep an eye on bots to make sure nothing breaks. I have a few changes lined up that depend on this patch. |
This PR restructures the Python testing for
utils/build_swift
to mirror the module structure. Now tests forutils/build_swift/build_swift
live inutils/build_swift/tests/build_swift
. This allows for scripts in the top level of the module to also have tests that are not inter-mingled with the module tests.In addition I've added new
run_tests.py
scripts toswift_build_support
andupdate_checkout
which use the standardunittest
module to discover and execute the module tests. These scripts are then used by the validation test suite rather than having custom bash commands for each. This should be more reliable and discoverable for developers working on these modules/tools.