aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools
Commit message (Collapse)AuthorAge
* Migrate Java tests to Truth.Gravatar lberki2017-05-30
| | | | | | RELNOTES: None. PiperOrigin-RevId: 157446717
* Experimental UI: Support multiple BuildEventTransportAnnouncedEventsGravatar buchgr2017-05-29
| | | | | | | | We initially didn't consider that multiple BuildEventStreamer instances might exist during a build. RELNOTES: None. PiperOrigin-RevId: 157385069
* Migrate tests to Truth.Gravatar lberki2017-05-29
| | | | | | RELNOTES: None. PiperOrigin-RevId: 157378037
* Migrate tests to Truth.Gravatar lberki2017-05-29
| | | | | | RELNOTES: None. PiperOrigin-RevId: 157374805
* Use FeatureConfiguration to compute value of CC_FLAGS make variableGravatar hlopko2017-05-26
| | | | | | | | | | | | | | | | | | | | | | | | | This cl introduces new action_config type for Crosstool named 'generic'. This can be used to set the value of CC_FLAGS make variable using much more expressive mechanism (action_configs + features) than previous make_variable Crosstool messages. This has been requested by the C++ LPT. However, as FeatureConfiguration needs RuleContext, CC_FLAGS cannot be computed using configuration only anymore. Also, FeatureConfiguration is C++ rules specific class, and Bazel build-base cannot depend on it. Therefore we cannot use FeatureConfiguration for ExtraActions, for example. Because it cannot be made perfect, this cl is not updating all the possible places that expand make variables but limits the scope to: * genrule (the only widely used rule that often expands make variables) * *_test (CC_FLAGS is used by Tensorflow in the 'args' attribute) * cc_rules (people sometimes set 'copts' to something like: "-DCC_STRING=\\\"$(CC)\\\" -DCC_FLAGS_STRING=\"$(CC_FLAGS)\"" The long term plan is to use Skylark C++ API to get C++ command lines, so CC_FLAGS together with this inconsistent solution will be removed. RELNOTES: CC_FLAGS can be defined using 'generic' action_config in CROSSTOOL PiperOrigin-RevId: 157202883
* Make platform providers creatable from Skylark.Gravatar John Cater2017-05-26
| | | | | | | This will allow custom rules to interact more fully with the platform system. Change-Id: I22dd2efab55b1c6e6129b1ba99fb5f0aa9c2d6b2 PiperOrigin-RevId: 157145828
* Remove workspace tree under correct nameGravatar kchodorow2017-05-26
| | | | | | Actual fix for #2819. PiperOrigin-RevId: 157142420
* Use nested sets for configured target runfiles instead of flattened lists.Gravatar Googler2017-05-26
| | | | | RELNOTES: None PiperOrigin-RevId: 157124371
* Migrate tests to Truth.Gravatar lberki2017-05-26
| | | | | RELNOTES: None. PiperOrigin-RevId: 156983366
* Migrate tests to Truth.Gravatar lberki2017-05-26
| | | | | RELNOTES: None. PiperOrigin-RevId: 156979845
* Migrate tests to Truth.Gravatar lberki2017-05-26
| | | | | RELNOTES: None. PiperOrigin-RevId: 156979705
* Migrate tests to Truth.Gravatar lberki2017-05-26
| | | | | RELNOTES: None. PiperOrigin-RevId: 156979038
* Improve error messages for malformed Android SDK/NDK.Gravatar ajmichael2017-05-24
| | | | | | | | | | | | | Currently, if the user has an SDK/NDK that is missing required directories, we print out an InconsistentFileSystemException. This CL will give a better error, indicating which directory is missing (or is not a directory). Implementation is roughly taken from NewLocalRepositoryFunction. Followup to https://github.com/bazelbuild/bazel/issues/2739. RELNOTES: None PiperOrigin-RevId: 156913532
* Actually run DataResourceXmlTest with Bazel.Gravatar ajmichael2017-05-24
| | | | | | | Removes references com.google.common.io.MoreFiles because it is not in //third_party/guava/guava-21.0-20161101.jar which we use for the JDK7 builds. RELNOTES: None PiperOrigin-RevId: 156912922
* 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
* Add a #hashCode() method to WorkspaceStatusAction implementations as is ↵Gravatar lberki2017-05-23
| | | | | | | | | | | advisable when overriding #equals(). Intricacies within Skyframe prevented us from adding this method before, but whatever those were are not a problem anymore. This was empirically proven by making the change, looking at the set of tests that failed when I last tried this, then finding that they don't fail. The reason for the original failures will stay obscured by the mists of time forever. RELNOTES: None. PiperOrigin-RevId: 156835875
* Move the field name out of the FieldInitializerGravatar corysmith2017-05-23
| | | | | RELNOTES: None PiperOrigin-RevId: 156747534
* Loosen java_library.exports and java_import.*Gravatar Stephen Twigg2017-05-22
| | | | | | | | | | | | | | | | | | | | | | | | | java_library.exports and java_import.runtime_deps|exports|deps will now accept any label from a rule that has a JavaProvider declared provider. Note that java_library.deps|runtime_deps already had this feature and this simply extends that privilege. This relies on the fact that both those targets (via JavaCommon) are simply searching for jars via JavaProvider anyway. Added test for passing a custom Skylark rule (that provides a JavaProvider) can successfully be added to the deps, runtime_deps, and exports of java_library, java_import, and java_binary (where appropriate). Added integration tests for java_library.exports|runtime_deps (the basic sandwich already tests deps) and java_import.exports|runtime_deps. Note that custom Skylark rules are still unable to provide or propagate a JavaNativeLibraryProvider, which results from a cc dependency. Also, the deps argument for java_import is somewhat odd. Change-Id: I7b2c19c6b99516ce524e8c82193d0c73e2d66530 PiperOrigin-RevId: 156740729
* Fix aspect processing when same dep appears in 2 attributes.Gravatar kaipi2017-05-22
| | | | | | If a target appeared in 2 different attributes, it is not processed twice, even if different aspects were applied to the different attributes. In that case, only one of the aspects is applied. This commit fixes this by checking which aspects have been applied to the target, instead of checking if the target was already processed. PiperOrigin-RevId: 156738275
* Extract :cc_toolchain as constantGravatar hlopko2017-05-22
| | | | | | | | And while at it cleanup all the calls of CppHelper.getToolchain and CppHelper.getFdoSupport. RELNOTES: None. PiperOrigin-RevId: 156716291
* Create a loadPackages() method that loads multiple packages simultaneously, ↵Gravatar carmi2017-05-22
| | | | | | | | | using multiple threads. The immediate upside is that if multiple packages load the same bzl file, that file will only be read once when using loadPackages(). RELNOTES: None PiperOrigin-RevId: 156621988
* Add operator // for division.Gravatar laurentlb2017-05-22
| | | | | | | | In both Python 2 and Python 3, the operator // is used for int division. With Python 3, operator / is for float division. RELNOTES: None. PiperOrigin-RevId: 156582262
* Remote+BES: Stabilize command line flags.Gravatar buchgr2017-05-22
| | | | | | | | | | | | | | | | | | | | Update the command line flags used by remote execution/caching as well as the build event service (BES). Major changes: - Remote execution/caching and BES share flags for authentication and TLS. - Removed API Key authentication from BES, as it's not being used. - Add TLS support to BES upload. - Add --bes_project_id flag. If set, the value is propagated as part of BES lifecycle events. For reviewers: Start your review at CommonRemoteAndBesOptions, BuildEventServiceOptions and RemoteOptions. The other changes are mostly automatic IDE renames of fields and flag updates in shell script tests. RELNOTES: None. PiperOrigin-RevId: 156553857
* Create new android_host_service_fixture rule.Gravatar ajmichael2017-05-22
| | | | | | | | | | | This rule specifies a host binary that is run as part of an android_instrumentation_test. It merely collects options, support APKs and the runfiles for the host binary and passes them along to the upcoming android_instrumentation_test rule. Note that this CL does _not_ install the rule, so this CL does not make it usable by anyone. Once the other android testing rules are ready, we will install them all. One small step towards https://github.com/bazelbuild/bazel/issues/903. RELNOTES: None PiperOrigin-RevId: 156553198
* Fixes incorrectly-ordered arguments to calls to assertEqualsGravatar Googler2017-05-19
| | | | | | | | | | | | | | | [] This change has been automatically generated by an Error Prone check that detects incorrect argument ordering on calls to assertEquals-style methods. See [] Cleanup change automatically generated by javacflume/refactory Refactoring: third_party/java_src/error_prone/project/core/src/main/java/com/google/errorprone/bugpatterns/argumentselectiondefects:AssertEqualsArgumentOrderChecker_refactoring Tested: TAP --sample for global presubmit queue [] PiperOrigin-RevId: 156539781
* Expose the target map from Package.Gravatar carmi2017-05-19
| | | | | | | | This doesn't really expose new information, because one can iterate over the existing getTargets() and recreate the map. Moreover, the map is immutable, so there's no risk in returning it to the user. RELNOTES: None PiperOrigin-RevId: 156349797
* Add toolchains data to RuleClass and RuleContext.Gravatar John Cater2017-05-19
| | | | | | | | Also expose both sides to Skylark. Part of #2219. Change-Id: I4d749dd9981fe33f75310acb0ec3927cff6f28fe PiperOrigin-RevId: 156340638
* PiperOrigin-RevId: 156331430Gravatar nharmata2017-05-19
|
* Remove the RTxtSymbolEntry in favor of the FieldInitializer class.Gravatar corysmith2017-05-19
| | | | | RELNOTES: None PiperOrigin-RevId: 156321468
* Adds ToolchainConstructor interface and implementations.Gravatar John Cater2017-05-19
| | | | | | | | | | ToolchainConstructor is used to create instances of ToolchainInfo, for toolchain-aware rule sets. Part of #2219. Change-Id: Iae4e519b156910cc28704b3ca5b11e57dd561107 PiperOrigin-RevId: 156303854
* Fix minor hashing bug in config_feature_flag configuration name.Gravatar mstaib2017-05-17
| | | | | | | | | | | | | | | | | Previously, it was possible to have //package:foo : barbaz and //package:foobar : baz hash to the same value, making it very easy for users to cause a hash collision by accident. This adds a zero byte after each string so that the hash will differentiate the two. RELNOTES: None. PiperOrigin-RevId: 156216723
* Fix DownloaderTestSuite so that it works in IPv6-only environments.Gravatar philwo2017-05-17
| | | | | | This works, because: "If the host is null then an InetAddress representing an address of the loopback interface is returned. See RFC 3330 section 2 and RFC 2373 section 2.5.3." (http://download.java.net/jdk7/archive/b123/docs/api/java/net/InetAddress.html#getByName(java.lang.String)) PiperOrigin-RevId: 156188515
* Automated g4 rollback of commit b71e99b1f3746103e5d6802eebc24096b3494959.Gravatar mstaib2017-05-17
| | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Causes crash bug in certain circumstances. *** Original change description *** Implement dynamically configured LIPO builds. Quick overview: - provide a dynamic interface for getting the artifact owner configuration - provide a (dynamic) RuleTransitionFactory LIPO_ON_DEMAND to replace the (static) RuleClass.Configurator LIPO_ON_DEMAND. Eventually we'll remove the rule class configurator interface entirely. This doesn't actually turn dynamic LIPO on. So the direct effect of this change should be a no-op. The flip will come in a followup change. For now, dynamic... PiperOrigin-RevId: 156180015
* Do not access SkylarkProviders anywhere outside of ConfiguredTarget ↵Gravatar dslomov2017-05-16
| | | | | | | | | | | implementation. A first step towards applying the same memory optimizations we do for native provider representation to Skylark providers (declared and legacy). RELNOTES: None. PiperOrigin-RevId: 156111749
* Implement 'provides' for crosstool.Gravatar cpeyser2017-05-15
| | | | PiperOrigin-RevId: 156086443
* Convert locale qualifiers from old Aapt format to correct format before parsingGravatar Googler2017-05-15
| | | | | | | | | | | | | | Aapt used to require resource locale qualifiers with regions of the form 'en_US', rather than the correct Android 'en-rUS'. The resource qualifier processing code used by ResourceFilter cannot handle the (incorrect) Aapt format. However, for backwards compatability, we want to continue supporting the Aapt format. Handle it by using a regex to replace the old format with the correct format when parsing. RELNOTES: none PiperOrigin-RevId: 156072395
* Remove methods from CommandLine, making it a simple argument list interface.Gravatar Googler2017-05-15
| | | | | | | * isShellCommand is now passed directly to SpawnAction * Getting the associated params file action was a test-only thing. We can pull this out of the action graph instead. PiperOrigin-RevId: 156060366
* Remove the strict_proto_deps attribute from the build language.Gravatar Googler2017-05-15
| | | | | RELNOTES: proto_library.strict_proto_deps no longer exists. PiperOrigin-RevId: 155900531
* Do not expand nested sets in resource merging action construction.Gravatar Googler2017-05-15
| | | | PiperOrigin-RevId: 155900259
* BEP: add a JSON transportGravatar Klaus Aehlig2017-05-11
| | | | | | | | | As JSON is a widely supported format, also add a transport writing the build events in JSON format. This will allow more tools to get status reports about builds. Change-Id: I7e5901cc65d927b93c8fc9bcd2d2baa7e707f09e PiperOrigin-RevId: 155750964
* Automated g4 rollback of commit 6879d7ceff0e118fdecb0cabe5134979030b7cb8.Gravatar Googler2017-05-11
| | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Fixes memory issue that caused this CL to be rolled back. *** Original change description *** Automated g4 rollback of commit cbbb423663b154d82e3dfa5e9a56839583987999. *** Reason for rollback *** Need to roll this back as part of http://b/38171368 *** Original change description *** RELNOTES: Effectively remove sysroot from CppConfiguration and allow it to use select statements. PiperOrigin-RevId: 155651879
* New flag --incompatible_bzl_disallow_load_after_statementGravatar laurentlb2017-05-10
| | | | | | | | | This disallows to have any statement in a .bzl file before a load() statement. RELNOTES: load() statements should be called at the top of .bzl files, before any other statement. This convention will be enforced in the future. PiperOrigin-RevId: 155636719
* Automated g4 rollback of commit cbbb423663b154d82e3dfa5e9a56839583987999.Gravatar Googler2017-05-10
| | | | | | | | | | | *** Reason for rollback *** Need to roll this back as part of http://b/38171368 *** Original change description *** RELNOTES: Effectively remove sysroot from CppConfiguration and allow it to use select statements. PiperOrigin-RevId: 155547813
* Introduce an EvaluationProgressReceiver implementation that does nothing.Gravatar nharmata2017-05-10
| | | | | | | | This is useful for dealing with all the existing implementations in the face of interface changes that are irrelevant. RELNOTES: None PiperOrigin-RevId: 155525021
* sandbox: Use the SpawnInputExpander everywhere and delete SpawnHelpers.Gravatar Philipp Wollermann2017-05-09
| | | | | | | | | This unifies our code to use just one standard implementation to get the entire expanded input files for a Spawn, including from Filesets and Runfiles. Change-Id: I1e286508adf0a9aeddf70934b010e6fcc144c4a7 PiperOrigin-RevId: 155497273
* Change FileContentsProxy to use ctime instead of mtimeGravatar ulfjack2017-05-09
| | | | | | | | | This gives us better reliability for detecting file changes; especially in cases where tools intentionally do not update mtime. Fixes #1525. PiperOrigin-RevId: 155490849
* RELNOTES: Effectively remove sysroot from CppConfiguration and allow it to ↵Gravatar Googler2017-05-09
| | | | | | use select statements. PiperOrigin-RevId: 155480011
* Optimize TransitiveInfoMap memory consumption.Gravatar Googler2017-05-09
| | | | | | Instead of using ImmutableMap, we share the keys between all provider maps with an identical key set. PiperOrigin-RevId: 155432135
* Add missing hashCode() methodGravatar cushon2017-05-09
| | | | PiperOrigin-RevId: 155429568
* Handle labels with explicit repositories correctly in objc rules.Gravatar allevato2017-05-09
| | | | | | | | | | | | | | The `structured_resources` path stemming used by `objc_library` and `objc_bundle_library` no longer breaks if one of these rules tries to reference a label with an explicit repository prefix. Previously, using "@foo//bar:baz" in such a rule would fail because the individual files would retain their "external/foo/" prefix but the owner path against which those files were relativized would not have it because of the use of getPackageFragment() instead of getPackageIdentifier().getSourceRoot(). RELNOTES: None. PiperOrigin-RevId: 155409464