-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[update-checkout] Make SWIFT_SOURCE_ROOT customizable and add a basic clone test #25673
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
Merged
gottesmm
merged 2 commits into
swiftlang:master
from
gottesmm:pr-346412d7746bf95e1c890610c95d7401bc4490c3
Jun 22, 2019
Merged
[update-checkout] Make SWIFT_SOURCE_ROOT customizable and add a basic clone test #25673
gottesmm
merged 2 commits into
swiftlang:master
from
gottesmm:pr-346412d7746bf95e1c890610c95d7401bc4490c3
Jun 22, 2019
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…rd coding to SWIFT_SOURCE_ROOT. This enables mocking testing to work (otherwise we would create repos in SWIFT_SOURCE_ROOT). SWIFT_SOURCE_ROOT is the default value so nothing changes unless one specifies the argument explicitly.
@swift-ci python lint |
340529e
to
8a6344a
Compare
@swift-ci python lint |
4 similar comments
@swift-ci python lint |
@swift-ci python lint |
@swift-ci python lint |
@swift-ci python lint |
…ure that we can clone. This commit is not meant to completely test update-checkout, but rather create some scaffolding for testing update-checkout so we can create starter bugs to fill out the rest of the functionality. Once we have enough testing in place, we can start refactoring/simplifying update-checkout. Design ------ This is just a standard python unittest test suite except that the tests expect an environment variable (UPDATECHECKOUT_TEST_WORKSPACE_DIR) to be set that specifies the directory that the unittests have for creating mock git repos during setup/teardown. lit invokes the test by calling the unittests with the environment variable set to the appropriate temporary directory. In this temporary directory, each test creates a pristine set of "fake" remote repos and a test-config.json file that can be passed to update-checkout to work with these "fake" remote repos. This allows each test that we write to test various update-checkout functionalities against a pristime set of git repos. I choose the git clone test, just b/c it was really simple. NOTE: One can also run the tests locally using the script test_update_checkout.sh that uses /tmp/workspace as the workspace directory.
8a6344a
to
a9d384d
Compare
@swift-ci python lint |
5 similar comments
@swift-ci python lint |
@swift-ci python lint |
@swift-ci python lint |
@swift-ci python lint |
@swift-ci python lint |
@swift-ci smoke test |
1 similar comment
@swift-ci smoke test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For a while we have had the scaffolding for lit invoking update-checkout tests but never actually had any tests written.
This PR attempts to do the base work for update-checkout testing so that other people (as starter bugs) can fill in the rest of the coverage using this as an example. The only change to update-checkout itself is I had to remove the hard coding of SWIFT_SOURCE_ROOT as the assumed source root so I could mock during the testing. Now one can customize this by passing to update-checkout the argument --source-root. Of course by default, this is still just SWIFT_SOURCE_ROOT.