Fixup `PythonChrootTest.test_thrift_issues_2005`.

Review Request #3774 - Created April 28, 2016 and submitted

Information
John Sirois
pants
jsirois/issues/3288/clone_chroot
3288, 3291
Reviewers
pants-reviews
kwlzn, patricklaw
Previously, the test walked a pex chroot to do a tally of files.  This
approach was flawed since a pex chroot object rooted at a (temporary)
path can have files under the root that are not owned by the chroot
object. In order for the chroot object to own a file, it has to be added
via its API.  Its just these files that make it into a frozen pex.  In
the case of pants pex chroots, the chroot dir is used as a convenient
temp-dir base behind pex's back (files added to the temp-dirs are not
added to the pex chroot object).  This change fixes the chroot
inspection code to act against a clean copy of the chroot object's view
of the chroot.

 tests/python/pants_test/backend/python/test_python_chroot.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

Before the fix, reproed the failure seen under jenkins.pantsbuild.org
locally under ./build-support/bin/ci.sh -fkmsrcn -u 9/10 sharding.
This went green after the fix.

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

John Sirois
Kris Wilson
John Sirois
Review request changed

Status: Closed (submitted)

Change Summary:

Now on master:

git log -1 origin/master
commit b5f4be96810749131c8b8495217ab27f9b4633fd
Author: John Sirois <john.sirois@gmail.com>
Date:   Thu Apr 28 11:06:32 2016 -0600

    Fixup `PythonChrootTest.test_thrift_issues_2005`.
    
    Previously, the test walked a pex chroot to do a tally of files.  This
    approach was flawed since a pex chroot object rooted at a (temporary)
    path can have files under the root that are not owned by the chroot
    object. In order for the chroot object to own a file, it has to be added
    via its API.  Its just these files that make it into a frozen pex.  In
    the case of pants pex chroots, the chroot dir is used as a convenient
    temp-dir base behind pex's back (files added to the temp-dirs are not
    added to the pex chroot object).  This change fixes the chroot
    inspection code to act against a clean copy of the chroot object's view
    of the chroot.
    
    Testing Done:
    Before the fix, reproed the failure seen under jenkins.pantsbuild.org
    locally under `./build-support/bin/ci.sh -fkmsrcn -u 9/10` sharding.
    This went green after the fix.
    
    CI went green here:
      https://travis-ci.org/pantsbuild/pants/builds/126294762
    
    Bugs closed: 3288, 3291
    
    Reviewed at https://rbcommons.com/s/twitter/r/3774/
Loading...