aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java
Commit message (Collapse)AuthorAge
* Minor style fixes in intellij_info_tests.bzlGravatar Dmitry Lomov2016-06-23
| | | | | | | | 1) remove no-op conversion to dictionary 2) use [] instead of dict.get -- MOS_MIGRATED_REVID=125655793
* Adds the Android manifest merger as an option for android_binary rules. The ↵Gravatar Andrew Pellegrini2016-06-23
| | | | | | | | | merger that is used (legacy or android) is controlled by the manifest_merger attribute on android_binary and the default is controlled by the --android_manifest_merger flag. RELNOTES: The Android manifest merger is now available as an option for android_binary rules. The merger will honor tools annotations in AndroidManifest.xml and will perform placeholder substitutions using the values specified in android_binary.manifest_values. The merger may be selected by setting the manifest_merger attribute on android_binary. -- MOS_MIGRATED_REVID=125603954
* Make intellij_info_tests work again.Gravatar Dmitry Lomov2016-06-23
| | | | | -- MOS_MIGRATED_REVID=125592395
* Get rid of a bunch of IOExceptions that were being unnecessarily thrown. We ↵Gravatar Janak Ramakrishnan2016-06-23
| | | | | | | don't want to throw IOExceptions unless there is an actual IOException. Syntax errors in WORKSPACE files don't qualify, and neither do badly written Skylark rules. I may have misunderstood some code here, so please do push back if the root causes here really can be filesystem issues. -- MOS_MIGRATED_REVID=125591177
* Simplify RuleClassProvider; it kept two identical lists for no purpose.Gravatar Ulf Adams2016-06-23
| | | | | | | | Also update HelpCommand to output the configuration options in the hmtl output. -- MOS_MIGRATED_REVID=125570665
* Fix handling of backslash-escaped CRLF line terminators.Gravatar Lukacs Berki2016-06-23
| | | | | | | | | The character sequences in the test cases behave the same way Python does. Fixed #1306. -- MOS_MIGRATED_REVID=125568600
* Filegroups can optionally export sources from a given output group.Gravatar Cal Peyser2016-06-23
| | | | | -- MOS_MIGRATED_REVID=125562946
* Make execution root symlink builder handle PackageIdentifiersGravatar Kristina Chodorow2016-06-23
| | | | | | | Part of the rollforward for #1262. -- MOS_MIGRATED_REVID=125562871
* Roll forward of commit 1f1f207573c7b9c3e2d3ca1ffb0780a8fd592214: action to ↵Gravatar Googler2016-06-23
| | | | | | | | | | | | | | | | | | | | | | | | write R classes directly NEW: add check that primary R.txt exists before trying to load its symbols. Rollback of commit 32c6c15c8b9bc4e203529f60bedbc5cd8a496a36. *** Reason for rollback *** Rollforward with check that primary R.txt exists *** Original change description *** Automated [] rollback of commit 1f1f207573c7b9c3e2d3ca1ffb0780a8fd592214. *** Reason for rollback *** Doesn't handle aapt that doesn't generate R.txt properly. -- MOS_MIGRATED_REVID=125559472
* Roll forward commit 4ab4f05a8cbbaa4b7d938d1d305961fe95a5416c.Gravatar Googler2016-06-22
| | | | | | | Consider /src/ in the path when locating the java root directory. -- MOS_MIGRATED_REVID=125461909
* Remove the "glibc" selector from CppConfiguration.Gravatar Lukacs Berki2016-06-22
| | | | | | | It's not used and it causes difficulties, since it's a function of the CROSSTOOL file, which we want not to affect configurations (eventually). -- MOS_MIGRATED_REVID=125455664
* Fixed two Bazel java tests on Windows by using the right native file systemGravatar Yun Peng2016-06-21
| | | | | | | | | | | | | | Newly passing: //src/test/java/com/google/devtools/build/... lib/skyframe:SkyframeTests lib:actions_test Also refactored FileSystems.java -- Change-Id: I03ab9db5c1ab5e5be4ff1efbc5cf2d280084254a Reviewed-on: https://bazel-review.googlesource.com/#/c/3843 MOS_MIGRATED_REVID=125449456
* sandbox: Remove debug flags from LinuxSandboxedStrategyTestCase as they were ↵Gravatar Philipp Wollermann2016-06-21
| | | | | | | causing LocalLinuxSandboxedStrategyTest to fail due to unexpected lines in the output. -- MOS_MIGRATED_REVID=125439352
* Added more pointers to Aspect-related documentation.Gravatar Florian Weikert2016-06-21
| | | | | -- MOS_MIGRATED_REVID=125428066
* Add an option for the number of actions shown in the experimental UIGravatar Klaus Aehlig2016-06-21
| | | | | | | | | | | | | | Currently, the experimental UI always shows the 3 oldest, still running actions. While this seems a reasonable default, some users requested to be able to change the number of actions shown. Hence replace the hard-coded value by a flag. While there, also fix an off-by-one error in deciding when to put the ellipsis symbol. -- Change-Id: I037d208360fa1d3f100c99ab1ab1f5fc140138ac Reviewed-on: https://bazel-review.googlesource.com/#/c/3811 MOS_MIGRATED_REVID=125427168
* Rollback of commit 1f1f207573c7b9c3e2d3ca1ffb0780a8fd592214.Gravatar Googler2016-06-21
| | | | | | | | | *** Reason for rollback *** Doesn't handle aapt that doesn't generate R.txt properly. -- MOS_MIGRATED_REVID=125405481
* Optimize an assertion which was showing up in profiles. (Even better might beGravatar Googler2016-06-21
| | | | | | | | to remove the call from RuleConfiguredTarget.getProvider() and instead check the types when the providers ImmutableMap is built.) -- MOS_MIGRATED_REVID=125389561
* Add action to write android_binary and lib R.classes directlyGravatar Googler2016-06-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For android_binary rules, we regenerate all of the R.java of the libraries to get the final resource IDs. Compiling all of them together can be slow with the normal JavaBuilder, so add a specialized class writer. Example build with many R.java classes: - R.java -> R.class via JavaBuilder: over 80s - ErrorProne takes about 40% of that. So turning off ErrorProne would be projected to be 48s. Some of ErrorProne slowness is from static field checks (e.g., on Flag classes), which may look up the same Type over and over. In comparison, if we write our own bytecode with ASM: - ~16s total - 4.7s to parse R.txt - 4.8s to write class files - 5.8s to copy and compress .jar TODO: clean up SymbolLoader patching (upstream) This only creates the action. We will need to separately wire this up in blaze. NOTE: This also makes the exising R.txt loading used by live code multi-threaded, since that is partly I/O-bound. Something to watch out for (for flakiness, etc.) once this is submitted. -- MOS_MIGRATED_REVID=125384467
* Updates BuildViewTestCase.invalidatePackages() to also invalidateGravatar Greg Estren2016-06-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | configurations. This is important for dynamic configurations. invalidatePackages() invalidates every file. This includes CROSSTOOL, which the CppConfiguration fragment depends on. For static configurations, this doesn't matter because all configurations and their fragments are pre-computed at the beginning of the build (or in the case of tests before the test case starts). For dynamic configurations, the configuration can get custom-created each configured target. When that happens after invalidatePackages, a new CppConfiguration instance gets created. This can impact code like CcLibraryHelper.addDeps(), which assumes equality (CppConfiguration has no .equals() method). Normally that's not a problem because the same CppConfiguration instance is used for every target in the post-invalidatePackages() graph. But host configurations break this: we keep a non-Skyframe host config cache in SkyframeBuildView.hostConfigurationCache. Without this change, it doesn't get cleared out, so it keeps old pre-invalidation references that under certain circumstances get applied to post-invalidation targets. -- MOS_MIGRATED_REVID=125379342
* Simplify OutputGroupProviderTest.Gravatar Michael Staib2016-06-21
| | | | | | | | Avoids constructing and manipulating expected value sets for containsExactlyElementsIn when containsExactly will do. -- MOS_MIGRATED_REVID=125371446
* Simplify the logic of determining output groups.Gravatar Alex Humesky2016-06-21
| | | | | -- MOS_MIGRATED_REVID=125368119
* Minor change to add QueryableGraphBackedSkyFunctionEnvironment.Gravatar Janak Ramakrishnan2016-06-21
| | | | | -- MOS_MIGRATED_REVID=125362963
* Minor improvement to cycle detection algorithm: Do not recurse into done ↵Gravatar Eric Fellheimer2016-06-21
| | | | | | | | | | | nodes, where there is no work to do anyway. This triggered some non-determinism that we explicitly workaround in the unit tests. Also add a comment about a potential but unrelated optimization. -- MOS_MIGRATED_REVID=125355303
* Move execroot tree creation to its own classGravatar Kristina Chodorow2016-06-21
| | | | | | | Part 1 of many for #1262, rolling forward. -- MOS_MIGRATED_REVID=125334954
* 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
* sandbox: So refactoring, much no-op change, wow.Gravatar Philipp Wollermann2016-06-21
| | | | | | | (But this will make it easier to try out the overlayfs-based sandbox later.) -- MOS_MIGRATED_REVID=125320914
* In FileSystemValueChecker, only check TreeArtfacts that are in theGravatar Rumou Duan2016-06-20
| | | | | | | passed-in modified file sets. -- MOS_MIGRATED_REVID=125173579
* Trim configurations requested for a target in BuildViewTestCase.Gravatar Greg Estren2016-06-20
| | | | | -- MOS_MIGRATED_REVID=125171507
* Correctly escape backslashes in proto messarges.Gravatar Googler2016-06-20
| | | | | -- MOS_MIGRATED_REVID=125166943
* experimental UI: also report the strategy of running actionsGravatar Klaus Aehlig2016-06-20
| | | | | | | | | | In the experimental UI, for the running actions also report their strategy. This will give a more complete picture of what Bazel is currently doing. -- Change-Id: I9553c952ed494e0db225b2a1ae5e8eba00f68617 Reviewed-on: https://bazel-review.googlesource.com/#/c/3820 MOS_MIGRATED_REVID=125162808
* Rollback of commit bdfd58a8ca2ed5735d6aaa5b238fb0f689515724.Gravatar Laurent Le Brun2016-06-20
| | | | | -- MOS_MIGRATED_REVID=125160288
* Adds cycle detection errors when top-level dynamicGravatar Greg Estren2016-06-17
| | | | | | | | | | | | | | | | | | | | | | | | | | configuration creation fails because transitive fragment visitation hits these cycles. This makes CircularDependencyTest pass with dynamic configurations. It's a little bit unfortunate that BuildViewTestCase follows a different code path to create configured targets than production (BuildView.getConfiguredTargetForTesting vs. BuildView.update). As a result, doing an actual build over the rules defined in CircularDependencyTest#testTwoCycles correctly reports the cycle, while the test itself doesn't. That means the test isn't 100% faithfully testing production logic. But I'm not interested in fixing the gap between BuildView.update and BuildView.getConfiguredTargetForTesting in this change. That's part of a larger refactoring effort on the various forked ways of acccessing configured targets and dependencies in BuildView. -- MOS_MIGRATED_REVID=125118553
* Make the execution root match the runfiles tree structure for external ↵Gravatar Kristina Chodorow2016-06-17
| | | | | | | | | | | | | | | | | | | | | repositories One interesting side effect of how this is implemented is that for external repositories, bin/ and genfiles/ are combined. External repo output is under bazel-out/local-fastbuild/repo_name for each repo. Fixes #1262. RELNOTES[INC]: Previously, an external repository would be symlinked into the execution root at execroot/local_repo/external/remote_repo. This changes it to be at execroot/remote_repo. This may break genrules/Skylark actions that hardcode execution root paths. If this causes breakages for you, ensure that genrules are using $(location :target) to access files and Skylark rules are using http://bazel.io/docs/skylark/lib/File.html's path, dirname, etc. functions. -- MOS_MIGRATED_REVID=125095799
* Fixed some Bazel java tests on WindowsGravatar Yun Peng2016-06-17
| | | | | | | | | | | | | | | | | | | | | | | | With this change, another 5 java_test targets of Bazel passed on Windows: //src/test/java/com/google/devtools/... build/lib/bazel/repository/downloader:DownloaderTests build/lib:graph_test build/lib:java-rules-tests build/lib:profiler-tests build/lib:windows_test Already passing targets are: //src/test/java/com/google/devtools/... build/android/ziputils:ziputils-tests build/lib:BazelDocumentationTests build/lib:objc-rules-tests build/skyframe:skyframe_base_test common/options:options_test -- Change-Id: Ibb63f29615b84d6df44289c902f6d85ab6569d61 Reviewed-on: https://bazel-review.googlesource.com/#/c/3821 MOS_MIGRATED_REVID=125084737
* Make more Bazel java tests pass on WindowsGravatar Yun Peng2016-06-17
| | | | | | | | | | | | | | | | | | | | | | | Add toolchain configuration for x64_windows in MOCK_CROSSTOOL This makes the following targets pass: //src/test/java/com/google/devtools/build/... docgen:DocumentationTests lib:analysis_config_test lib:analysis_constraints_test lib:analysis_select_test lib/bazel/repository:RepositoryTests lib:bazel-rules-tests lib:packages_test lib/rules/repository:RepositoryTests lib:runtime-tests lib:exec-tests lib:filegroup-rules-tests -- Change-Id: If8a0bfca0a2506ee2c344803ca3776cc31bc4441 Reviewed-on: https://bazel-review.googlesource.com/#/c/3822 MOS_MIGRATED_REVID=125084693
* Description redacted.Gravatar Googler2016-06-16
| | | | | -- MOS_MIGRATED_REVID=125013752
* Add toString for NotifyingNodeEntry -- we lost this in commit ↵Gravatar Janak Ramakrishnan2016-06-16
| | | | | | | 8be7fd0bb7cc8f0819f23ef4bbf6328472110db7 when NotifyingNodeEntry stopped inheriting from InMemoryNodeEntry. -- MOS_MIGRATED_REVID=124960351
* Remove ability of AbstractQueueVisitor to continue after an interrupt. That ↵Gravatar Janak Ramakrishnan2016-06-15
| | | | | | | functionality was only used in tests. -- MOS_MIGRATED_REVID=124841573
* Fix android deps always being exported in skylark aspect.Gravatar Googler2016-06-15
| | | | | -- MOS_MIGRATED_REVID=124832306
* Optimize memory use of AttributeContainer:Gravatar Googler2016-06-15
| | | | | | | | | | | | | - Relatively few locations are set relative to the number of attributes. Replace the sparse array with a dense one. - BitSet requires a minimum of two objects (48 bytes in our current JVM), but we set an average of just six bits. Replace it with a list of indices packed into a byte[], shared with the locations array. Also add some assertions to help the next reader. -- MOS_MIGRATED_REVID=124830576
* Use only one list of parameters for SkylarkSignatureGravatar Damien Martin-Guillerez2016-06-14
| | | | | | | | | | | | | Optional and named parameters are now specified using `defaultValue` and `named` (and `positional`). The new structure allow for parameters that are both named and positional (which was forbidden before). This new structure will be used to give the @SkylarkCallable annotation the possibility to provide named and default arguments. It should be a functional no-op for Bazel users. -- MOS_MIGRATED_REVID=124821455
* Report cycles involving aspects correctly.Gravatar Lukacs Berki2016-06-14
| | | | | | | | | This involved refactoring BuildViewTestCase a bit so that its behavior is closer to that of Bazel with --experimental_interleave_loading_and_analysis. RELNOTES: -- MOS_MIGRATED_REVID=124816624
* Allow a config_setting() to match against the default grte_top.Gravatar Googler2016-06-14
| | | | | -- MOS_MIGRATED_REVID=124792198
* 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
* Optimize hotspot in DependencySet.process().Gravatar Googler2016-06-14
| | | | | -- MOS_MIGRATED_REVID=124744073
* Remove predefined Python variable "generic_cpu"Gravatar Greg Estren2016-06-13
| | | | | | | RELNOTES[INC]: Removed predefined Python variable "generic_cpu". -- MOS_MIGRATED_REVID=124611269
* Use params file for IDE aspect manifest action.Gravatar Googler2016-06-13
| | | | | -- MOS_MIGRATED_REVID=124594694
* Introduce TestConstants#PACKAGE_FACTORY_FACTORY_FOR_TESTING for the sake of ↵Gravatar Nathan Harmata2016-06-10
| | | | | | | making it easier to create PackageFactory instances in unit tests. -- MOS_MIGRATED_REVID=124566862
* Extract the @Param annotation from @SkylarkSignatureGravatar Damien Martin-Guillerez2016-06-10
| | | | | | | | The @SkylarkCallable annotation is very limited and to extend it it is best to share a similar API than the @SkylarkSignature annotation. -- MOS_MIGRATED_REVID=124473056
* Refactor cycle detection logic to handle dynamic configurations.Gravatar Greg Estren2016-06-09
| | | | | | | | | | | | | | | | | | | | | | | Currently, analysis-time cycle detection expects all cycles to come from ConfiguredTargetFunction. With dynamic configurations, ConfiguredTargetFunction calls out to TransitiveTargetFunction to figure out which configuration fragments its deps need. If there's a cycle between the current target and a dep, the dep's TransitiveTargetFunction fails, which the current cycle detection code can't handle. But even if it could handle it, since the failure occurs in the dep we'd get error messages like: "in cc_library rule //the:dep: cycle in dependency graph" instead of the expected: "in cc_library rule //the:top_level_rule: cycle in dependency graph" This used to not be a problem because loading-phase cycle detection caught the cycle before all this triggered. But interleaved loading and analysis removes that gate. Tested: BuildViewTest cycle detection tests with dynamic configurations turned on -- MOS_MIGRATED_REVID=124391277