forked from twitter/pants
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migrate changed integration tests to isolated temp git repos and add …
…an environment variable to override buildroot Currently, the integration tests in tests/python/pants_test/engine/legacy/test_changed_integration.py rely on mutating the working copy for the purposes of examining real scm diff information to support the changed suite of goals. this means that if there are uncommitted changes, the git diff output will be altered which can subsequently cause the integration tests to fail. This change does: 1. Each changed integration test creates an isolated git repo and runs inside it. Note: there are 4 tests that do not mutate working copy, thus they are exempted. The isolated git repo is a subdir of buildroot. The current logic will cause git to panic in this case. Thus I set buildroot to the same git dir as well. 2. Modify get_buildroot(). It will first look for an environment variable PANTS_BUILDROOT_OVERRIDE. If set, then its value will be the buildroot path. If not, the usual way of determining buildroot is used. This env var is purely for testing usage. 3. Shuffle targets in pants_test/base/BUILD to follow alphabetical order of target names. Testing Done: https://travis-ci.org/pantsbuild/pants/builds/167397682 Bugs closed: 3906, 3946 Reviewed at https://rbcommons.com/s/twitter/r/4295/
- Loading branch information
Showing
6 changed files
with
325 additions
and
182 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.