aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/test
Commit message (Collapse)AuthorAge
* Rationalize copyright headersGravatar Damien Martin-Guillerez2015-09-25
| | | | | | | | | | | The headers were modified with `find . -type f -exec 'sed' '-Ei' 's|Copyright 201([45]) Google|Copyright 201\1 The Bazel Authors|' '{}' ';'` And manual edit for not Google owned copyright. Because of the nature of ijar, I did not modified the header of file owned by Alan Donovan. The list of authors were extracted from the git log. It is missing older Google contributors that can be added on-demand. -- MOS_MIGRATED_REVID=103938715
* Switch objc rules to standard coverage propagation using ↵Gravatar Peter Schmitt2015-09-22
| | | | | | | InstrumentedFilesCollector. -- MOS_MIGRATED_REVID=103642172
* Move Label from the lib.syntax to the lib.cmdline package so that:Gravatar Lukacs Berki2015-09-21
| | | | | | | | | | - Label parsing can be simplified - lib.syntax is only contains the code for Skylark and is reasonably independent from the problem domain of building things This change is mostly only changes to imports declarations. The rest is reversing the dependency between :cmdline and :syntax and moving a tiny amount of code between Printer and FilesetEntry and the addition of SkylarkPrintableValue that I couldn't be bothered to separate out into its own change. -- MOS_MIGRATED_REVID=103527877
* Split the list of instrumentation attributes into two lists.Gravatar Ulf Adams2015-09-21
| | | | | | | | Rules that use the new style get sources collected also from rules that claim that they support coverage, even if they don't (like filegroup). -- MOS_MIGRATED_REVID=103381221
* Partially revert change to collect baseline coverage from individual libraries.Gravatar Ulf Adams2015-09-21
| | | | | | | | | | | | | We still want to do that, but not like this. Our infrastructure supports per-target coverage, and so we also need to support per-target baseline coverage. I'm working on better documentation (not hard to be better than no docs), which will cover this. I left a couple of TODOs to explain how we want to do it in the future. -- MOS_MIGRATED_REVID=103379710
* Separate build-specific types and types inherent to Skylark.Gravatar Lukacs Berki2015-09-21
| | | | | -- MOS_MIGRATED_REVID=103374106
* Only collect source files from attributes that don't have instrumentation data.Gravatar Ulf Adams2015-09-15
| | | | | | | | This fixes a recent regression in coverage; it's currently collecting too many files for instrumentation for non-compiled languages. -- MOS_MIGRATED_REVID=103089788
* StandaloneTestStrategy: Remove unnecessary TODO, as dmarting recently ↵Gravatar Philipp Wollermann2015-09-09
| | | | | | | implemented timeout support. -- MOS_MIGRATED_REVID=102651003
* StandaloneTestStrategy: Make sure to create a fresh TEST_TMPDIR when running ↵Gravatar Philipp Wollermann2015-09-09
| | | | | | | a test. Fixes #431. -- MOS_MIGRATED_REVID=102650964
* Display TIMEOUT for test that times outGravatar Damien Martin-Guillerez2015-09-08
| | | | | | | | | Previously the timing out information wasn't propagated to the user, leading to a wrong FAILED message whereas the test was timing out. -- MOS_MIGRATED_REVID=102535481
* Fix some warnings.Gravatar Ulf Adams2015-09-04
| | | | | -- MOS_MIGRATED_REVID=102332437
* For standalone tests, cd into the workspace directory before running the ↵Gravatar Chris Parsons2015-08-31
| | | | | | | test script. -- MOS_MIGRATED_REVID=101937276
* Remove the OFFLINE coverage file constant.Gravatar Ulf Adams2015-08-31
| | | | | | | | | | | All the code paths to the baseline coverage action now go through the InstrumentedFilesCollector, which only passes the local sources for baseline coverage, which are only those files matching the instrumentation spec, which in turn are only files that are valid for offline coverage (in combination with the withBaselineCoverage flag). -- MOS_MIGRATED_REVID=101935566
* Create baseline coverage actions for local sources only and aggregate.Gravatar Ulf Adams2015-08-31
| | | | | | | | | | | | | | | | We no longer generate baseline coverage for all transitive source files in every target; instead, we generate baseline coverage for the files in the current target and collect all of them transitively. That means much smaller but more baseline coverage files; the total content is smaller if you were providing more than one target with overlapping transitive closures on the command line. In addition, we now collect baseline coverage for all targets in the transitive closure of the top-level targets. Previously, if you only passed test targets, you would not get any baseline coverage. -- MOS_MIGRATED_REVID=101929897
* Refactor the InstrumentedFilesCollector.Gravatar Ulf Adams2015-08-31
| | | | | | | | | | Inline everything into the collect() method (which is now documented) and clearly mark local sources (for future changes). Previously, we were creating an intermediate object, which did all its work in the constructor. This means less garbage and slightly clearer code flow (IMO). -- MOS_MIGRATED_REVID=101927041
* Merge the baseline coverage code path into the coverage codepath.Gravatar Ulf Adams2015-08-31
| | | | | | | | | | | | | | | | | We're currently doing too much work for baseline coverage - every rule creates an action for its entire transitive closure; these actions are added to the output group for baseline coverage, but not transitively accumulated. It would be better for every rule to create an action for local baseline coverage, and to aggregate the baseline coverage artifacts down the dependency tree. By merging the code paths, the InstrumentedFilesCollector can perform the aggregation, because it can distinguish local and transitive files; I'm planning to implement that in a subsequent change. -- MOS_MIGRATED_REVID=101914334
* Add a convenience method to InstrumentedFilesCollector.Gravatar Ulf Adams2015-08-31
| | | | | | | This simplifies the users a bit, and makes it easier to refactor the code. -- MOS_MIGRATED_REVID=101802767
* Execute spawns inside sandboxes to improve hermeticity (spawns can no longer ↵Gravatar Philipp Wollermann2015-08-26
| | | | | | | | | | | | use non-declared inputs) and safety (spawns can no longer affect the host system, e.g. accidentally wipe your home directory). This implementation works on Linux only and uses Linux containers ("namespaces"). The strategy works with all actions that Bazel supports (C++ / Java compilation, genrules, test execution, Skylark-based rules, ...) and in tests, Bazel could successfully bootstrap itself and pass the whole test suite using sandboxed execution. This is not the default behavior yet, but can be activated explicitly by using: bazel build --genrule_strategy=sandboxed --spawn_strategy=sandboxed //my:stuff -- MOS_MIGRATED_REVID=101457297
* Remove a few AnalysisEnvironment.getDerivedArtifact() call sites.Gravatar Lukacs Berki2015-08-20
| | | | | -- MOS_MIGRATED_REVID=101111724
* Set the workspace suffix for runfilesGravatar Kristina Chodorow2015-08-13
| | | | | | | This CL covers the "easy" cases. Followup CLs will take care of couple dozen remaining gnarly ones. -- MOS_MIGRATED_REVID=100479410
* Rollback of commit 6c7ef224d700c25f14581f2a290fbc01d5232011.Gravatar Han-Wen Nienhuys2015-07-30
| | | | | | | | | *** Reason for rollback *** Various targets in nightly broken. -- MOS_MIGRATED_REVID=99466859
* Support coverage in experimental_ios_test.Gravatar Peter Schmitt2015-07-29
| | | | | | | | | | | Coverage depends on quite a few moving parts, several of which were changed for this test: - BuildConfiguration.getCoverageLabels() used to include gcov support, this is now replaced by the dedicated getGcovLabels() and a separate implicit attribute on TestBaseRule. This new attribute is then overridden in ExperimentalIosTest to use an xcode-compatible gcov. - Objc's TestSupport now correctly registers instrumented files and sets the necessary runfiles for collecting coverage. - ios_test's template exports gcda files for coverage computation after the test's execution. -- MOS_MIGRATED_REVID=99374435
* Remove calls to AnalysisEnvironment.getDerivedArtifact() from a few places.Gravatar Lukacs Berki2015-07-29
| | | | | -- MOS_MIGRATED_REVID=99352934
* RELNOTES[INC]: Stop supporting the 'suites' attribute of test_suite. UseGravatar Han-Wen Nienhuys2015-07-27
| | | | | | | 'tests' instead. -- MOS_MIGRATED_REVID=99169485
* Support (test) timeouts in Bazel.Gravatar Han-Wen Nienhuys2015-07-07
| | | | | | | Fixes #279. -- MOS_MIGRATED_REVID=97661546
* Add XML_OUTPUT_FILE to the test environment in Bazel.Gravatar Han-Wen Nienhuys2015-06-24
| | | | | -- MOS_MIGRATED_REVID=96663796
* Support --run_under in Bazel.Gravatar Han-Wen Nienhuys2015-06-10
| | | | | | | Fixes #206. -- MOS_MIGRATED_REVID=95525127
* Implement "More flexible strategy flag for Bazel".Gravatar Philipp Wollermann2015-06-08
| | | | | -- MOS_MIGRATED_REVID=95427512
* TestRunnerAction attaches runfilesGravatar Michajlo Matijkiw2015-05-26
| | | | | -- MOS_MIGRATED_REVID=94319218
* Attach runfiles to TestTargetExecutionSettingsGravatar Michajlo Matijkiw2015-05-15
| | | | | -- MOS_MIGRATED_REVID=93554246
* Make local TestStrategy bits rely less on runfiles manifestsGravatar Michajlo Matijkiw2015-05-15
| | | | | | | | | | | TestStrategy#getLocalRunfilesDirectory(...) was using manifest names to infer if the runfiles symlinks were created by comparing the name of manifests. This is a bit confusing and adds unnecessary reliance on manifests which we'd like to reduce. Instead get whether or not we created the symlinks from the boolean that determines it. -- MOS_MIGRATED_REVID=93414150
* Add TEST_TMPDIR for BazelGravatar Kristina Chodorow2015-04-22
| | | | | | | Fixes #138. -- MOS_MIGRATED_REVID=91708374
* Remove the full client environment from BuildConfiguration in favor of ↵Gravatar Lukacs Berki2015-04-17
| | | | | | | computing the test environment as early as possible, and passing that along. -- MOS_MIGRATED_REVID=91388451
* remove ActionMetadata#getInputCountGravatar Michajlo Matijkiw2015-03-23
| | | | | | | | | | | | Removing ActionMetadata#getInputCount instead of relying on all implementations of ActionMetadata keeping getInputCount and getInputs in sync. getInputCount is only used by a few tests and has no applications in the main code at the moment, so it is trivial to remove before we may come to rely on it more or its semantics get more complicated. -- MOS_MIGRATED_REVID=89130009
* Set Bazel TEST_SRCDIR to runfiles root, not inside runfiles prefix.Gravatar Ross Light2015-03-18
| | | | | -- MOS_MIGRATED_REVID=88739509
* add baseline functionality for not saving unused artifactsGravatar Michajlo Matijkiw2015-03-13
| | | | | | | | | | | | | | | | | | | We define unused artifacts as those that aren't consumed by any action. This can be because an action produced more outputs than a dependent action needed, or because it's a top level artifact and we don't care about its contents, just that it was built without issue. Actions may prevent outputs from being discarded by declaring them as mandatory. This is particularly useful for test outputs. The motivation behind this change is to reduce storage overhead for things we can do without. It is worth noting this change doesn't cover all cases. In particular it has difficulty identifying *_binary artifacts as orphaned. This is due to the insertion of a virtual runfiles artifact which depends upon the rule's outputs. -- MOS_MIGRATED_REVID=88467504
* AttributeMap#has(String, Type) is added to check whether an attribute with a ↵Gravatar Googler2015-03-13
| | | | | | | | | given name is present. Rule implementations are cleaned up. -- MOS_MIGRATED_REVID=88430329
* BazelTestSuiteRule is documented. The "suites" attribute is removed from ↵Gravatar Googler2015-03-13
| | | | | | | | | | BazelTestSuiteRule. - "suites" is deprecated - it has the exact same functionality as "tests" -- MOS_MIGRATED_REVID=88426066
* Allow ios_test to override the GCOV environment variableGravatar Daniel Wagner-Hall2015-03-10
| | | | | -- MOS_MIGRATED_REVID=88218457
* List of file extensions supported in BaselineCoverageAction is moved to ↵Gravatar Googler2015-03-05
| | | | | | | Constants. -- MOS_MIGRATED_REVID=87823207
* Some cleanup changes.Gravatar Ulf Adams2015-03-05
| | | | | -- MOS_MIGRATED_REVID=87821306
* Get runfiles prefix from the WORKSPACE fileGravatar Kristina Chodorow2015-03-05
| | | | | -- MOS_MIGRATED_REVID=87513766
* Documentation of the coverage report generation is updated.Gravatar Googler2015-02-26
| | | | | -- MOS_MIGRATED_REVID=87235457
* Add --local_test_jobs to limit local test concurrencyGravatar Mark Schaller2015-02-25
| | | | | | | | | | | | | | | Users have asked for ways to control the concurrency level of their local tests. They can do it right now using the --local_resources option, but that is unintuitive and affects the parallelism of non-test actions. This option changes the kind of resources obtained for local tests. If set, the CPU, RAM, and IO dimensions for local tests will not be used, and a new localTestCount dimension will be used, where the capacity is equal to the option's value, and each local test consumes one unit. -- MOS_MIGRATED_REVID=87177698
* Convert ResourceSet ctor calls to factory methodGravatar Mark Schaller2015-02-20
| | | | | | | | | | Most current invocations of the ResourceSet constructor shouldn't care about any new dimensions we add to restrict test execution. This change allows us to make those changes, keep the ResourceSet ctor symmetrical, and avoid contaminating those ctor call sites with noise. -- MOS_MIGRATED_REVID=86826112
* Remove BaselineCoverageArtifactsProvider in favor of an output group.Gravatar Lukacs Berki2015-02-19
| | | | | | | The only slightly different thing here is that now, instead of using target.getConfiguration().isCodeCoverageEnabled() we use BuildRequest.Options.collectCodeCoverage, but the only place where this is not the same I can think of is InputFileCT, which does not have baseline coverage files anyway. -- MOS_MIGRATED_REVID=86682774
* Coverage implementation for Objective C.Gravatar Googler2015-02-18
| | | | | | | | | | | | | | | Added gcnoFile() to translate a source file to its corrosponding .gcno file. Added "-fprofile-arcs", "-ftest-coverage", "-fprofile-dir=./coverage_output" to compiler flags when compiling in coverage mode. Added "-fprofile-arcs", "-ftest-coverage" to linker flags when linking in coverage mode. Added constructor for InstrumentedFilesProviderImpl that was recently removed due to being unused in []. Added .gcno files to runfiles of IosTest runner to be used by gcov after tests have been run. This CL + [] will enable blaze coverage will work on an ios_test target. An example of the [] output of this change + [] is -- MOS_MIGRATED_REVID=86601223
* Add OutErr#close, and call that in test strategies.Gravatar Han-Wen Nienhuys2015-02-18
| | | | | | | | This fixes "Text file is busy" when trying to execute log files for local tests just after blaze finishes. -- MOS_MIGRATED_REVID=86597766
* Acquire resources for tests in StandaloneTestStrategy.Gravatar Han-Wen Nienhuys2015-02-12
| | | | | | | This fixes --runs_per_test in Bazel. -- MOS_MIGRATED_REVID=86197223
* fix accumulating logic around cached testsGravatar Michajlo Matijkiw2015-02-11
| | | | | | | | | | | | | there was an error in the accounting of how many tests were actually executed vs those that were cached. this was a result of not considering remotely cached tests when accumulating test results. fix the bug and add some unit tests to prove out functionality, as well as some javadoc clarifying functionality. R=janakr -- MOS_MIGRATED_REVID=86112421