aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/BUILD
Commit message (Collapse)AuthorAge
* Splits the iterableMarshaller into runtime codecs.Gravatar shahan2018-03-14
| | | | | | Makes NestedSetCodec into a runtime codec instead of a Marshaller. PiperOrigin-RevId: 189110883
* Allow BazelPackageLoader to load external repositories.Gravatar carmi2018-03-13
| | | | | | | | | Also, disallow BazelPackageLoader from fetching missing external repos. Integration tests for BazelPackageLoader wrt external repos will be left for a follow-up CL. RELNOTES: None. PiperOrigin-RevId: 188967694
* remote/http: support refresh of oauth2 tokens in the remote cache.Gravatar Jakob Buchgraber2018-03-10
| | | | | | Closes #4622. PiperOrigin-RevId: 188595430
* Add an interface to interact with sandboxfs.Gravatar jmmv2018-03-08
| | | | | | | | | | | | | | | | The new SandboxfsProcess interface allows interacting with sandboxfs. There are two implementations: RealSandboxfsProcess, which spawns the sandboxfs binary, and FakeSandboxfsProcess, which mimics what sandboxfs does but using symlinks and is intended for testing purposes only. The RealSandboxfsProcess implementation works but still carries many TODOs. The most "painful" one may be that the test requires manual invocation because we do not yet have an easy way to integrate with sandboxfs. That will be solved later on; for now this is sufficient for initial testing. RELNOTES: None. PiperOrigin-RevId: 188347393
* tests,windows: enable skylarkinterface/processor:*Gravatar Laszlo Csomor2018-03-08
| | | | | | | | | | | | | | Add these tests to the transitive closure of //src:all_windows_tests thus run them on CI. See https://github.com/bazelbuild/bazel/issues/4292 Change-Id: Iae0bd925bdde2921fb0b2d4222b81fcecb28dea3 Closes #4800. Change-Id: Iae0bd925bdde2921fb0b2d4222b81fcecb28dea3 PiperOrigin-RevId: 188324317
* Expose an actions provider on RuleConfiguredTarget instances.Gravatar cparsons2018-03-06
| | | | | | | | | Given a target (for example from a skylark aspect), one will be able to access a list of actions that the target generated using "target.actions". This is without additional memory footprint. Actions themselves are not fully exposed to skylark (and thus there isn't much meaning to gather from them in skylark yet). Access methods will follow soon. RELNOTES: None. PiperOrigin-RevId: 188098079
* Adding async proto or text logging utility class.Gravatar olaola2018-03-06
| | | | | | | WANT_LGTM=buchgr TESTED=unit tests, 500 runs per test RELNOTES: None PiperOrigin-RevId: 188093043
* Automated rollback of commit f43df1e29765f75e02838e4139417e914b3ee812.Gravatar cparsons2018-03-06
| | | | | | | | | | | | | *** Reason for rollback *** Breaks external cc_proto_library. See https://github.com/bazelbuild/bazel/issues/4780 RELNOTES: None. *** Original change description *** Fixing issue with external j2objc protos PiperOrigin-RevId: 188041921
* remote: Add interceptor for logging gRPC calls during remote execution/cachingGravatar Googler2018-03-05
| | | | | | | | | | This provides a io.grpc.ClientInterceptor implementation that can be used to log gRPC call information. The interceptor can select a logging handler to use based on the gRPC method being called (Watch, Execute, Write, etc) to build a LogEntry, which can then be logged after the call has finished. Unit tests for the interceptor are included. In this change, the interceptor is never invoked, nor are there any handlers implemented for any gRPC methods. The interceptor also never tries to log any entries. To avoid circular dependency issues (Remote library will depend on logger which depends on remote library for utils), I've factored out the utility classes from the remote library into their own directory/package as part of this change. PiperOrigin-RevId: 187926516
* BEP: Add a --build_event_publish_all_actions flag to allow all actions to be ↵Gravatar ruperts2018-03-02
| | | | | | | published via the BEP, instead of only publishing failed actions and extra actions. RELNOTES: Add a --build_event_publish_all_actions flag to allow all actions to be published via the BEP. PiperOrigin-RevId: 187683799
* Fixing issue with external j2objc protosGravatar Mike Lewis2018-03-01
| | | | | | | | | | | | | | | | | | | | | | | The output files are created without a repository, but the expected filenames have them This resolves issues when having a proto_library from an external build file. This seems to be a regression, so maybe should go into the 0.8.0 branch? Note: Work at Square and we have a signed CLA with google Note, without this fix we get errors like ``` ERROR: /private/var/tmp/_bazel_lewis/4a25cfc2b9b758043413ac58525ef6b4/external/AllProtos/BUILD.bazel:27:1: output 'external/AllProtos/squareup/objc/objc.j2objc.pb.m' was not created ERROR: /private/var/tmp/_bazel_lewis/4a25cfc2b9b758043413ac58525ef6b4/external/AllProtos/BUILD.bazel:27:1: output 'external/AllProtos/squareup/objc/objc.j2objc.pb.h' was not created ``` Closes #4058. PiperOrigin-RevId: 187480864
* Add functionality to MemoryProfiler to do multiple garbage collections at ↵Gravatar janakr2018-02-28
| | | | | | the end of the build in an effort to get an accurate measurement of used memory. PiperOrigin-RevId: 187337487
* Move gRPC server to its own java_library to sever a dependency path between ↵Gravatar carmi2018-02-26
| | | | | | | :packages and checked-in gRPC jars. RELNOTES: None PiperOrigin-RevId: 187088590
* Apply @AutoCodec to ExecutableSymlinkAction and SymlinkAction.Gravatar mjhalupka2018-02-23
| | | | | | | AbstractAction had getPrimaryInput() and getPrimaryOutput() which is why arguments are renamed. PiperOrigin-RevId: 186795064
* Serialize MiddlemanAction and add strategy=Strategy.Polymorphic for Action andGravatar mjhalupka2018-02-20
| | | | | | AbstractAction. PiperOrigin-RevId: 186316435
* Move CommandLine, CommandLineItem, and ParamFileInfo from ↵Gravatar tomlu2018-02-15
| | | | | | | | | lib.analysis.actions -> lib.actions. These are fundamental types that want to sit alongside types like Spawn. RELNOTES: None PiperOrigin-RevId: 185887971
* Fix incorrect warning on negative test lang filter flags.Gravatar janakr2018-02-14
| | | | PiperOrigin-RevId: 185770217
* Replaces InjectingObjectCodec with dependencies threaded through ↵Gravatar shahan2018-02-13
| | | | | | (Des|S)erializationContext. PiperOrigin-RevId: 185547740
* Create a basic annotation processor for validating SkylarkCallable uses at ↵Gravatar cparsons2018-02-12
| | | | | | | compile time. RELNOTES: None. PiperOrigin-RevId: 185432867
* Replace path implementation.Gravatar tomlu2018-02-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Path and PathFragment have been replaced with String-based implementations. They are pretty similar, but each method is dissimilar enough that I did not feel sharing code was appropriate. A summary of changes: PATH ==== * Subsumes LocalPath (deleted, its tests repurposed) * Use a simple string to back Path * Path instances are no longer interned; Reference equality will no longer work * Always normalized (same as before) * Some operations will now be slower, like instance compares (which were previously just a reference check) * Multiple identical paths will now consume more memory since they are not interned PATH FRAGMENT ============= * Use a simple string to back PathFragment * No more segment arrays with interned strings * Always normalized * Remove isNormalized * Replace some isNormalizied uses with containsUpLevelReferences() to check if path fragments try to escape their scope * To check if user input is normalized, supply static methods on PathFragment to validate the string before constructing a PathFragment * Because PathFragments are always normalized, we have to replace checks for literal "." from PathFragment#getPathString to PathFragment#getSafePathString. The latter returns "." for the empty string. * The previous implementation supported efficient segment semantics (segment count, iterating over segments). This is now expensive since we do longer have a segment array. ARTIFACT ======== * Remove Path instance. It is instead dynamically constructed on request. This is necessary to avoid this CL becoming a memory regression. RELNOTES: None PiperOrigin-RevId: 185062932
* Add a CODEC for Artifact.Gravatar cpeyser2018-02-01
| | | | PiperOrigin-RevId: 184144301
* Add neverlink support to java_common.compile.Gravatar elenairina2018-01-31
| | | | | | | Fixes #3735. RELNOTES: java_common.compile supports neverlink PiperOrigin-RevId: 184017410
* remote: Rewrite the HTTP caching client in Netty. Fixes #4481Gravatar buchgr2018-01-26
| | | | | | | | | | | | | | * This puts in the foundation of HTTP/2 support for remote caching. * Allows us to remove the Apache HTTP library as a dependency, reducing the Bazel binary size by 1MiB. On fast networks (i.e. GCE to GCS) we can see a >2x speed improvement for TLS throughput. Even from my workstation to GCS I get significant build time improvements when using Netty's TLS 18s vs 12s. Closes #4481. PiperOrigin-RevId: 183411787
* Add CommandLineItem interface.Gravatar tomlu2018-01-25
| | | | | | | | This interface makes it clearer in the type system exactly how items that go into a CustomCommandLine are turned into strings. It is a preparatory change to allow command line fingerprints to be more cheaply calculated, but it is valuable in itself from a code quality standpoint. PiperOrigin-RevId: 183274022
* Adds codecs for types in test classes, ConfigSettingTest, LateBoundSplitUtil ↵Gravatar shahan2018-01-23
| | | | | | | | and fixes codec in RunUnderConverter. PiperOrigin-RevId: 183003383
* vfs_test: mark as flakyGravatar laszlocsomor2018-01-18
| | | | | | | | | | | | | | | | | | | Before commit f47291ee3 [1], FileSystemConcurrencyTest was part of "foundations_test" which was marked as flaky. After the change, this test is part of "vfs_test" which is not marked as flaky. Looking at the test code [2] it's clearly flaky, so the modification is appropriate. [1] https://github.com/bazelbuild/bazel/commit/f47291ee35e01ebd58951e81b3e65be3243a5f13 [2] https://github.com/bazelbuild/bazel/blob/6f502ac12180973f4646c95d95e1516082b3c71c/src/test/java/com/google/devtools/build/lib/vfs/FileSystemConcurrencyTest.java#L46 RELNOTES: none PiperOrigin-RevId: 182352485
* Introduce Root class.Gravatar tomlu2018-01-17
| | | | | | | | | | | This class represents a root (such as a package path or an output root) used for file lookups and artifacts. It is meant to be as opaque as possible in order to hide the user's environment from sky keys and sky functions. Roots are used by RootedPaths and ArtifactRoots. This CL attempts to make the minimum number of modifications necessary to change RootedPath and ArtifactRoot to use these fields. Deprecated methods and invasive accessors are permitted to minimise the risk of any observable changes. RELNOTES: None PiperOrigin-RevId: 182271759
* Actually run ExternalPackageUtilTest.Gravatar John Cater2018-01-17
| | | | | | | Fixes #4443. Change-Id: I8a30823eff87457e3ef2568efbe667f29c644ed4 PiperOrigin-RevId: 182208767
* Codec for Location.Gravatar shahan2018-01-16
| | | | | | * Moves SingletonCodec to third_party. PiperOrigin-RevId: 182143153
* windows,tests: enable some tests on WindowsGravatar Laszlo Csomor2018-01-15
| | | | | | | | | | | | Add ":windows_tests" and ":all_windows_tests" rules to these packages, and include them in the parent packages. Fixes https://github.com/bazelbuild/bazel/issues/4127 See https://github.com/bazelbuild/bazel/issues/4292 Change-Id: I9c454ed21f47feb8e88e1c25b1e4fa216baa38f6 PiperOrigin-RevId: 181951525
* windows,tests: enable some foundation testsGravatar Laszlo Csomor2018-01-15
| | | | | | | | | | | | | | | Split //src/test/j/c/g/d/b/lib:foundations_test into smaller tests, and enable many of them on Windows. Some tests are still tagged as "no_windows", either because they depend on ":unix", or because we need to fix them to pass on Windows. See https://github.com/bazelbuild/bazel/issues/4292 Change-Id: Ibfab568a9e7b939c40f1301c9cfe06e60302755c PiperOrigin-RevId: 181936880
* Clean up Windows config_settingsGravatar Yun Peng2018-01-12
| | | | | | | | | | | | | | 1.Deleted config_setting for --cpu=x64_windows_msys, because we don't build Bazel with MSYS gcc anymore. 2.Deleted config_setting for --cpu=x64_windows_msvc, because it uses exactly the same toolchain as --cpu=x64_windows, it'll be removed in the future. This change reduces the complexity of our BUILD files and make them less confusing. Change-Id: I939831a6861413b0f745fb1be98aacd4fb780e0a PiperOrigin-RevId: 181751853
* Codec for BuildConfigurationValue.Gravatar shahan2018-01-10
| | | | PiperOrigin-RevId: 181545835
* Use an annotation preprocessor to validate SkylarkConfigurationField.Gravatar cparsons2018-01-10
| | | | | | | | This is a rollforward -- the previous attempt was rolled back due to incorrectly adding test sources. In addition, the newly checked in tests do not work on Windows, and are thus disabled on the Windows platform. I suspect this is due to a bug in the compile-testing library. RELNOTES: None. PiperOrigin-RevId: 181482589
* Make lib/shell test targets more consistent.Gravatar ruperts2018-01-04
| | | | | RELNOTES: None. PiperOrigin-RevId: 180826643
* Add android_local_test rule to Bazel.Gravatar dannark2017-12-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This rule enables testing android_librarys locally in the jvm (as opposed to on a device). To use this rule with robolectric (robolectric.org), add the following to your WORKSPACE file: http_archive( name = "bazel_android", url = "...", ) load("@bazel_android//:setup_robolectric.bzl", "setup_robolectric") setup_robolectric() and then an android_local_test rule would need to add: "@bazel_android//:robolectric", to its dependencies. android_local_test( name = "MyTest", srcs = ["MyTest.java"], deps = [ "//java/app:lib", "@bazel_android//:robolectric", ], ) RELNOTES[NEW]: New android test rule, android_local_test. PiperOrigin-RevId: 180438995
* Consolidate instances of the --loading_phase_threads flag.Gravatar juliexxia2017-12-21
| | | | | RELNOTES: None. PiperOrigin-RevId: 179838936
* Add CommandUsingLinuxSandboxtTest, to test execution statistics for Commands ↵Gravatar ruperts2017-12-20
| | | | | | | that use the linux-sandbox tool, irrespective of which SpawnRunner they use. RELNOTES: None. PiperOrigin-RevId: 179716067
* Consolidate instances of the --keep_going flag.Gravatar juliexxia2017-12-18
| | | | | RELNOTES: None. PiperOrigin-RevId: 179468685
* Don't suggest using bazel clean --async when it's unsupportedGravatar Akira Baruah2017-12-15
| | | | | | | Fixes #4176 (https://github.com/bazelbuild/bazel/issues/4176). Closes #4236. PiperOrigin-RevId: 179218605
* Enable local action execution statistics collection when the ↵Gravatar ruperts2017-12-12
| | | | | | | | | | | LocalSpawnRunner uses the process-wrapper to run commands. In particular, record metrics for user and system CPU execution time, block I/O and involuntary context switches. This feature is guarded behind a new option, --experimental_collect_local_action_metrics. RELNOTES: None. PiperOrigin-RevId: 178856077
* Add a new file path type, LocalPath.Gravatar tomlu2017-12-12
| | | | | | | | This path type is a local file path as a wrapper around a string. It works much the same as java.io.File, but without its file operations. For the most part, FilePath shouldn't add much overhead compared to using plain strings. Strings do get normalised on the way in, but no extra objects are allocated unless the path actually needs normalisation. PiperOrigin-RevId: 178798497
* If a temporary directory name clashes in the LocalSpawnRunner, try ↵Gravatar ruperts2017-12-06
| | | | | | | generating another temporary directory name instead of throwing an exception. RELNOTES: None. PiperOrigin-RevId: 178190769
* Fix some broken targets and failing tests.Gravatar ajmichael2017-12-06
| | | | | RELNOTES: None PiperOrigin-RevId: 178099410
* Move BazelRuleClassProvider.CORE_WORKSPACE_RULES to its own class in the ↵Gravatar lpino2017-12-06
| | | | | | rules/repository package. PiperOrigin-RevId: 178087895
* Make ProcessWrapperUtil aware of the execution statistics file, and add new ↵Gravatar ruperts2017-12-05
| | | | | | | ExecutionStatisticsProvider. RELNOTES: None. PiperOrigin-RevId: 178056182
* Added execution platform to the ActionExecutionMetadata.Gravatar John Cater2017-12-04
| | | | | | | Part of #4128. Change-Id: Id822d3ae6f8daf7c92a75bd8bd28590d4f625845 PiperOrigin-RevId: 177905460
* Move bazel conditions into src/conditions.Gravatar tomlu2017-11-30
| | | | | | | This will enable an easier transition from checked-in BUILD files to ones generated by copybara. RELNOTES: None PiperOrigin-RevId: 177514519
* Refactor the FileSystem API to allow for different hash functions.Gravatar buchgr2017-11-30
| | | | | | | | | | | | | Refactor the FileSystem class to include the hash function as an instance field. This allows us to have a different hash function per FileSystem and removes technical debt, as currently that's somewhat accomplished by a horrible hack that has a static method to set the hash function for all FileSystem instances. The FileSystem's default hash function remains MD5. RELNOTES: None PiperOrigin-RevId: 177479772
* Move BazelRuleClassProvider.CONFIG_RULES to its own class in the config package.Gravatar lpino2017-11-30
| | | | PiperOrigin-RevId: 177447905