commit | 4444f1a348692086e596a0525d9119d3a6b6cc95 | [log] [tgz] |
---|---|---|
author | adonovan <adonovan@google.com> | Tue May 12 20:03:11 2020 -0700 |
committer | Copybara-Service <copybara-worker@google.com> | Tue May 12 20:04:20 2020 -0700 |
tree | 60dcf4468dcca73271c7f44f867e9663367ecb3b | |
parent | a8a50cfa3279e008f2848c9ee569a1fb706c7d51 [diff] |
bazel syntax: start disentangling EvaluationTestCase This change causes various tests that formerly extended SkylarkTestCase to extend its superclass, BuildViewTestCase. Inheritance is a poor means of code re-use as it causes things to become entangled. For example construction of the test helper is coupled to construction of the Junit test suite. Now, those tests embed an EvaluationTestCase (really an "apparatus" in Blaze testing jargon) as a field and refer to it explicitly. SkylarkTestCase's anonymous subclass of EvaluationTestCase, which predeclares the Bazel built-ins, has been named as BuildEvaluationTestCase. SkylarkTestCase is deleted. Also, eliminate calls to reset() / initialize() now that setSemantics reinitializes the thread. The test structure is still a mess, but this change unblocks a change to the production API that I have been trying in vain to submit for weeks. I have lost count of the number of good CLs I have had to abandon because the entanglement caused by SkylarkTestCase made updating the tests impossible. Good riddance. PiperOrigin-RevId: 311252614
{Fast, Correct} - Choose two
Build and test software of any size, quickly and reliably.
Speed up your builds and tests: Bazel rebuilds only what is necessary. With advanced local and distributed caching, optimized dependency analysis and parallel execution, you get fast and incremental builds.
One tool, multiple languages: Build and test Java, C++, Android, iOS, Go, and a wide variety of other language platforms. Bazel runs on Windows, macOS, and Linux.
Scalable: Bazel helps you scale your organization, codebase, and continuous integration solution. It handles codebases of any size, in multiple repositories or a huge monorepo.
Extensible to your needs: Easily add support for new languages and platforms with Bazel's familiar extension language. Share and re-use language rules written by the growing Bazel community.
Follow our tutorials:
See CONTRIBUTING.md