Fix `DIST_ROOT` trample in `test_distribution.py`.

Review Request #3747 - Created April 22, 2016 and submitted

Information
John Sirois
pants
jsirois/distribution/fix_tests/DIST_ROOT
2894, 3254
Reviewers
pants-reviews
gmalmquist, patricklaw, zundel
The `DIST_ROOT` env var was used as a channel to modify fake JDK
executables' view of `java.home`.  This channel was logically broken
for nested uses in `DistributionLinuxLocationTest.java_dist_dir` and
`DistributionOSXLocationTest.java_home_exe`.  Directly template the
location instead of reading it from the environment to properly allow
for independent `java.home` per binary.

 tests/python/pants_test/java/distribution/test_distribution.py | 147 ++++++++++++++++++++++++++------------------------
 1 file changed, 76 insertions(+), 71 deletions(-)

Locally got the same set of failures before and after for:
./pants test tests/python/pants_test/java/distribution

CI went green here:
https://travis-ci.org/pantsbuild/pants/builds/125100878

John Sirois
John Sirois
Stu Hood
John Sirois
Review request changed

Status: Closed (submitted)

Change Summary:

Now on master:

git log -1 origin/master
commit 9540ee56045bf0a2efff258149c0dc12c101f0d7
Author: John Sirois <john.sirois@gmail.com>
Date:   Sun Apr 24 10:11:04 2016 -0600

    Fix `DIST_ROOT` trample in `test_distribution.py`.
    
    The `DIST_ROOT` env var was used as a channel to modify fake JDK
    executables' view of `java.home`.  This channel was logically broken
    for nested uses in `DistributionLinuxLocationTest.java_dist_dir` and
    `DistributionOSXLocationTest.java_home_exe`.  Directly template the
    location instead of reading it from the environment to properly allow
    for independent `java.home` per binary.
    
    Testing Done:
    Locally got the same set of failures before and after for:
    `./pants test tests/python/pants_test/java/distribution`
    
    CI went green here:
      https://travis-ci.org/pantsbuild/pants/builds/125100878
    
    Bugs closed: 2894, 3254
    
    Reviewed at https://rbcommons.com/s/twitter/r/3747/
Loading...