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

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

jsirois
pants
jsirois/distribution/fix_tests/DIST_ROOT
2894, 3254
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

JS
  1. NB, this logical break caused no actual breaks, but in coming to grips with https://github.com/pantsbuild/pants/issues/2894 this cleanup helps instill confidence when reading code and was big enough to go out on its own.
  2. 
      
JS
ST
  1. Ship It!
  2. 
      
JS
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...