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
15 files changed
tree: 60dcf4468dcca73271c7f44f867e9663367ecb3b
  1. .bazelci/
  2. examples/
  3. scripts/
  4. site/
  5. src/
  6. third_party/
  7. tools/
  8. .bazelrc
  9. .gitattributes
  10. .gitignore
  11. AUTHORS
  12. BUILD
  13. CHANGELOG.md
  14. CODEOWNERS
  15. combine_distfiles.py
  16. combine_distfiles_to_tar.sh
  17. compile.sh
  18. CONTRIBUTING.md
  19. CONTRIBUTORS
  20. distdir.bzl
  21. ISSUE_TEMPLATE.md
  22. LICENSE
  23. README.md
  24. WORKSPACE
README.md

Bazel

{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.

Getting Started

Documentation

Contributing to Bazel

See CONTRIBUTING.md

Build status