Cleanup `BinaryUtil`.
Review Request #4108 — Created July 21, 2016 and submitted — Latest diff uploaded
Information | |
---|---|
jsirois | |
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