Fix test bugs introduced in b22024802.

Review Request #2483 — Created July 14, 2015 and submitted

benjyw
pants
44221e3...
pants-reviews
gmalmquist, stuhood, zundel

That change turned on artifact caching globally in tests.
The outcome was that many tests were actually not doing anything.
Instead, they were reading from the real artifact cache.

So, for example, the antlr gen test wasn't running antlr - it was
finding the expected outputs in the cache...

This commit removes the code that turned universal caching on,
and then re-enables caching just for tool bootstrapping, for test
performance.

This fixed the weird issue with antlr gen, so that large comment
is gone too.

Incidentally, this commit also changes the way we register the
source root in the antlr gen test. Instead of eval'ing it in a
BUILD file it just registers it directly, as other tests do.

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

JS
  1. You should probably add Garrett as a reviewer, he had to do this: https://github.com/pantsbuild/pants/blob/master/tests/python/pants_test/backend/codegen/tasks/test_simple_codegen_task.py#L28 Looks like that comment + code can go now too.
    1. Yeah, I'm cleaning up other tests as they break.

  2. 
      
ST
  1. ensure_cached in tests/python/pants_test/tasks/task_test_base.py will probably need to set the options that were removed here.

  2. 
      
BE
BE
BE
BE
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted as deae13386b7dac5d05a310c45034d70718c38020.

JS
  1. Ship It!
  2. 
      
ZU
  1. 
      
  2. At first I was concerned that this would turn on caching for all of the test parts in tests like test_bundle_create.py test_binary_create.py, etc that subclass JvmToolTaskTestBase, but I see you you are just turning it on for the jvm bootstrap part of the task, so LGTM

  3. nit: We don't need clean=True here, its already a freshly made temporary dir

    1. True, will remove in a future change.

  4. 
      
Loading...