aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/shell/bazel/BUILD
Commit message (Collapse)AuthorAge
* 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
* Support optional repository verificationGravatar Klaus Aehlig2018-07-25
| | | | | | | | | | | | | | | | Add an option to provide a file with a resolved value, that will be used to verify that the repositories mentioned in this file produce a correct directory tree. RELNOTES: newly added options --experimental_repository_hash_file and --experimental_verify_repository_rules allow to verify for repositories the directory generated against pre-recorded hashes. See documentation for those options. Work towards #5660. Change-Id: I2d8becb188d0fa51e890fb8f6139f321cca14b7b PiperOrigin-RevId: 206016792
* Remove obsolete stuff related to JDK7 supportGravatar Philipp Wollermann2018-07-25
| | | | | | Closes #5626. PiperOrigin-RevId: 205991094
* resolved file: include the hash of the output treeGravatar Klaus Aehlig2018-07-23
| | | | | | | | | | | | | | When reporting about the repository rules that were called, also report a hash of the tree the rule generated. This allows, at least after the fact, to verify that a repository rule actually produced the correct code. Note that equality of the output hash is not a guarantee for reproducible builds, as certain properties of the output tree, in particular owner, are ignored. Still it is a good check to detect wrong use of a repository rule. Change-Id: Ic56509f8e0d0b4be9ce3335ade280f983fe77e6d PiperOrigin-RevId: 205631855
* Windows,tests: port bazel_rules_testGravatar Laszlo Csomor2018-07-12
| | | | | | | | | | | | | | //src/test/shell/bazel:bazel_rules_test now runs on Windows. See https://github.com/bazelbuild/bazel/issues/4292 Change-Id: If88daa9c65689ae8363ee83cfd401c3200215c74 Closes #5571. Change-Id: If88daa9c65689ae8363ee83cfd401c3200215c74 PiperOrigin-RevId: 204256609
* Windows,tests: port bazel_build_event_stream_testGravatar Laszlo Csomor2018-07-10
| | | | | | | | | | | | //src/test/shell/bazel:bazel_build_event_stream_test now runs on Windows. See https://github.com/bazelbuild/bazel/issues/4292 Closes #5560. Change-Id: Ica3d59fb6f557c85d2fd646cf005ffd831046119 PiperOrigin-RevId: 203945734
* First cl for verbose workspaces (ability to log certain potentially ↵Gravatar Googler2018-07-03
| | | | | | | | | | | | | | | | | non-hermetic events that happen as part of repository rules). In the interest of smaller cls, adding plumbing first with the rest to follow. Creates and posts a new EventBus message for workspace rule events (only execution for now); conditional on a flag, registers a listener to output those events. In the future: - Better structure for the events: will create a proto with appropriate messages and more information per event - Add more events - Allowing to specify log file rather than dumping to INFO - Log levels, full or alerts only RELNOTES: None PiperOrigin-RevId: 203132761
* Windows,tests: port rule_test_testGravatar Laszlo Csomor2018-07-02
| | | | | | | | | | | | | | | | | | | | | | Port //src/test/shell/bazel:rule_test_test to Windows: - Use the Bash runfiles library (in @bazel_tools) - Update testenv.sh to retry failed "rm" commands because often they attempt to delete a Bazel's output directory that is still in the middle of shutting down, and just needs a bit of time to finish doing so. See https://github.com/bazelbuild/bazel/issues/4292 Change-Id: I6a7687d15ae3af2ca605149fa75ff48bf2fb89c8 Closes #5490. Change-Id: I6a7687d15ae3af2ca605149fa75ff48bf2fb89c8 PiperOrigin-RevId: 202903547
* shell tests, windows: enable more testsGravatar Laszlo Csomor2018-06-21
| | | | | | | | | | | | | | | | | | Enable on Windows: //src/test/shell/bazel:bazel_experimental_ui_test //src/test/shell/bazel:bazel_random_characters_test Also document the (surprising) semantics of http_file() on Windows. See https://github.com/bazelbuild/bazel/issues/4292 Change-Id: Id636b9cf03cc8d12449eed2be493dcfc176146c7 Closes #5409. Change-Id: I15677548f2f3fd6b4822e8e6af4b78d8517f953a PiperOrigin-RevId: 201512812
* Make the embedded JDK targets the defaultGravatar Liam Miller-Cushon2018-06-18
| | | | | | Closes #5403. PiperOrigin-RevId: 201007405
* RepositoryFunction: depend on overrides, even if there is no ruleGravatar Klaus Aehlig2018-06-18
| | | | | | | | | | Not all bazel external repositories are generated by a rule (e.g., they might be unbound names with the expectation that on override binds them). Still, even those external repositories depend on changes to the repository override. Register this dependency. Change-Id: I900c94f969d08dec82c5776eff28337878379b5e PiperOrigin-RevId: 200974283
* shell tests: tag tests with "no_windows"Gravatar Laszlo Csomor2018-06-15
| | | | | | | | | | | | | | Tag all tests in //src/test/shell/bazel:* that do not run on Windows yet with "no_windows". See https://github.com/bazelbuild/bazel/issues/4292 Change-Id: I9823621d5ba4fc02bafe731c17bb7f32785c3b47 Closes #5408. Change-Id: Ic3b9e8f96221ceff2ea33bfefa2814ba869af1ab PiperOrigin-RevId: 200707716
* git_repository: return actual commitGravatar Klaus Aehlig2018-06-15
| | | | | | | | | | | | | | Using that repository rules now may return a non-None value, make git_repository return the arguments that make the rule reproducible; in particular, return the actual commit (instead of a tag) and the date of the commit, so support shallow clones. The added test also demonstrates how the `bazel sync` command together with `--experimental_repository_resolved_file` can be used to replay an earlier state of external dependencies. Change-Id: Ifa1cfdfdb5eb299a15b9d0ec7d285dc84c0bcdc0 PiperOrigin-RevId: 200705705
* shell, testenv.sh, BUILD: remove unused targetGravatar Laszlo Csomor2018-06-15
| | | | | | | | | Change-Id: I1039371e326dc260f2e70b32c9f4e2fd0dc0d7a6 Closes #5395. Change-Id: I002ba4f0944594ab62a7dd7a3ed4b4e7438328c0 PiperOrigin-RevId: 200686443
* shell,tests: use Bash runfiles library in one testGravatar Laszlo Csomor2018-06-14
| | | | | | | | | | | See https://github.com/bazelbuild/bazel/issues/4930 Change-Id: I148c0b1e4baa8ff44d86a6ee196bea7e9058320f Closes #5387. Change-Id: Iba32f21ff6cad1b538c72cfd08ce24846843c124 PiperOrigin-RevId: 200554084
* Support unconditional fetching of repositoriesGravatar Klaus Aehlig2018-06-14
| | | | | | | | | | | Make all external repositories depend on an additional SkyValue controllable via commands, so support unconditional fetching of all external repositories, as it is needed by the the `sync` command. Improves on #5175, provides a work around for #4907. Change-Id: I30033614c1a2fad3f1363b85ff69cf92f697c255 PiperOrigin-RevId: 200543985
* update bazel's embedded jdk to jdk9Gravatar cushon2018-06-11
| | | | | | | | | | | - Updates the embedded JDK to Azul Zulu 9.0.7 - All integration tests use Bazel with the embedded JDK Also updated: http://storage.googleapis.com/bazel-mirror/openjdk/index.html Closes #5312, #5314, #5315 PiperOrigin-RevId: 200055008
* Add a module collecting the results of repository rulesGravatar Klaus Aehlig2018-05-04
| | | | | | | | | | | We allow repository rules to return a reproducible version of themselves, or a list of fully reproducible rules they expand to. Add a module collecting all those answers, logging them at each invocation, if requested; this collection can also be used by the upcoming 'sync' command to generate a WORKSPACE.resolved file. Change-Id: Iac1358de1b74633810d300ba2bf45bba8b3992dc PiperOrigin-RevId: 195427096
* remote: introduce --disk_cache_flagGravatar David Ostrovsky2018-05-02
| | | | | | | | | | | | | | | Consolidate the --experimental_local_disk_cache and --experimental_local_disk_cache_path flags into a single --disk_cache= flag. Also, create the cache directory if it doesn't exist. RELNOTES: We replaced the --experimental_local_disk_cache and --experimental_local_disk_cache_path flags into a single --disk_cache flag. Additionally, Bazel now tries to create the disk cache directory if it doesn't exist. Closes #5119. PiperOrigin-RevId: 195070550
* sandbox: Add support for running actions inside Docker containers.Gravatar philwo2018-04-27
| | | | | | | RELNOTES: Bazel now supports running actions inside Docker containers. To use this feature, run "bazel build --spawn_strategy=docker --experimental_docker_image=myimage:latest". PiperOrigin-RevId: 194582691
* tests,shell: enable some shell tests on WindowsGravatar Laszlo Csomor2018-04-26
| | | | | | | | | | | | | | | | In this commit: - split //src/test/shell:shell_utils_test into a symlink-specific part and the rest - use the Bash runfiles library - add "windows_tests" and "all_windows_tests" targets as we do in other platforms (e.g. in //src:BUILD) See https://github.com/bazelbuild/bazel/issues/4930 See https://github.com/bazelbuild/bazel/issues/4292 Change-Id: I111a7fed223f1f9b767dc6411389465f8da3e043 PiperOrigin-RevId: 194395011
* HttpDownloader: also cache files downloaded without provided hashGravatar Klaus Aehlig2018-04-23
| | | | | | | | | | | | | | | | | Even if downloading a file without a predicted hash, add it to the cache. This step is necessary to avoid redownloading when we switch to resolved WORKSPACES. Starting from a plain URL, the file is downloaded and the hash is added to the resolved version of the rule. Then we still want the resolved form of the rule (which still has different arguments) to download the same file again. Even before the design of resolved WORKSPACES is implemented, this caching is useful for the manual workflow: take the hash that is printed for every file downloaded without predicted hash and manually add it to the parameters of the rule. Then we prefer not to redownload the file again. Change-Id: I90eefa9efed7c47514cc481dc09d9e938efa5a39 PiperOrigin-RevId: 193907109
* Remove WorkerTestStrategy and with it, ↵Gravatar lberki2018-04-12
| | | | | | | | | BuildConfiguration.Fragment#compatibleWithStrategy(). The experiment did not work out. RELNOTES: None. PiperOrigin-RevId: 192567832
* Ensure arguments for repository rules are available earlyGravatar Klaus Aehlig2018-04-06
| | | | | | | | | | | ...so that a repository rule can access them in any order without being restarted. Restarting a repository rule can be expensive, if it already accessed the network or executed expensive commands. Improves on #4533. Change-Id: I1d27f88492e4e51fb955f3f066a28a75c5016169 PiperOrigin-RevId: 191874363
* Add stats about cache hits and execution strategies to Bazel's UI.Gravatar Googler2018-04-03
| | | | | | | Fixes: 2846 RELNOTES: Bazel now displays information about remote cache hits and execution strategies used in its UI after every build and test, and adds a corresponding line "process stats" to BuildToolLogs in BEP. PiperOrigin-RevId: 191441770
* Add tests verifying the embedded skylark codeGravatar Klaus Aehlig2018-03-28
| | | | | | | | | | | | | | We suggest our users to regularly test their code base with --all_incompatible_chages to have time to adapt their code base to upcoming incompatible changes. When doing so, it is annoying if that breaks due to the Skylark code embedded in bazel not being ready for the upcoming incompatible changes. Therefore, add tests exercising the embedded code enabling all incompatible changes. This way, hopefully, changes like f1ad0e6df1528894b will come before the deprecation is added. Change-Id: Iea60ff6a4019db310d1f1a1ad6a7b2bb53101c6d PiperOrigin-RevId: 190766449
* Adding olaola to OWNERS on all remote libraries and tests.Gravatar olaola2018-03-22
| | | | | | TESTED=presubmit RELNOTES: None PiperOrigin-RevId: 190056498
* A tiny binary to print all rules in a package, after BUILD macro expansion.Gravatar carmi2018-03-21
| | | | | RELNOTES: None PiperOrigin-RevId: 189973158
* Increase timeout to "long" for:Gravatar twerth2018-03-05
| | | | | | | | | | | //src/test/shell/bazel/android:android_ndk_integration_test and //src/test/shell/bazel:bazel_test_test They're timing out on Kokoro recently. RELNOTES: None PiperOrigin-RevId: 187853786
* external repos: add a Skylark library for common tasksGravatar Klaus Aehlig2018-02-28
| | | | | | | | ...thus avoiding having them several times for the various repository rules, each with slightly different behavior and bugs. Change-Id: I6cec0c0dd0901453458903e226ceb2098a93cdd8 PiperOrigin-RevId: 187306904
* Verify embedding of paths to other foreign repositoriesGravatar Klaus Aehlig2018-02-26
| | | | | | | | | | | While rules that want to be called from different repositories may not make any assumptions about locations of their dependencies, they still may embed path obtained via expansion of $(location ...) into their files, even if the dependencies refer to a different repository. Add tests verifying that this behavior is preserved. Change-Id: I2ee6cc806e30b6e18fad9b488012169da400895b PiperOrigin-RevId: 187030372
* Add a test verifying legitmate path embeddingGravatar Klaus Aehlig2018-02-22
| | | | | | | | | | While rules that want to be called from different repositories may not make any assumptions about locations of their dependencies, they still may embed path obtained via expansion of $(location ...) into their files. Add tests verifying that this behavior is preserved. Change-Id: Id71588b4c128c15926d9190db507c9085fd17653 PiperOrigin-RevId: 186591069
* External repositories: document legitimate path assumptionsGravatar Klaus Aehlig2018-02-20
| | | | | | | | | | | | | | | | | | | | | | Add a series of tests verifying the assumptions about execroot layout a user or rule author may rely on. This serves a double purpose: one the one hand, we verify that these legitimate assumptions stay stable, on the other hand, we document what assumptions may be made with the implicit understanding that anything not asserted may change in the future without warning. This patch brings the first set of legitimate assumptions, those about path that may unconditionally be used. - Each target may refer to true source files in its own repository via paths relative to its repository root. - A library can be #inlcude'd via path relative to the root of the repository it resides in. In a follow-up patch, the legitimate assumptions about the portability of paths obtained from Skylark will be documented. Change-Id: I6d91fa4e6e3e2e8040a778fe07425bdd8532b94b PiperOrigin-RevId: 186272067
* experimental_repository_cache: support relative pathsGravatar Klaus Aehlig2018-02-09
| | | | | | | | | | ...and interpret them relative to the workspace directory. Improves on #3516. In fact, fixes the original request of supporting relative paths. Change-Id: Ibbb6fd43179d589ad477427e47e26c773c7a04de PiperOrigin-RevId: 185121629
* Increase timeout on remote_execution_test.Gravatar ruperts2018-02-07
| | | | | RELNOTES: None. PiperOrigin-RevId: 184947081
* Increase timeout on bazel_java_test.Gravatar ruperts2018-02-07
| | | | | RELNOTES: None. PiperOrigin-RevId: 184869999
* Remove flaky attribute from toolchain_test.Gravatar jcater2018-01-30
| | | | | | Ran test 1000 times, no failures. PiperOrigin-RevId: 183828896
* Support symlinks in external zip archivesGravatar Klaus Aehlig2018-01-29
| | | | | | | | | | Allow symbolic links in zip archives, as long as they refer to a file within the same archive. Fixes #2656. Change-Id: I0b21b8bb79a7e999ef191baa2a71d29745ac65e4 PiperOrigin-RevId: 183664725
* Automated rollback of commit 2aeaeba66857c561dd6d63c79a213f1cabc3650d.Gravatar dslomov2018-01-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks C++ on gcc 4.8.4 (specifically, TensorFlow: https://github.com/bazelbuild/bazel/issues/4474) Fixes #4474 *** Original change description *** When linking mostly-static Linux binaries, link libstdc++.a explicitly. This allows libstdc++ to be statically linked, which is normally only possible when invoking GCC as `g++` with the `-static-libstdc++` flag. Fixes https://github.com/bazelbuild/bazel/issues/2840 See https://github.com/envoyproxy/envoy/issues/415 for additional background and context. cc @htuch (for Envoy) and @calpeyser @hlopko (who I talked to earlier about this)... *** RELNOTES: None. PiperOrigin-RevId: 182519445
* Support patches in http_archiveGravatar Klaus Aehlig2018-01-15
| | | | | | | | | | | Support applying a sequence of patches for external repositories imported via http_archive. (Note that we only support the version from @bazel_tools, not the deprecated native rules.) Works towards #3395. Change-Id: I96c746acc04790b051eb686856c04a3ff3c90059 PiperOrigin-RevId: 181975322
* 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
* Mark toolchain_test as flaky until we can uncover the cause and fix it.Gravatar jcater2017-12-22
| | | | PiperOrigin-RevId: 179962502
* Update bootclasspath handling for JDK 9Gravatar cushon2017-12-20
| | | | | | | rt.jar etc. no longer exist, retrieve the default bootclasspath contents using a Java program instead. PiperOrigin-RevId: 179747945
* remote: Rename --remote_rest_cache to --remote_http_cacheGravatar Jakob Buchgraber2017-12-19
| | | | | | | | | | | Call it what it is. RELNOTES: --remote_rest_cache was renamed to --remote_http_cache. Both options keep working in this release, but --remote_rest_cache will be removed in the next release. Change-Id: I9e0b947f2184e0d543e7e19c5c33b6aa851d47d2 PiperOrigin-RevId: 179542826
* Move linux_sandbox_test from shell/bazel to shell/integration.Gravatar ruperts2017-12-12
| | | | | | | Also split off part of the linux_sandbox_test into the linux_sandbox_network_test. RELNOTES: None. PiperOrigin-RevId: 178816110
* When linking mostly-static Linux binaries, link libstdc++.a explicitly.Gravatar John Millikin2017-12-12
| | | | | | | | | | | | | | | | | | This allows libstdc++ to be statically linked, which is normally only possible when invoking GCC as `g++` with the `-static-libstdc++` flag. Fixes https://github.com/bazelbuild/bazel/issues/2840 See https://github.com/envoyproxy/envoy/issues/415 for additional background and context. cc @htuch (for Envoy) and @calpeyser @hlopko (who I talked to earlier about this) I'm only doing this in the Linux toolchain because MacOS doesn't do static linking of system libs anyway, and I don't know enough about Windows or FreeBSD to test on those platforms. Closes #4031. PiperOrigin-RevId: 178762357
* Fix: uploading artifacts of failed actions to remote cache stopped working.Gravatar olaola2017-12-11
| | | | | | | | | | | | | | | | To reproduce: run a failing test with --experimental_remote_spawn_cache or with --spawn_strategy=remote and no executor. Expected: test log is uploaded. Desired behavior: - regardless of whether a spawn is cacheable or not, its artifacts should be uploaded to the remote cache. - the spawn result should only be set if the spawn is cacheable *and* the action succeeded. - when executing remotely, the do_not_cache field should be set for non-cacheable spawns, and the remote execution engine should respect it. This CL contains multiple fixes to ensure the above behaviors, and adds a few tests, both end to end and unit tests. Important behavior change: it is no longer assumed that non-cacheable spawns should use a NO_CACHE SpawnCache! The appropriate test case was removed. Instead, an assumption was added that all implementations of SpawnCache should respect the Spawns.mayBeCached(spawn) property. Currently, only NO_CACHE and RemoteSpawnCache exist, and they (now) support it. TESTED=remote build execution backend. WANT_LGTM: philwo,buchgr RELNOTES: None PiperOrigin-RevId: 178617937
* Moving the RemoteWorker into tools/remote directory.Gravatar olaola2017-12-05
| | | | | | | | This is because I want to add another remote execution related tool, the remote_client, which will use the Remote Execution API to fetch blobs from a remote cache. I will use this tool as part of end-to-end tests for remote execution. TESTED=remote integration tests, presubmit RELNOTES: None PiperOrigin-RevId: 177995895
* 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
* Add //tools/jdk:current_java_runtime / tools/jdk:current_host_java_runtime ↵Gravatar lberki2017-11-24
| | | | | | | | | | | to rules that use the $(JAVA) or the $(JAVABASE) Make variable. This is necessary because a future Blaze version will require this for rules that use said Make variables. This incompatible change can be tested today by adding the --noexperimental_enable_jvm_configuration_make_variables command line option to Blaze. This change is part of a large-scale change ([] RELNOTES: None. PiperOrigin-RevId: 176834987