aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/analysis/actions
Commit message (Collapse)AuthorAge
* Migrate Java tests to Truth.Gravatar lberki2017-05-30
| | | | | | RELNOTES: None. PiperOrigin-RevId: 157446717
* Automated g4 rollback of commit c4134802dd15d6ef5cca6521f6bf6aac395ee2ad.Gravatar kchodorow2017-05-23
| | | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Roll forward of directory name change *** Original change description *** Automated g4 rollback of commit 1d9e1ac90197b1d3d7b137ba3c1ada67bb9ba31b. *** Reason for rollback *** Breaks //src/test/shell/integration:force_delete_output_test *** Original change description *** Symlink output directories to the correct directory name If the workspace directory is /path/to/my/proj and the name in the WORKSPACE file is "floop", this will symlink the output directories to output_base/execroot/floop instead of output_base/execroot/proj. More prep for #1262, fixes #1681. PiperOrigin-RevId: 156892980
* Refactor ActionTester to pass BitSet to factoriesGravatar hlopko2017-04-26
| | | | | | | | | When discussing readability review for unknown commit we realized that ActionTester api is not super readable and we could improve it using BitSet. This cl does just that. RELNOTES: None. PiperOrigin-RevId: 154289241
* Open source LocalSpawnRunnerGravatar ulfjack2017-04-07
| | | | | | | | | The LocalSpawnRunner is a non-sandboxed local execution implementation, which will replace the current StandaloneSpawnStrategy. The code has been around for a long time and has seen a lot of bugfixes. It also supports local prefetching, which is required for Google. I have a follow-up change to make it support Windows, so it's not a drop-in replacement for StandaloneSpawnStrategy yet. PiperOrigin-RevId: 152486973
* Move the chmod call from SkyframeActionExecutor to ActionMetadataHandlerGravatar ulfjack2017-04-07
| | | | | | | | | | | | | | | | | | | This relies on the explicit state transition in MetadataHandler to decide whether the chmod call is necessary (we must never call chmod if the action was not executed). This is a prerequisite for #1525. If we want to use ctime for detecting file content changes (which is more reliable than just mtime), then we must call chmod before stat, since chmod affects ctime. Before this change, we were caching the stat in ActionMetadataHandler, but calling chmod after action execution in SkyframeActionExecutor, which is the wrong order of calls. However, we must be able to stat in ActionMetadataHandler for cases where a single action runs multiple Spawns where one spawn's output is a subsequent spawn's input. Remove MetadataHandler.isInjected, which is no longer used anywhere. PiperOrigin-RevId: 152387133
* Refactor all ctor callsites of PathFragment to instead call a static ↵Gravatar nharmata2017-04-05
| | | | | | | | | | | | 'create' method. This paves the way for changing PathFragment to e.g. an abstract class with multiple subclasses. This way we can split out the windows-specific stuff into one of these concrete classes, making the code more readable and also saving memory (since the shallow heap size of the NonWindowsPathFragment subclass will hopefully be smaller than that of the current PathFragment). This also lets us pursue gc churn optimizations. We can now do interning in PathFragment#create and can also get rid of unnecessary intermediate PathFragment allocations. RELNOTES: None PiperOrigin-RevId: 152145768
* Automated g4 rollback of commit 1d9e1ac90197b1d3d7b137ba3c1ada67bb9ba31b.Gravatar hlopko2017-04-04
| | | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks //src/test/shell/integration:force_delete_output_test *** Original change description *** Symlink output directories to the correct directory name If the workspace directory is /path/to/my/proj and the name in the WORKSPACE file is "floop", this will symlink the output directories to output_base/execroot/floop instead of output_base/execroot/proj. More prep for #1262, fixes #1681. PiperOrigin-RevId: 152126545
* Symlink output directories to the correct directory nameGravatar kchodorow2017-03-31
| | | | | | | | | | If the workspace directory is /path/to/my/proj and the name in the WORKSPACE file is "floop", this will symlink the output directories to output_base/execroot/floop instead of output_base/execroot/proj. More prep for #1262, fixes #1681. PiperOrigin-RevId: 151712384
* Use a relative path for the runfiles treeGravatar Ulf Adams2017-03-21
| | | | | | | | | | Add preconditions to enforce this and remove some now unnecessary code. A small step towards #1593. -- PiperOrigin-RevId: 150625693 MOS_MIGRATED_REVID=150625693
* Introduce CppCompileActionTemplate, which expands into a list of ↵Gravatar Rumou Duan2017-02-10
| | | | | | | | CppCompileActions that to be executed at execution time. -- PiperOrigin-RevId: 147163077 MOS_MIGRATED_REVID=147163077
* Switch to RunfilesSuppliers for communicating runfilesGravatar Michajlo Matijkiw2017-01-30
| | | | | | | | | | | | | | | | | | | | | | | ActionSpawn/SpawnAction now deal exclusively in RunfilesSuppliers, manifests maps are no more. There is some lingering awkwardness, in particular: - Manifests still need to be tracked in some places, we can work out if this is still necessary on a case by case basis. - Skylark makes actions' runfiles available via 'resolve_command' where they are consumed by 'action'. I've updated the documentation, though the name isn't entirely accurate anymore. That being said these interfaces _are_ marked as experimental, so we _should_ be able to be flexible here. Overall, I think the benefits consolidating runfiles into suppliers, from both code cleanliness and performance perspectives (no longer needing to parse manifests), outweights the awkwardnesses. RELNOTES: resolve_command/action's input_manifest return/parameter is now list -- PiperOrigin-RevId: 145817429 MOS_MIGRATED_REVID=145817429
* Add `depset` as an alias to `set` in SkylarkGravatar Vladimir Moskva2016-12-27
| | | | | | | | | | Renamed all occurrences of `set` to `depset`, added a `set` object constructor for (temporary) backward compatibility. `type(depset())` still temporarily returns "set", that will be changed in the future. RELNOTES: The `set` constructor is deprecated in favor of `depset` -- PiperOrigin-RevId: 142851587 MOS_MIGRATED_REVID=142851587
* Update call sites to FileWriteAction to use the ↵Gravatar Jon Brandvein2016-12-20
| | | | | | | | | | --experimental_transparent_compression flag Also add test to ensure lazy strings aren't forced. -- PiperOrigin-RevId: 142496520 MOS_MIGRATED_REVID=142496520
* Cleanup FileWriteAction and add a flag that will guard transparent compressionGravatar Jon Brandvein2016-12-20
| | | | | | | | This clarifies documentation, renames or rearranges constructors, and defines a BuildConfiguration option that will be made to control transparent compression in a follow-up CL. The follow-up updates call sites to use the new create() factory method. -- PiperOrigin-RevId: 142491333 MOS_MIGRATED_REVID=142491333
* Transparently compress any FileWriteAction strings of > 256 length.Gravatar Googler2016-12-08
| | | | | | | | This should save on heap space for actions with long strings. -- PiperOrigin-RevId: 141440705 MOS_MIGRATED_REVID=141440705
* Move some actions to language-specific packages, where they belong.Gravatar Lukacs Berki2016-11-23
| | | | | -- MOS_MIGRATED_REVID=140024976
* Expose aspect-related information in the extra-action proto that Bazel hands ↵Gravatar Carmi Grushko2016-11-11
| | | | | | | | | to action_listener() rules. RELNOTES: Extra actions now contain aspect-related information. -- MOS_MIGRATED_REVID=138832922
* Add type annotations for the benefit of Java 7Gravatar Klaus Aehlig2016-11-10
| | | | | | | -- Change-Id: Iac9d4202e83853d9c796e517847131de3ca7c5e2 Reviewed-on: https://bazel-review.googlesource.com/#/c/7331 MOS_MIGRATED_REVID=138743393
* Add comment to EnvironmentVariable proto to make it clear that values are ↵Gravatar Googler2016-11-10
| | | | | | | not quoted or escaped. -- MOS_MIGRATED_REVID=138717385
* Proper action output checks for TreeArtifacts. Instead of crashing Bazel, we ↵Gravatar Rumou Duan2016-10-19
| | | | | | | now handle failed TreeArtifact output checks gracefully. -- MOS_MIGRATED_REVID=136627086
* Add a method in MetadataHandler to retrieve contained artifacts from ↵Gravatar Rumou Duan2016-10-07
| | | | | | | TreeArtifacts. -- MOS_MIGRATED_REVID=135485914
* cc_inc_library deletes its output directory before execution.Gravatar Janak Ramakrishnan2016-10-04
| | | | | | | | | | | | This ensures that stale outputs from prior builds do not remain to confuse the compiler. Fixes #1778. -- Change-Id: I31b5c3e7e5970cf45c3ff10144ddfc73540ef9af Reviewed-on: https://bazel-review.googlesource.com/6250 MOS_MIGRATED_REVID=134780501
* Add some type arguments to make Bazel compile again.Gravatar Lukacs Berki2016-08-29
| | | | | -- MOS_MIGRATED_REVID=131570943
* Add client environment to ActionExecutionContextGravatar Klaus Aehlig2016-08-26
| | | | | | | | | | | As the execution of an action now also depends on the client environment, make the latter part of the ActionExecutionContext, so that enough context is provided to actually execute an action. -- Change-Id: Ida7bf407ef0c0375728faba92494bfd47dcbaeb8 Reviewed-on: https://bazel-review.googlesource.com/#/c/5391 MOS_MIGRATED_REVID=131377490
* Make Digest (renamed Md5Digest) a little more multi-purpose.Gravatar Shreya Bhattarai2016-08-23
| | | | | -- MOS_MIGRATED_REVID=130986194
* Rename TreeFileArtifact-related functions to make them more self-explanatory ↵Gravatar Rumou Duan2016-07-26
| | | | | | | and some minor clean-ups. -- MOS_MIGRATED_REVID=128371398
* Move more things from TestConstants to AnalysisMock and LoadingMock.Gravatar Ulf Adams2016-07-14
| | | | | | | Also remove other uses of TestConstants. -- MOS_MIGRATED_REVID=127327339
* ThinLTO changes for upstreamed compiler implementation and other fixes to ↵Gravatar Googler2016-07-01
| | | | | | | | | | | blaze handling. - Converted to correct upstreamed options - Handling of bitcode when creating dynamic libraries - New LTOBackendAction derived from SpawnAction that discovers and adds the imported bitcode files identified by the LTO indexing step. -- MOS_MIGRATED_REVID=126344132
* Fixed more Bazel tests on Windows by using the right line separatorGravatar Yun Peng2016-06-21
| | | | | | | | | | | | | | Newly passing: //src/test/java/com/google/devtools/build/... lib:syntax_test lib/skylark:SkylarkTests lib:analysis_actions_test lib:pkgcache_test -- Change-Id: Iefdcf9e90ad28e664126aa7269487db95da1000a Reviewed-on: https://bazel-review.googlesource.com/#/c/3840 MOS_MIGRATED_REVID=125324588
* 1. Create the TreeArtifact directory structure before expanding ActionTemplates.Gravatar Rumou Duan2016-06-14
| | | | | | | | 2. In PopulateTreeArtifactAction, create the parent directories for TreeFileArtifacts before executing the spawn. 3. Allow empty tree artifacts in CustomCommandLine and PopulateTreeArtifact. -- MOS_MIGRATED_REVID=124759286
* Introducing PopulateTreeArtifactAction, an Action that populates a ↵Gravatar Rumou Duan2016-05-25
| | | | | | | | | | | TreeArtifact with the content of an archive file at execution time by: 1. Reads the archive manifest file on disk. 2. Executes a spawn that expands the archive manifest entries of the archive file into/under the TreeArtifact. 3. Registers the manifest file entries as TreeFileArtifacts of the TreeArtifact. -- MOS_MIGRATED_REVID=123107850
* Replace the occurrences of Constants.PRODUCT_NAME for a call toGravatar Luis Fernando Pino Duque2016-05-23
| | | | | | | | | BlazeRuntime#getProductName() or a reference to TestConstants.PRODUCT_NAME for tests. This CL prepares the codebase in order to delete the constant. -- MOS_MIGRATED_REVID=122993568
* CommandLine: Add support for tree artifact expansions.Gravatar Rumou Duan2016-05-19
| | | | | | | ParameterFileWriteAction: Add support to write out CommandLine with tree artifact expansions. -- MOS_MIGRATED_REVID=122734422
* Introducing SpawnActionTemplate, a stub action for TreeArtifacts at analysis ↵Gravatar Rumou Duan2016-05-12
| | | | | | | time that can expand into a list of SpawnActions operating on associated TreeFileArtifacts inside TreeArtifacts at execution time. -- MOS_MIGRATED_REVID=122056131
* Open source CreateIncSymlinkAction.Gravatar Cal Peyser2016-03-21
| | | | | -- MOS_MIGRATED_REVID=117573654
* Migrated base test classes to JUnit 4 and deleted their temporary *ForJunit4 ↵Gravatar Florian Weikert2015-12-07
| | | | | | | | | | | | versions: devtools/build/lib/analysis/util/AnalysisTestCase.java devtools/build/lib/analysis/util/BuildViewTestCase.java devtools/build/lib/packages/util/PackageLoadingTestCase.java devtools/build/lib/testutil/FoundationTestCase.java -- MOS_MIGRATED_REVID=109560679
* Migrated tests in lib/analysis to JUnit 4.Gravatar Florian Weikert2015-11-30
| | | | | -- MOS_MIGRATED_REVID=108862983
* Replace home-made assertions with equivalent Google Truth calls.Gravatar Carmi Grushko2015-11-11
| | | | | -- MOS_MIGRATED_REVID=107492955
* Migrate blaze from their own duplicated copy of MoreAsserts and use Truth ↵Gravatar Googler2015-11-11
| | | | | | | instead. -- MOS_MIGRATED_REVID=107480889
* Remove BuildViewTestCase.assertContainsSublist, and use ↵Gravatar Carmi Grushko2015-11-06
| | | | | | | MoreAsserts.assertContainsSublist instead. -- MOS_MIGRATED_REVID=107158614
* 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
* TemplateExpansionAction now consistently uses UTF-8 instead of mixing UTF-8 ↵Gravatar Florian Weikert2015-08-04
| | | | | | | with Latin-1 -- MOS_MIGRATED_REVID=99651466
* Inline FoundationTestCase.scratchFile.Gravatar Ulf Adams2015-04-27
| | | | | -- MOS_MIGRATED_REVID=92128998
* Inline/remove some calls to FoundationTestCase.scratchFS().Gravatar Ulf Adams2015-04-27
| | | | | -- MOS_MIGRATED_REVID=91987064
* Actually run the actions tests in Bazel.Gravatar Ulf Adams2015-04-16
| | | | | | | This requires writing a workspace file for the JDK. -- MOS_MIGRATED_REVID=91287178
* Some more cleanup.Gravatar Ulf Adams2015-03-10
| | | | | -- MOS_MIGRATED_REVID=87942730
* Inline a couple of methods from FoundationTestCase. Having these convenienceGravatar Ulf Adams2015-03-05
| | | | | | | | methods available doesn't seem to carry its weight, and this makes it easier for us to migrate to JUnit 4. -- MOS_MIGRATED_REVID=87597162
* Move BuildViewTestCase to the lib.analysis.util package.Gravatar Ulf Adams2015-03-05
| | | | | -- MOS_MIGRATED_REVID=87345558
* Remove ChattyAssertsTestCase. Use static imports, move the code down theGravatar Ulf Adams2015-02-25
| | | | | | | | | | | | tree, rewrite most uses of assertPresence. This is a small step towards migrating the tests to JUnit 4. Depending on inheritance for the assert* methods is not recommended, and the (old) Asserts class is deprecated in JUnit 4. Sorry, there was no good way to do this piecemeal. -- MOS_MIGRATED_REVID=87154212
* Open-source BuildViewTestCase and the infrastructure required by it, as well asGravatar Ulf Adams2015-02-25
the tests under analysis/actions. They don't run yet, because the mock client setup is still missing. -- MOS_MIGRATED_REVID=87149625