aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test
Commit message (Collapse)AuthorAge
* Create new config module that is responsible for creating BuildSetting ↵Gravatar juliexxia2018-08-14
| | | | | | | | | | descriptor objects. Build settings are units of configuration i.e. a key/value pair of a setting (e.g. cpu) and a value (e.g. ppc). A build setting descriptor is used to describe what kind of build setting a skylark rule is (if any at all). The BuildSettingDescriptor implementation of the API describes two facets of the build setting rule: the type of the value and whether or not the setting is settable on the command line. The methods exposed here will eventually be hooked up to a new parameter in the <code> rule() </code> function. Validation for these restrictions will also happen in a later CL attached to the same bug. PiperOrigin-RevId: 208669663
* test-wrapper: add empty impl + Bazel flagGravatar Laszlo Csomor2018-08-14
| | | | | | | | | | | | | | | | | | | | | | | This commit adds: - the skeleton implementation of the Windows native test wrapper - a depenency on the native test wrapper from test rules, through the new $test_wrapper rule attribute - the --windows_native_test_wrapper Bazel flag, which is currently a no-op See https://github.com/bazelbuild/bazel/issues/5508 Change-Id: I8df95c8ce8bab53c51c257698ec95416065a836e Closes #5854. Change-Id: I2ffc78bceec5dd867af775b5878f105fa87c3dba PiperOrigin-RevId: 208650699
* Windows,tests: port nonincremental_builds_testGravatar Laszlo Csomor2018-08-14
| | | | | | | | | | | | | | //src/test/shell/integration:nonincremental_builds_test now runs on Windows. See https://github.com/bazelbuild/bazel/issues/4292 Change-Id: I06fcc0ca713cbc65c677f23dee4171b9be4d7b11 Closes #5884. Change-Id: I06fcc0ca713cbc65c677f23dee4171b9be4d7b11 PiperOrigin-RevId: 208646495
* Add experimental option to do add local cpu usage values to the JSON profile.Gravatar twerth2018-08-14
| | | | | RELNOTES: None PiperOrigin-RevId: 208646319
* Windows,tests: port skylark_flag_testGravatar Laszlo Csomor2018-08-14
| | | | | | | | | | | | | | //src/test/shell/integration:skylark_flag_test now runs on Windows. See https://github.com/bazelbuild/bazel/issues/4292 Change-Id: Ib698ddcfb2106fe4b9830da9b969e51271e91f58 Closes #5871. Change-Id: I382c01d4dd8d9ee030dc8fe190a50bd7a57f8ee4 PiperOrigin-RevId: 208606660
* Windows,tests: port incomp._changes_conflict_testGravatar Laszlo Csomor2018-08-14
| | | | | | | | | | | | | | //src/test/shell/integration:incompatible_changes_conflict_test now runs on Windows. See https://github.com/bazelbuild/bazel/issues/4292 Change-Id: I9f599b3ac8e85f394320989a71c00547b493efca Closes #5870. Change-Id: I7fa6db3df8d5d06ac2849d538ed6d84030cb1069 PiperOrigin-RevId: 208604220
* Add exports attribute to proto_library.Gravatar twerth2018-08-14
| | | | | | | Note that it is currently only used by the java_proto_library family of rules (if enabled per flag). RELNOTES: None PiperOrigin-RevId: 208601730
* Order Skyframe evaluations in a priority queue, with all children of a given ↵Gravatar janakr2018-08-13
| | | | | | | | node having the same priority, later enqueueings having higher priority, re-enqueued nodes having highest priority, and new root nodes having lowest priority. Experimentally, this can save significant RAM (1.4G in some builds!) while not affecting speed. Also do a semi-drive-by deleting ExecutorFactory parameter to AbstractQueueVisitor, since it was always AbstractQueueVisitor.EXECUTOR_FACTORY. PiperOrigin-RevId: 208560889
* Fix MultisetSemaphore.Gravatar nharmata2018-08-13
| | | | | | | | | We use a fixed version of the previous algorithm. See the comments for details. Fancier algorithms exist. I thought of a cool one that makes use of BatchKeyedLocker (would give me an excuse to revive it, heh), but fancy algorithms would be overkill. As noted in the initial commit of NaiveMultisetSemaphore, performance isn't critical. RELNOTES: None PiperOrigin-RevId: 208560559
* Add easy access to MessageDigests in DigestHashFunctionGravatar ccalvarin2018-08-13
| | | | | | | Move the message-digest cloning to DigestHashFunction and out of Fingerprint, to make it possible to configure Fingerprint to use different hash functions. We keep the default MD5 for now, we'd like it to use the global default but want to isolate the configuration change from any change adding potential contention. RELNOTES: None. PiperOrigin-RevId: 208502993
* Windows,tests: port cpp_testGravatar Laszlo Csomor2018-08-13
| | | | | | | | | | | | | | //src/test/shell/integration:cpp_test now runs on Windows. See https://github.com/bazelbuild/bazel/issues/4292 Change-Id: I7dd4ce2b5702e5853ee357ab4f2a728af7d3018d Closes #5874. Change-Id: I7dd4ce2b5702e5853ee357ab4f2a728af7d3018d PiperOrigin-RevId: 208484274
* Windows,tests: port rc_options_testGravatar Laszlo Csomor2018-08-13
| | | | | | | | | | | | | | //src/test/shell/integration:rc_options_test now runs on Windows. See https://github.com/bazelbuild/bazel/issues/4292 Change-Id: I1fe42e1477e9ebfb94ccfb896de4af5a72e3bb61 Closes #5873. Change-Id: I1fe42e1477e9ebfb94ccfb896de4af5a72e3bb61 PiperOrigin-RevId: 208479907
* Windows,tests: port ui_testGravatar Laszlo Csomor2018-08-13
| | | | | | | | | | | | | | //src/test/shell/integration:ui_test now runs on Windows. See https://github.com/bazelbuild/bazel/issues/4292 Change-Id: I6667e55f26b9f87437234ba949a521760cfaaa18 Closes #5872. Change-Id: I6667e55f26b9f87437234ba949a521760cfaaa18 PiperOrigin-RevId: 208476786
* bazel sync: add a test verifying following branchesGravatar Klaus Aehlig2018-08-13
| | | | | | | | | Add a test verifying that bazel sync can be used to follow a branch of an upstream git repository. As this is a standard use case for bazel sync, we better verify it works properly. Change-Id: Ia08686376e6c7a89e7f1c130129b46764e43918b PiperOrigin-RevId: 208464247
* Add new class to create cpu usage time series.Gravatar twerth2018-08-13
| | | | | RELNOTES: None PiperOrigin-RevId: 208462186
* bazel: handle proto_src_root when dealing with proto includes, generated ↵Gravatar Googler2018-08-13
| | | | | | | | | | files and C++ headers This change completes the handling of proto_src_root when it comes to inclusion of protos, generating the proto files in the right place and adding the generated headers to the include paths. WANT_LGTM=elenairina RELNOTES: None. PiperOrigin-RevId: 208457740
* Windows,tests: port configured_query_testGravatar Laszlo Csomor2018-08-13
| | | | | | | | | | | | | | //src/test/shell/integration:configured_query_test now runs on Windows. See https://github.com/bazelbuild/bazel/issues/4292 Change-Id: I51990b2b1d675dabb4d9e82bbaf6c8c0f26c4baf Closes #5845. Change-Id: I51990b2b1d675dabb4d9e82bbaf6c8c0f26c4baf PiperOrigin-RevId: 208438117
* Refactoring of SkyFunctionEnvironment to iterate over events/postables only ↵Gravatar janakr2018-08-10
| | | | | | | | | | | | when they're actually being put into a committed value. The previous behavior submitted deps' events twice, when the dep was added and when the node finished building. The intention is to build on this refactoring to cut off events/postables across the analysis-execution boundary, so that actions are not carrying around nested sets of warnings coming from their configured targets. This will be safe because to execute an action, we must already have analyzed its configured target, so the warning would have been emitted there. As can be seen from the changed test, this is not a pure behavior no-op. We will now emit cached events slightly later, on value committal, rather than on first dep declaration. This should not be an issue: since the events are cached, the user must have already seen them on a prior build, so the delay should not be important. Inversely, we now report events slightly more quickly during bubbling up, since we report them at each stage, as opposed to just at ParallelEvaluator evaluation completion. PiperOrigin-RevId: 208316502
* Add Android aapt and aapt2 integration testsGravatar Jingwen Chen2018-08-10
| | | | | | Closes #5770. PiperOrigin-RevId: 208269268
* PiperOrigin-RevId: 208245798Gravatar mjhalupka2018-08-10
|
* Do not crash when attempting to upload a tree artifact.Gravatar tomlu2018-08-10
| | | | | | | These show up as directories. Filter these out and return null from the path converter, which should cause omission of those files from any build events. RELNOTES: None PiperOrigin-RevId: 208244910
* Add more detailed reporting of the differences between startup options.Gravatar skainswo2018-08-10
| | | | | | | This changes the logging logic slightly to support diffing startup options between different runs that have different numbers of args. RELNOTES: Add more detailed reporting of the differences between startup options. PiperOrigin-RevId: 208239665
* Automated rollback of commit 9374ecf94ce44e8bc56e68678cb512abf4cf9ce2.Gravatar felly2018-08-10
| | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Rollforward with deduplication of traversals and regression test. RELNOTES: None *** Original change description *** Automated rollback of commit 39974a43abdd32e3a1acbc7da945b08da9983e4e. *** Reason for rollback *** b/112458627 *** Original change description *** Allow skyframe-aware actions to pass partial results through ActionExecutionContext. Remove FilesetProvider. PiperOrigin-RevId: 208231719
* Combine prefix event and payload stdout/stderrGravatar Klaus Aehlig2018-08-10
| | | | | | | | | ...in a single event instead of relying on the synchronisation on the reporter. In this way, it will be possible to focus on output of errors, and also to deduplicate warnings. Change-Id: I9669e8497ca6e22a01f3e285ec9ee42c1ecf3fb5 PiperOrigin-RevId: 208223882
* Persist mappings from original command line patterns to expanded labels in ↵Gravatar Googler2018-08-10
| | | | | | TargetParsingCompleteEvent. PiperOrigin-RevId: 208217102
* Automated rollback of commit 39974a43abdd32e3a1acbc7da945b08da9983e4e.Gravatar felly2018-08-10
| | | | | | | | | | | | | *** Reason for rollback *** b/112458627 *** Original change description *** Allow skyframe-aware actions to pass partial results through ActionExecutionContext. Remove FilesetProvider. PiperOrigin-RevId: 208213955
* Test our expectations around --server_javabase/--host_javabase/--javabase ↵Gravatar Tobias Werth2018-08-10
| | | | | | | | with an integration test. Closes #5848. PiperOrigin-RevId: 208203634
* Do not hardcode LCOV pathGravatar Vladimir Zaytsev2018-08-10
| | | | | | | | fixes #5644 Closes #5646. PiperOrigin-RevId: 208175002
* Introduce a retriever for logging handler properties.Gravatar arostovtsev2018-08-10
| | | | | | | | | | | We want a way for Bazel to find a logging handler's current log file without direct dependencies on the exact handler class. We do this with an abstract parent class whose concrete child class (to be used as a singleton) will be given in startup_options, i.e. in the same place as the server logging configuration. RELNOTES: None. PiperOrigin-RevId: 208171084
* Batch all DependencyResolver#getTarget calls. This leads to some duplicate ↵Gravatar janakr2018-08-09
| | | | | | iteration, but that should be cheap, while requesting packages sequentially can hurt... PiperOrigin-RevId: 208126130
* Allow skyframe-aware actions to pass partial results through ↵Gravatar felly2018-08-09
| | | | | | | | ActionExecutionContext. Remove FilesetProvider. PiperOrigin-RevId: 208111251
* Add test case showing off existing deadlock bug. There's no deterministic & ↵Gravatar nharmata2018-08-09
| | | | | | | | | | perfect way to expose the bug without e.g. adding hooks inside the implementation, but the test case I added seems to fail very consistently. RELNOTES: None PiperOrigin-RevId: 208060959
* Support a .bazelignore fileGravatar Klaus Aehlig2018-08-09
| | | | | | | | | | | | | | | | | | | Add suport for a file .bazelignore, allowing to specify directories that should be ignored. So far, even for the "ignored" directories, the directory structure, including following symlinks, still has to be well founded. We plan to lift that restriction in the future, but already with the restriction, it is an improvement over the status quo. RELNOTES: bazel now supports a .bazelignore file specifying directories to be ignored; however, these directories still have to be well founded and, in particular, may not contain symlink cycles. Improves on #4888. Change-Id: Icfe0b7f5c35eceea16e28944ca7711431b71271a PiperOrigin-RevId: 208050372
* Windows,tests: port aquery_testGravatar Laszlo Csomor2018-08-09
| | | | | | | | | | | | | | //src/test/shell/integration:aquery_test now runs on Windows. See https://github.com/bazelbuild/bazel/issues/4292 Change-Id: If2eb13ef03b9cfde0d0d61c163ef8ac3c6004877 Closes #5846. Change-Id: If2eb13ef03b9cfde0d0d61c163ef8ac3c6004877 PiperOrigin-RevId: 208048005
* query test: fix symlink creationGravatar Laszlo Csomor2018-08-09
| | | | | | | | | | | | | | Symlink targets are now absolute. Previously they were relative, not to the symlink (as they should have been) but to the workspace, so the symlinks were in fact dangling. Change-Id: I06e503168318bc76f0fa847d8f0937311deb9b81 Closes #5837. Change-Id: I06e503168318bc76f0fa847d8f0937311deb9b81 PiperOrigin-RevId: 208043735
* Windows,tests: port bazel_testjobs_testGravatar Laszlo Csomor2018-08-09
| | | | | | | | | | | | | | //src/test/shell/integration:bazel_testjobs_test now runs on Windows. See https://github.com/bazelbuild/bazel/issues/4292 Change-Id: Ia12a01f27ee8bd5a00aead546bcaf483fc4d72a3 Closes #5835. Change-Id: I6e9af9da9221a4d4d553e8ad066b607a54c5c907 PiperOrigin-RevId: 208034351
* Windows,tests: port output_filter_testGravatar Laszlo Csomor2018-08-09
| | | | | | | | | | | | | | | | | | | | //src/test/shell/integration:output_filter_test now runs on Windows. Also remove the "bazel clean" calls that are meant to trigger recompilations, and instead achieve the same effect by updating the mock source files. This saves about 12 seconds of test's runtime on Windows. See https://github.com/bazelbuild/bazel/issues/4292 Change-Id: Id3a6854fe6715893b43d4a06e07b7e70524059f9 Closes #5754. Change-Id: I9d9d23f4ccb0471fab4ae7cc45f2857c170546a4 PiperOrigin-RevId: 208016336
* Java: add @bazel_tools//tools/java/runfilesGravatar Laszlo Csomor2018-08-09
| | | | | | | | | | | See https://github.com/bazelbuild/bazel/issues/5803 Change-Id: I49a2e744af667d34aedc3384629acd48641b0921 Closes #5804. Change-Id: I75f85f02384fd1d9f6ebac5fff7c96c7278f7cdd PiperOrigin-RevId: 208010815
* In AbstractSkyFunctionEnvironment, don't check for filtered exceptions in ↵Gravatar janakr2018-08-08
| | | | | | the common case of no exceptions. We were already mostly tracking missing dependencies in the subclasses, so there's no need to check for missing dependencies here. PiperOrigin-RevId: 207934220
* Improve error messaging for constraints violations.Gravatar gregce2018-08-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) Break up dense lines with clearer pretty-printing. 2) When a violation happens because of a select(), mention both the target with the select (as before) *and* the dep that the select() chose. 3) Integrate this messaging into --target_environment violations, which currently provide no info about the root cause. Examples: ------------------------------------- select() + compatible_with violation: ------------------------------------- Before: ERROR: /workspace/testapp/BUILD:41:1: in cc_binary rule //testapp:top: the current command-line flags disqualify all supported environments because of incompatible select() paths: environment: //constraints:p removed by: //testapp:midlib (/workspace/testapp/BUILD:28:1) After: ERROR: /workspace/testapp/BUILD:41:1: in cc_binary rule //testapp:top: the current command line flags disqualify all supported environments because of incompatible select() paths: environment: //constraints:p removed by: //testapp:midlib (/workspace/testapp/BUILD:28:1) which has a select() that chooses dep: //testapp:glib which lacks: //constraints:p. ------------------------------------- select() + --target_environment=//constraints:p violation: ------------------------------------- Before: ERROR: This is a restricted-environment build. - //testapp:top does not support required environment //constraints:p After: ERROR: This is a restricted-environment build. //testapp:top does not support: environment: //constraints:p removed by: //testapp:midlib (/workspace/testapp/BUILD:28:1) which has a select() that chooses dep: //testapp:g which lacks: //constraints:p Fixes: #5795 PiperOrigin-RevId: 207910308
* Re-enable BytecodeTypeInferenceTestGravatar cushon2018-08-08
| | | | | | Bazel's ASM was updated in 3a711882dcbb3af8709844bde501ac6fca44ea7d. PiperOrigin-RevId: 207909203
* Don't convert InterruptException to EvalException in struct field call ↵Gravatar Benjamin Peterson2018-08-08
| | | | | | | | | | | expressions. This is probably only a theoretical problem, since a blocking struct field is probably a very bad idea. Closes #5132. Change-Id: Ie84a78ab4d9ce215f2806ac49bf8911de6959930 PiperOrigin-RevId: 207902766
* Remove ValidatedAndroidData interfaceGravatar asteinb2018-08-08
| | | | | | | | Now that ValidatedAndroidResources is the only implementation, we can just use that instead. RELNOTES: none PiperOrigin-RevId: 207900844
* Remove support for explicitly setting java_toolchain.encoding to UTF-8Gravatar cushon2018-08-08
| | | | PiperOrigin-RevId: 207891979
* Remove ResourceContainerGravatar asteinb2018-08-08
| | | | | | | | | ValidatedAndroidResources is now the only implementation of ValidatedAndroidData, so we can also clean up some code. (The actual interface will be cleaned up in the next few changes.) RELNOTES: none PiperOrigin-RevId: 207891778
* Improve NaiveMultisetSemaphore#estimateCurrentNumUniqueValues by having it ↵Gravatar nharmata2018-08-08
| | | | | | | use Semaphore#availablePermits. I have no idea why I didn't do this initially. RELNOTES: None PiperOrigin-RevId: 207883650
* Automatic code cleanup.Gravatar Googler2018-08-08
| | | | PiperOrigin-RevId: 207882126
* Remove non-static ApplicationManifest methodsGravatar asteinb2018-08-08
| | | | | | | | | | | | | | | | Remove all state from the ApplicationManifest class. Actual methods in this class will be migrated to somewhere more appropriate in upcoming changes. We now usually use the manifest passed around in the ResourceApk object instead. (The exception is mobile-install, which still wants to use the raw manifest.) Note that this manifest is the processed manifest output by resource processing - using it will somewhat decrease parallelisim, but is also more correct. (We'll get the parallelisim gains back once we now longer use the legacy manifest merger and don't need to process the manifest in resource processing.) RELNOTES: none PiperOrigin-RevId: 207881830
* Windows,tests: run //s/t/shell/integration:* testsGravatar Laszlo Csomor2018-08-08
| | | | | | | | | | | | | | Enable the tests in //src/test/shell/integration:* to run on CI, and fix them all. See https://github.com/bazelbuild/bazel/issues/4292 Change-Id: I6a811d8045d85237a7df4024f893f3ca1b25177a Closes #5789. Change-Id: I6a811d8045d85237a7df4024f893f3ca1b25177a PiperOrigin-RevId: 207863832
* Put main repo remapping behind a flag.Gravatar dannark2018-08-07
| | | | | RELNOTES: None PiperOrigin-RevId: 207801155