aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google
Commit message (Collapse)AuthorAge
* Fix docgen handling of multiple modules with the same nameGravatar cparsons2018-06-27
| | | | | | | | | | If there are multiple modules with the same name: - If only one is marked 'documented', that one takes precedence. - If one is a subclass of the others, the subclass takes precedence. - Otherwise, an exception is thrown. RELNOTES: None. PiperOrigin-RevId: 202359443
* Create a skydoc_test macro for ease of golden-file testing of skydocGravatar cparsons2018-06-27
| | | | | RELNOTES: None. PiperOrigin-RevId: 202339577
* Debug server logging: don't construct expensive debug-level log strings ↵Gravatar brendandouglas2018-06-27
| | | | | | unless necessary. PiperOrigin-RevId: 202317115
* Make DefaultInfo.default_runfiles return all runfiles if the runfiles field ↵Gravatar cparsons2018-06-26
| | | | | | | of DefaultInfo() was used. RELNOTES: None. PiperOrigin-RevId: 202192091
* Initial check-in of skydoc rewrite.Gravatar cparsons2018-06-26
| | | | | | | | | | | | | | This skydoc rewrite uses an actual skylark interpreter with a faked build API (implementing the actual build API that Bazel uses). There's a lot left to do here, this is a barebones start. For example, this does not yet handle: - load() statements - non-global build API elements (e.g. apple_common) - output of any rule information other than attribute names - markdown output format RELNOTES: None. PiperOrigin-RevId: 202187207
* Debug server debug logs: use EventHandler instead of Logger.Gravatar brendandouglas2018-06-26
| | | | | | | | Logger messages aren't printed to the console, they're written to /usr/local/google/tmp, and can be prohibitively large for these debug server logs. Instead I'm going with your original suggestion in https://github.com/bazelbuild/bazel/commit/b74922932b25a71c626b47ea9a9afb7dbc506cec, and selectively suppressing debug events by wrapping the EventHandler on the way in to SkylarkDebugServer. PiperOrigin-RevId: 202166571
* Flatten JavaCompilationAgs into JavaCompilationArgsProviderGravatar cushon2018-06-26
| | | | | | | | | Consolidate the creation of JavaCompilationArgsProviders, and avoid explicit handling of the 'direct' and 'recursive' cases in clients. Also add some higher-level methods to the builder API to support adding dependencies with dep/export/runtime_dep-like semantics. PiperOrigin-RevId: 202166383
* Instead of depending on mutable inputs of upstream CppCompileAction instances,Gravatar shahan2018-06-26
| | | | | | | | | CppCompileAction.discoverInputsStage2 retrieves values of discovered modules from ActionExecutionValue. This addresses a possible a correctness issue. PiperOrigin-RevId: 202162180
* Fix concurrent modification exception while resuming all threads.Gravatar brendandouglas2018-06-26
| | | | PiperOrigin-RevId: 202151257
* Remove support for header preprocessingGravatar hlopko2018-06-26
| | | | | | | This was never used. We thought it will be useful, but it's not. RELNOTES: None. PiperOrigin-RevId: 202143524
* Handle evaluation of statements, not just expressions.Gravatar brendandouglas2018-06-26
| | | | | | | | | | | | | | | Also handle statements in conditional breakpoints. This is more consistent with other common debuggers (e.g. java, python). Calls Parser#parseStatement with local parsing level, so some statement types aren't handled (e.g. load statements), which is broadly consistent with other debuggers. Assignment, augmented assignment, and return statements return a non-None value, and simple expression statements still return the result of evaluating the expression. TAG_CHANGE_OK=This proto has never yet been used TYPE_CHANGE_OK=This proto has never yet been used PiperOrigin-RevId: 202135678
* add helper JUnit TestWrapper class to do some action on test timeoutGravatar Irina Chernushina2018-06-26
| | | | | | | | | | | | add helper JUnit TestWrapper class to do some action on test timeout i.e. we want to dump the current state of the test on timeout before exit for the new junit integration test framework Closes #5436. PiperOrigin-RevId: 202123320
* Add convenience methods to check for flag existence and values in command lines.Gravatar twerth2018-06-26
| | | | | RELNOTES: None PiperOrigin-RevId: 202118168
* create path utils for copying and deleting directories,Gravatar Googler2018-06-26
| | | | | | and for often required operations like creating file and its parent directories PiperOrigin-RevId: 202115025
* remote: enable previously ignored testsGravatar Jakob Buchgraber2018-06-26
| | | | | | | | | | | | | | | the tests had been disabled for flakyness due to timeouts. I think the right solution is remove the individual test timeouts as on a highly loaded machine fine grained timeouts typically don't make much sense. After removing the individual test timeouts no more flakyness was found in 1000 runs. Closes #5465. PiperOrigin-RevId: 202113697
* process runner for junit integration test frameworkGravatar Irina Chernushina2018-06-26
| | | | | | Closes #5435. PiperOrigin-RevId: 202100672
* Go back to handling conditional breakpoints server side.Gravatar brendandouglas2018-06-25
| | | | | | | | I should have left it as it was -- doing it client-side is just too slow. ENUM_VALUE_OK=This proto has never yet been used PiperOrigin-RevId: 201957138
* Make @SkylarkCallable.name mandatory.Gravatar cparsons2018-06-22
| | | | | RELNOTES: None. PiperOrigin-RevId: 201748802
* ToolchainContext directly implements SkylarkValue and SkylarkIndexable.Gravatar John Cater2018-06-22
| | | | | Change-Id: I355b138e143771fd826ab03951df821ea7d58ac5 PiperOrigin-RevId: 201740564
* Remove Label.parseAbsolute(string, boolean). The goal is to get rid of all ↵Gravatar dannark2018-06-22
| | | | | | | label methods that don't explicitly pass a repository mapping. RELNOTES: None PiperOrigin-RevId: 201717665
* Automated rollback of commit 28a999cff60fa5a8c9ca045ab2b202d83a0e0583.Gravatar kaipi2018-06-22
| | | | | | | | | | | | *** Reason for rollback *** see b/109887056 *** Original change description *** Stop objc_proto_library from returning the generated sources. PiperOrigin-RevId: 201709908
* Expose aspect actions from Skylark.Gravatar tomlu2018-06-22
| | | | | | | | | | | Like with providers, consumers get a merged view of all actions from the merged configured target (all other aspects + the base target). I had to rejig the aspect value / configured aspect to be symmetric with rule configured targets. I do not expect significant memory bloat from this. All lists / maps already existed, only extra fields have been added. RELNOTES: Expose aspect actions provider to Skylark. PiperOrigin-RevId: 201697923
* Automated rollback of commit 5a9befc5602e71f7512074c303afbdcff5617cca.Gravatar twerth2018-06-22
| | | | | | | | RELNOTES: None *** Reason for rollback *** PiperOrigin-RevId: 201686843
* Move HashFunction out of FileSystem, and turn it into a class, instead of an ↵Gravatar ccalvarin2018-06-21
| | | | | | | | | enum. Now that we aren't using enum names for the hash functions, we also accept the standard names, such as SHA-256. RELNOTES: None. PiperOrigin-RevId: 201624286
* Audit usages of Label.getRelative and update to Label.getRelativeWithRemappingGravatar dannark2018-06-21
| | | | | RELNOTES: None PiperOrigin-RevId: 201617188
* Remove unused vfs deps.Gravatar dannark2018-06-21
| | | | | RELNOTES: None PiperOrigin-RevId: 201594295
* Remap labels that include a repository name that appear in $(location x).Gravatar dannark2018-06-21
| | | | | RELNOTES: None. PiperOrigin-RevId: 201588988
* Create a method for initializing build API libraries using object instances ↵Gravatar cparsons2018-06-21
| | | | | | | | | instead of object classes. This allows the caller to, for example, initialize the global library before adding it to a global frame. The skylark interpreter will no longer require that global libraries have a zero-arg constructor. RELNOTES: None. PiperOrigin-RevId: 201563608
* Take into account repository mapping when processing labels inside BUILD ↵Gravatar dannark2018-06-21
| | | | | | | | | | | | | | | | | | | | | | | | | files within external repositories. For example: a/BUILD genrule( name = "a", srcs = ["@x//:x.txt"], outs = ["result.txt"], cmd = "echo hello > \$(location result.txt)" ) If the main workspace file references that repository with a rule: local_repository( name = "other_repo", path = "../a", repo_mapping = {"@x" : "@y"} ) Then when a/BUILD is evaluated, the string "@x//:x.txt" will be turned into a Label "@y//:x.txt" RELNOTES: None PiperOrigin-RevId: 201562148
* Migrate DefaultInfo and its provider to skylarkbuildapiGravatar cparsons2018-06-21
| | | | | RELNOTES: None. PiperOrigin-RevId: 201544076
* Skylark debugging protocol: only track paused or stepping threads.Gravatar brendandouglas2018-06-21
| | | | | | | | | | | | | | | | | | | | | | | | - remove blaze-side thread creation/destruction hooks - remove ListThreads, ThreadStarted, ThreadEnded events from protocol - don't track unpaused, not stepping threads in ThreadHandler The threading model didn't provide useful information -- in practice, users never want to list currently-running threads, and the debug client doesn't need to list currently-paused threads, since it receives each ThreadPaused and ThreadContinued event, so its model is always up to date. Not tracking thread creation/destruction greatly simplifies the API, and reduces the blaze-side hooks -- it was also only semi-implemented, as plenty (/most?) skylark threads were never registered. The biggest cost to removing this is lack of nice thread names. In practice, I think the benefits greatly outweigh this cost. If it ever becomes a problem, there are other lighter-weight ways of communicating thread names. TAG_CHANGE_OK=This proto has never yet been used TYPE_CHANGE_OK=This proto has never yet been used PiperOrigin-RevId: 201532462
* Fix NoSuchElementException when BuildEventArtifactUploaderMap has no elements.Gravatar lpino2018-06-21
| | | | | | When there are no uploaders in BuildEventArtifactUploaderMap then we should use the BuildEventArtifactUploader.LOCAL_FILES_UPLOADER as a fallback. Added some unit tests as regression tests for the underlying issue. PiperOrigin-RevId: 201529578
* Extract logic from CROSSTOOL in CrosstoolInfo providerGravatar rosica2018-06-21
| | | | | | | | | CrosstoolInfo carries the necessary information from the CROSSTOOL text proto. Later on, instead from the CROSSTOOL file and the corresponding CToolchain, CrosstoolInfo will be derived from a skylark_crosstool rule implemented in Skylark. Therefore CToolchain involvement in CppConfiguration and CcToolchain creation needs to be eliminated. Work towards issue #5380 RELNOTES: None. PiperOrigin-RevId: 201491207
* Automated rollback of commit 2b015c53c89815472923d8ea0c94640b7db2fa20.Gravatar twerth2018-06-21
| | | | | | RELNOTES[NEW]: Allow @ in package names. PiperOrigin-RevId: 201487916
* Automated rollback of commit 45b308a62f42c2c0bcfe79dcd4046c4025a31059.Gravatar janakr2018-06-20
| | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks Javascript compilation. There's currently no way to iterate over a depset of Artifacts and deduplicate by identical paths in Skylark. This means that actions that want to do something once per Artifact in a depset (add a flag to the command line with the path of the Artifact for instance) will have duplicate entries if there are multiple Artifacts with the same path. This is not a true automated rollback, since I tried to make this as minimal as possible, to avoid merge conflicts and keep some of the benefits of the rolled back CL. In particular, the tests that were changed in the original CL to give artifacts their correct owners did not need to be changed back, since the owners are still correct. Moreover, this effectively contains rollbacks of unknown commit and https://github.com/bazelbuild/bazel/commit/39d6f89644107a8f7c080c4f4aec8527c1a73954, but keeps test coverage from those CLs as well. Comments added to CL thread where not a clean rollback (there are plenty of files not changed at all: ActionArtifactCycleReporter is the main wart, since it can still handle SkyKeys with Artifact as the argument, but Artifact is no longer the argument to any SkyKey). RELNOTES: None *** Original change description *** Make Artifact#equals take the owner into account for derived artifacts. Derived artifacts' owners are important because they are used to determine the artifact's generating action. Source artifacts' owners are not used in this way, so I left them alone. This allows us to get rid of most uses of ArtifactSkyKey. We may be able to delete it entirely in a follow-up. PiperOrigin-RevId: 201464780
* Add a minimum_os_version flag that is platform agnostic.Gravatar Googler2018-06-20
| | | | | | | | | | | | | | This corresponds to the os version in the clang target triple, though clang does have corresponding os_version_min flags for Apple platforms. Currently, Bazel has --XX_minimum_os flags for XX values corresponding to Apple platforms. This flag is the generic version of that (and can and will be set after the Apple split transition, and will eventually be set in the Android split as well) to support various Android API level improvements for native code. PiperOrigin-RevId: 201453961
* Clean up after ↵Gravatar cushon2018-06-20
| | | | | | | | https://github.com/bazelbuild/bazel/commit/2a9e125499c8fadb731420a1a9dfe7adc8f08792 Bazel now supports @bazel_tools//tools/jdk:current_host_java_runtime. PiperOrigin-RevId: 201441513
* Be more generous with user time and sys time bounds in execution statistics ↵Gravatar ruperts2018-06-20
| | | | | | | tests. RELNOTES: None. PiperOrigin-RevId: 201432990
* Remove all uses of RuleDefinitionEnvironment#getLabel, replacing them with ↵Gravatar janakr2018-06-20
| | | | | | | | | | Label.parseAbsoluteUnchecked. Label already interns all labels, so the additional interning being done in every ConfiguredRuleClass.Builder was pointless memory and CPU. Keeping the RuleDefinitionEnvironment around makes things harder to serialize. Done using IntelliJ structural replace and then a super-painful adding of imports to every file that didn't compile (have to learn a better way to do this). PiperOrigin-RevId: 201427027
* Allow structField callables to specify useSkylarkSemantics, useLocation, and ↵Gravatar cparsons2018-06-20
| | | | | | | | | | useEnvironment Unfortunately this doesn't work for all callers, namely NativeInfo objects, as they may have structField callables invoked from contexts that have no environment available. RELNOTES[INC]: Skylark structs (using struct()) may no longer have to_json and to_proto overridden. PiperOrigin-RevId: 201376969
* Migrate Actions provider to skylarkbuildapiGravatar cparsons2018-06-20
| | | | | RELNOTES: None. PiperOrigin-RevId: 201367075
* Don't instrument files generated by cc_proto_library for coverageGravatar Googler2018-06-20
| | | | | RELNOTES=None PiperOrigin-RevId: 201365986
* C++: Re-writes cc_import in Skylark.Gravatar plf2018-06-20
| | | | | | | I will put cc_import.bzl in Bazel in a follow up CL. RELNOTES:none PiperOrigin-RevId: 201332133
* Be more generous with user time and system time bounds for execution ↵Gravatar ruperts2018-06-19
| | | | | | | statistics tests, and increase granularity of the waits. RELNOTES: None. PiperOrigin-RevId: 201254824
* Add new BuildMetrics event to BEP.Gravatar tomlu2018-06-19
| | | | | | | To start we add just a single metric, the number of actions constructed in the current build. RELNOTES: None PiperOrigin-RevId: 201248490
* Be more permissive when dealing with rules which haveGravatar jcater2018-06-19
| | | | | | | ExecutionPlatformConstraintsAllowed set to PER_TARGET and also have an alread-existing exec_compatible_with attribute. PiperOrigin-RevId: 201238805
* Expand the abilities of codecs. Let ImmutableMultimapCodec actually handle ↵Gravatar janakr2018-06-19
| | | | | | | | LinkedHashMultimap as well. Let ImmutableSetRuntimeCodec handle some other sets. We squash these extra types into the same codec because we want them to become immutable anyway, and they can be dealt with easily by the existing codecs. Add some more non-Bazel classes that should be DynamicCodec'ed. Also, when a disallowed value is serialized, throw a SerializationException instead of crashing. This makes it easier to recover in tests. PiperOrigin-RevId: 201237631
* Add --materialize_param_files option.Gravatar tomlu2018-06-19
| | | | | | | | | When set, any action parameter files are written locally upon action execution, even when the action is executed remotely. This is mainly useful for debugging. This option is effectively implied by --subcommands and --verbose_failures, as it is likely that the user is debugging actions when using these flags. RELNOTES: Add --materialize_param_files flag to write parameter files even when actions are executed remotely. PiperOrigin-RevId: 201225566
* Add more logging when executionPlatformConstraintsAllowed is set to PER_TARGETGravatar jcater2018-06-19
| | | | | | but the "exec_compatible_with" attribute is present. PiperOrigin-RevId: 201219412
* Delete switch for nested set serialization. It's fast enough to be on by ↵Gravatar janakr2018-06-19
| | | | | | default. PiperOrigin-RevId: 201218341