commit | 9955bad417a0f0e2bcaf90b02c9758563015c337 | [log] [tgz] |
---|---|---|
author | Dipanshu <dipanshu@fb.com> | Fri Sep 27 13:28:40 2013 -0700 |
committer | Michael Bolin <mbolin@fb.com> | Tue Oct 08 13:27:49 2013 -0700 |
tree | b1213736ab87afb11897b3aef764d3246f87378b | |
parent | 80f6b903b97065965c82c44ff5f10b0bbc3870e7 [diff] |
Fix test caching behavior of Buck. Summary: Since we do not zip the test output with the TestRule's output jar, we would incorrectly report test results if we have a cache hit for the rule's output. CachedTestIntegrationTest was supposed to catch this, but it had a bug where it was always running tests regardless, since it was looking for the xmls in the actual source directory instead of the JUnit temp directory. To fix this, I write the rule key of the rule to it's output directory, and read it later to validate the output against the current rule key while checking for cached outputs. Test Plan: CachedTestIntegrationTest is green. On a test project with caching enabled : 1.) Run tests and make sure they are green. 2.) Introduce a breaking change (`assertTrue(false)`), and the test will be red. 3.) Revert the change. Make sure tests run again and they are green. 4.) Rerun the test without any change. They do not run again but display are reported as Green. (I verified (4) by observing that I don't see TESTING <target-name> in the output) On a clean master (3) would report the test as still failing.
Buck is an Android build tool. To see what Buck can do for you, check out the documentation at http://facebook.github.io/buck/.
To build Buck, run the following:
git clone git@github.com:facebook/buck.git cd buck ant ./bin/buck --help
Apache License 2.0