mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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.