Allow jvm tool tests to bootstrap from the artifact cache.

Review Request #2311 — Created June 2, 2015 and submitted

benjyw
pants
1625
d46af82...
pants-reviews
jsirois, patricklaw, zundel
This makes those tests quite a bit faster. For example,

./pants test tests/python/pants_test/backend/jvm/tasks:junit_run

Runs in 35 seconds with no cached junit jar, but in under 5 seconds with.

This was also a useful exercise in reasoning about test isolation:
To use cached jars they must have the same path under .pants.d, and
in our tests those paths included a randomly named tmpdir and
a randomly named options scope. Switching those to stable names
forced me to think about whether that was OK, and my conclusion was
that it is, which is a good sign for our test isolation.

Ran tests locally before and after, and compared run times.

CI passes: https://travis-ci.org/pantsbuild/pants/builds/65024765.

JS
  1. Ship It!
  2. 
      
ZU
  1. 
      
  2. This doesn't seem right. Isn't 'dist' normally under buildroot? (not pants_workdir).

    1. It is, but I needed somewhere to put it and this was convenient. I can create a tempdir for it if you think that's more consistent and less confusing.

    2. Just realized that I have access to self.build_root here, so that's where dist should go. Fixed.

  3. nit: did you mean to add an extra n/l

  4. 
      
BE
BE
Review request changed

Status: Closed (submitted)

Change Summary:

Thanks John and Eric! Submitted as 45b49e7e06998307a06c363bf9af95d999e6fc94. Enjoy your faster tests!

BE
  1. Thanks John and Eric! Submitted as 45b49e7e06998307a06c363bf9af95d999e6fc94. Enjoy your faster tests!

  2. 
      
Loading...