Cleanup `BinaryUtil`.

Review Request #4108 - Created July 21, 2016 and submitted

Information
John Sirois
pants
jsirois/binary_util/cleanups
3710
d0b64a2...
Reviewers
pants-reviews
gmalmquist, zundel
This simplifies some logic and presents more directly useful error
messages as well as firming up the `osutil.get_os_id` contract with
docs and a now-uniform return protocol.

The `test_support_url_multi` test is also simplified to remove the
ineffective dedup test and is sped up and stabilized by switching a real
bintray protoc fetch out for a local file url fetch of a small test
file.

 src/python/pants/binaries/binary_util.py             | 44 +++++++++++++++++---------------------
 src/python/pants/util/osutil.py                      |  8 ++++++-
 tests/python/pants_test/binaries/BUILD               |  2 ++
 tests/python/pants_test/binaries/test_binary_util.py | 57 +++++++++++++++++++++++++++++---------------------
 4 files changed, 61 insertions(+), 50 deletions(-)

Now locally green on every run vs ~15% of the time and much faster:
./pants test tests/python/pants_test/binaries/:

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

Stu Hood
John Sirois
Ity Kaul
Eric Ayers
John Sirois
Review request changed

Status: Closed (submitted)

Change Summary:

Now on master:

git log -1 origin/master
commit 783feee3639953f11654cdd9284d6b8b0d6b5a26
Author: John Sirois <john.sirois@gmail.com>
Date:   Sat Jul 23 16:45:16 2016 -0600

    Cleanup `BinaryUtil`.
    
    This simplifies some logic and presents more directly useful error
    messages as well as firming up the `osutil.get_os_id` contract with
    docs and a now-uniform return protocol.
    
    The `test_support_url_multi` test is also simplified to remove the
    ineffective dedup test and is sped up and stabilized by switching a real
    bintray protoc fetch out for a local file url fetch of a small test
    file.
    
    Testing Done:
    Now locally green on every run vs ~15% of the time and much faster:
    `./pants test tests/python/pants_test/binaries/:`
    
    CI went green here:
      https://travis-ci.org/pantsbuild/pants/builds/146512692
    
    Bugs closed: 3710
    
    Reviewed at https://rbcommons.com/s/twitter/r/4108/
Loading...