aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/shell
Commit message (Collapse)AuthorAge
...
* 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
* Add regression test for breakage caused by ↵Gravatar philwo2017-11-23
| | | | | | https://github.com/bazelbuild/bazel/commit/0ebb3e54fc890946ae6b3d059ecbd50e4b5ec840. PiperOrigin-RevId: 176774887
* Remove java_toolchain using remote targets.Gravatar xingao2017-11-21
| | | | PiperOrigin-RevId: 176521744
* Fix //src/test/shell/integration:progress_reporting_testGravatar Klaus Aehlig2017-11-21
| | | | | | | | | | | | | | | | The test case test_failed_actions_with_keep_going was never correct and only worked by accident: it relied on bazel starting at least two actions, if for there are at least two where all the dependencies are already met; however bazel is clever and analyzes the resources of the system it is running in, and if they are small will only run one genrule at a time. Fix this by telling it to run 2 actions and lying about the available resources of the local system. Also increase the test size and reenable the test for remote execution. Fixes #3995. Change-Id: Ic84de17a98a2e74c24901d4efb38d7631de4690a PiperOrigin-RevId: 176511026
* Fix duplicate test name.Gravatar John Cater2017-11-21
| | | | | Change-Id: I0d77f491422c41831b2840fb7256526f273abbd0 PiperOrigin-RevId: 176502405
* SOURCE_DATE_EPOCH environment variable override the timestampGravatar Damien Martin-Guillerez2017-11-21
| | | | | | | | | | | | | | | | | | | | This is applying the version 1.1 of the specification (https://reproducible-builds.org/specs/source-date-epoch/) where the only timestamp that Bazel puts in the final targets is overridden by the value of SOURCE_DATE_EPOCH. This change also remove the legacy SOURCE_DATE_EPOCH handling which wasn't really following the spec. Note that Bazel itself tries hard to remove all timestamps from intermediary binaries and overridde SOURCE_DATE_EPOCH in most action, which is a not according to the version 1.0 of the spec but according to the expected change for version 1.1. RELNOTES: SOURCE_DATE_EPOCH (https://reproducible-builds.org/specs/source-date-epoch/) can be used to override the timestamp used for stamped target (when using --stamp). Fixes #2240. Change-Id: I074e7905fa6745cc706f7391340aeae9188909ca PiperOrigin-RevId: 176489717
* Add a random number to action temp dirGravatar Changming Sun2017-11-20
| | | | | | | | | | Fix for #4035 @laszlocsomor Closes #4110. PiperOrigin-RevId: 176346381
* Shard android_integration_test's sdk, proguard and aar tests out to improve ↵Gravatar jingwen2017-11-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | performance. Shaves ~30-40 seconds off the critical path. The critical path is now dominated by the NDK test, but that's out of scope for this change. See below for data. BEFORE: $ bazel test //src/test/shell/bazel/android:android_integration_test INFO: Analysed target //src/test/shell/bazel/android:android_integration_test (0 packages loaded). INFO: Found 1 test target... [4 / 5] Testing //src/test/shell/bazel/android:android_integration_test; 23s linux-sandbox Target //src/test/shell/bazel/android:android_integration_test up-to-date: /tmp/bazel-bin/src/test/shell/bazel/android/android_integration_test INFO: Elapsed time: 93.696s, Critical Path: 93.37s INFO: Build completed successfully, 2 total actions //src/test/shell/bazel/android:android_integration_test PASSED in 93.4s AFTER: $ bazel test :all --nocache_test_results WARNING: The major revision of the Android NDK referenced by android_ndk_repository rule 'androidndk' is 15. The major revisions supported by Bazel are [10, 11, 12, 13, 14]. Defaulting to revision 14. WARNING: API level 26 specified by android_ndk_repository 'androidndk' is not available. Using latest known API level 25 INFO: Analysed 9 targets (0 packages loaded). INFO: Found 2 targets and 7 test targets... INFO: Elapsed time: 106.452s, Critical Path: 105.66s INFO: Build completed successfully, 8 total actions //src/test/shell/bazel/android:aidl_integration_test PASSED in 43.9s //src/test/shell/bazel/android:android_integration_test PASSED in 55.1s //src/test/shell/bazel/android:android_ndk_integration_test PASSED in 105.6s //src/test/shell/bazel/android:android_sdk_integration_test PASSED in 68.4s //src/test/shell/bazel/android:desugarer_integration_test PASSED in 43.9s //src/test/shell/bazel/android:proguard_integration_test PASSED in 43.7s //src/test/shell/bazel/android:resources_integration_test PASSED in 51.4s Executed 7 out of 7 tests: 7 tests pass. RELNOTES: None. PiperOrigin-RevId: 176144822
* Move process_wrapper_test from shell/bazel to shell/integration.Gravatar ruperts2017-11-16
| | | | | RELNOTES: None. PiperOrigin-RevId: 176057393
* Fix Skylark outputs to properly report errors in template placeholders.Gravatar jcater2017-11-16
| | | | | | Fixes #1479. PiperOrigin-RevId: 175979487
* More resilient to remote spawn cache errorsGravatar Alpha Lam2017-11-16
| | | | | | | | | | Bazel used to fail the entire build if there is a single error with remote spawn cache. This could happen on unreliable network or when server is under load. This change will allow Bazel to fallback to local execution with a warning. Change-Id: I0bd41dc862b33a2ab2ab772d8ce9c943476edbf4 PiperOrigin-RevId: 175951699
* Add deps attributes to the Skylark maven_{a,j}ar rules.Gravatar ajmichael2017-11-14
| | | | | | | | | | | | | | | | | | | | | | | | | | The deps are passed through into the generated java_import and aar_import rules. This is necessary for AARs with resource dependencies since maven_aar ignores transitive dependencies. It's less significant for the Java rules, since typically JARs on Maven are compiled class files and as such only have runtime dependencies. Example usage: ``` # WORKSPACE load("@bazel_tools//tools/build_defs/repo:maven_rules.bzl", "maven_aar") maven_aar( name = "android_image_cropper", artifact = "com.theartofdev.edmodo:android-image-cropper:2.3.1", deps = [ "@androidsdk//com.android.support:appcompat-v7-24.1.1", ], ) ``` Fixes https://github.com/bazelbuild/bazel/issues/2863. Fixes https://github.com/bazelbuild/bazel/issues/3980. Also, cleans up some broken stuff in the tests (sadly, they don't run on jenkins, so nothing caught that they were broken). test_maven_jar_with_classifier_skylark still does not work, so I disabled. RELNOTES: Add deps attribute to Skylark maven_aar and maven_jar workspace rules. PiperOrigin-RevId: 175698282
* bootstrap test: also verify SOURCE_DATE_EPOCHGravatar Klaus Aehlig2017-11-13
| | | | | | | | | | | | | | Extend our integration test that verifies that bazel can successfully be bootstrapped from the distribution artifact, to also verify that SOURCE_DATE_EPOCH is honored. As the bazel binary created contains a time stamp, we need to support it being set from the invocation to ensure a reproducible build. The standard way of setting time stamps to be embedded is setting the SOURCE_DATE_EPOCH environment variable. So ensure that that time stamp occurs in the version output. Change-Id: Ib6388104d83426b6a74d995c324adee586560fe7 PiperOrigin-RevId: 175546459
* Test for embedded tools: do not include tools from @bazel_toolsGravatar dmarting2017-11-12
| | | | | | Those tools are dependent on the host bazel (the one used for running the test) and that caused the test to be broken by the nightly. PiperOrigin-RevId: 175462157
* RELNOTES: --keep_incrementality_data flag allows Bazel servers to be run in ↵Gravatar janakr2017-11-12
| | | | | | | | | | | | | | memory-saving non-incremental mode independent of --batch and --discard_analysis_cache. A command run with --nokeep_incrementality_data will discard data that would be needed for incremental builds. Subsequent commands can be sent to the same server, but they will not get the benefit of incrementality from this command. However, if --keep_incrementality_data is specified on a subsequent command, the commands after that will get the benefits of incrementality. There are two benefits to not being dependent on --batch. First, this allows Bazel servers to be run in extreme memory-saving mode without the startup penalties (JVM startup, JITting) that --batch execution imposes. Second, this allows Bazel developers to inspect the state of a Bazel server after an extreme memory-saving build. In order to avoid discarding data unnecessarily (for instance, on a "bazel info used-heap-size-after-gc" or "bazel dump --skyframe=summary") the actual resetting of the graph is done lazily, right before its use in SequencedSkyframeExecutor#sync. This is morally a partial rollback of https://github.com/bazelbuild/bazel/commit/98cd82cbdcac7c48164a611c5a9aa8fc2f1720ef. For now, our tests specify all of the flags. After this change sticks, I plan to get rid of the --batch flag from these tests, which should allow for some clean-ups. Eventually --batch and --discard_analysis_cache may not imply that we don't keep incremental state: we can require that it be specified explicitly. PiperOrigin-RevId: 175335075
* Fix a bug in which --experimental_post_build_query crashes if asked to run ↵Gravatar janakr2017-11-10
| | | | | | on a graph without edges. Now we fail gracefully. PiperOrigin-RevId: 175294923
* BEP: add commandline for reported actionsGravatar Klaus Aehlig2017-11-10
| | | | | | | | | | The build event protocol reports certain actions that are particularly important to the user, in particular failed ones. Also report the precise command line of those actions, if available. This is useful for IDEs wanting to report errors in a more precise way. Change-Id: I04224185ea46c608ad0dfcdb2e772071ca0736b3 PiperOrigin-RevId: 175203502
* BEP: also report the mnemonic of reported actionsGravatar Klaus Aehlig2017-11-09
| | | | | | | | | Knowing the kind of action that was reported (and hence likely failed) helps users quickly understand what possibly went wrong. So report this information. Change-Id: Ie4869234df895f404ac5d2ff6f05026e4e82ef7e PiperOrigin-RevId: 175043006
* Re-enable test_sandbox_mount_customized_path.Gravatar Xin Gao2017-11-09
| | | | | | | Fix #2760. Change-Id: Iab98fad1ca025c4af7a7048bb7048947ef90d61d PiperOrigin-RevId: 175030992
* Add an integration test of android_binary -> aar_import.Gravatar ajmichael2017-11-07
| | | | | RELNOTES: None PiperOrigin-RevId: 174884178
* Add execution permission to embedded_tools_deps_test.sh.Gravatar Xin Gao2017-11-07
| | | | | | | Fix #4027. Change-Id: I609286c21bd6c503196d122205423726d7e42997 PiperOrigin-RevId: 174880389
* Retrieve bazel_sandbox_test data dependency using http_file rule.Gravatar Xin Gao2017-11-07
| | | | | | Fixes #2355. PiperOrigin-RevId: 174871644
* Fixes the sample test XML format to have a proper failure tag.Gravatar olaola2017-11-07
| | | | | RELNOTES: None PiperOrigin-RevId: 174803631
* Tweak java runfiles resolution.Gravatar Benjamin Peterson2017-11-06
| | | | | | | | | | | | | | | | | | | Building a binary rule does not generally ensure that the runfiles trees of its transitive data dependencies are up-to-date, so it's generally a bad idea to use a dependency's runfiles tree from the primary target. See https://github.com/bazelbuild/bazel/issues/3919 for an example of the problems this can cause. This CL ensures that we pick the primary target's runfiles tree when executing a java_binary from a runfiles tree. This makes the Java runfiles path resolution similar to that of the Python rules. (See commit [1].) [1] 58ee85afcab07374dabc5493c780cbe3369b644f ("Don't follow symlink when looking for python module space") Change-Id: I412ede5cf02ab2c407e45a2b262442ca67df9ba6 PiperOrigin-RevId: 174501597
* Add test to monitor dependency change of //src:embedded_tools_srcs.Gravatar xingao2017-11-06
| | | | PiperOrigin-RevId: 174482602
* Remove legacy implementation of objc compilation/archiving/linking.Gravatar cpeyser2017-11-06
| | | | PiperOrigin-RevId: 174481563
* Don't require --keep_going to discard graph edges. It's unnecessary.Gravatar janakr2017-11-02
| | | | PiperOrigin-RevId: 174202685
* Remove hazelcast dependency from BazelGravatar Alpha Lam2017-10-30
| | | | | | | | | | | | This change removes Bazel's dependency on Hazelcast. This will help to reduce size of the Bazel binary and simplify the usage of remote cache. However Hazelcast library is still kept in the repository and still being used by remote_worker. It is useful as a REST server to allow integration testing with the remote rest cache functionality. Change-Id: Ia21b970cedaec84bc6c13e839509d838acb5756f PiperOrigin-RevId: 173880600
* Extract test_actions_deleted_after_execution to a library for internal use.Gravatar janakr2017-10-27
| | | | PiperOrigin-RevId: 173607594
* BEP: Add an additional event with tool statisticsGravatar aehlig2017-10-27
| | | | | | | | | | After the completion of the build, also report useful logs/statistics. Do so in a separate event, so that the protocol allows reporting build completion early and purely staticial information later, maybe event after some computations. Change-Id: Ibd221546de76fcffcda7819c300187eac45ebd68 PiperOrigin-RevId: 173548733
* remove references to legacy_native_support. it is a no-op.Gravatar ajmichael2017-10-26
| | | | | RELNOTES: None PiperOrigin-RevId: 173443657
* Split skylark flag tests into multiple test casesGravatar brandjon2017-10-25
| | | | | | | This is cleaner and will help when we eventually add tests for flags controlling the global environment. RELNOTES: None PiperOrigin-RevId: 173388860
* BEP: correctly report unbuilt targets if --nobuild is givenGravatar Klaus Aehlig2017-10-25
| | | | | | | | | If bazel is asked to only analyze a target, but not do any builds, correctly report this as the cause why the obtained configured targets were never completed. Change-Id: I6308f8c222861dc0205a63664d5ea9861dd38b6a PiperOrigin-RevId: 173364084
* BEP: correctly close stream in case of a circular dependencyGravatar Klaus Aehlig2017-10-24
| | | | | | | | | If the build is aborted due to a cyclic dependency, correctly report so in the build event protocol. In particular, close the stream of events. Change-Id: Iff86213904a99c6af6a1da90fb229bba8e51c91f PiperOrigin-RevId: 173247825
* Add java_toolchain which compiles singlejar and ijar from source.Gravatar xingao2017-10-24
| | | | PiperOrigin-RevId: 173178028
* Add a simple java test using singlejar and ijar's cc_binary targets.Gravatar xingao2017-10-24
| | | | PiperOrigin-RevId: 173162773
* Implement custom executable API.Gravatar dslomov2017-10-24
| | | | | | | | | | Design is https://github.com/bazelbuild/bazel/issues/3826, specifically https://github.com/bazelbuild/bazel/issues/3826#issuecomment-336220897. Fixes #3826. RELNOTES: ctx.outputs.executable is deprecated. Use DefaultInfo(executable = ...) instead. PiperOrigin-RevId: 173132066
* Reset evaluator eagerly when incremental state changes. And add a regression ↵Gravatar janakr2017-10-24
| | | | | | test to make sure we are using the expected type of node entries when discarding/keeping graph edges. PiperOrigin-RevId: 173131307
* Propagate skylark flags to WORKSPACE and repo rulesGravatar brandjon2017-10-24
| | | | | RELNOTES: Skylark semantics flags now affect WORKSPACE files and repository rules. PiperOrigin-RevId: 173130286
* Add tests for ToolchainUtil, and fix an error when there is an error andGravatar John Cater2017-10-23
| | | | | | | | | values are missing while fetching toolchains. Fixes #3928. Change-Id: I4fde784f56daf544ba70c9848e006f1183c20a99 PiperOrigin-RevId: 172922687
* BEP: correctly report the cause of unbuilt targets if --noanalyze is givenGravatar Klaus Aehlig2017-10-20
| | | | | | | | | If bazel is asked to only load target, but not perform an analysis phase, correctly report this as the cause why the obtained targets wer never configured. Change-Id: Ib630a6dc1b955b810a6cc40254c0ae746e2eca1e PiperOrigin-RevId: 172787777
* Add Skylark code that exports the current Xcode version and the Apple SDK ↵Gravatar lberki2017-10-18
| | | | | | | | | | | versions as flags. This will serve to replace AppleConfiguration#lateBoundOptionDefaults(). That one has to go away so that AppleConfiguration doesn't need to know the contents of the xcode_config rule anymore. Progress towards #3424. RELNOTES: None. PiperOrigin-RevId: 172569961
* Only run cpp_darwin_integration_test on darwinGravatar hlopko2017-10-18
| | | | | | | | | | | | This test assumes linking and loading behavior only present on darwin, it doesn't make sense to run this test on other platforms. But our CI does. This cl makes the test pass without executing anythign when run on a non-darwin platform. E.g. of failure: http://ci.bazel.io/blue/organizations/jenkins/bazel-tests/detail/bazel-tests/1088/pipeline/26 RELNOTES: None. PiperOrigin-RevId: 172446997
* Track Option placement within a priority category.Gravatar ccalvarin2017-10-18
| | | | | | | | | An option has precedence over previous options at the same enum-valued priority. Track its placement in this ordering explicitly. This will allow after-the-fact expansion of expansion options such that they correctly take precedence or not compared to other mentions of the same flag. This is needed to fix --config's expansion. RELNOTES: None. PiperOrigin-RevId: 172367996
* Accept command lines from tools invoking Bazel.Gravatar ccalvarin2017-10-18
| | | | | | | | | | | For tools that wrap Bazel in some way, the original way that the tool was invoked can be a useful piece of information to track when logging what Bazel did and why. In order to output this information in the same way that Bazel outputs its command lines, we accept --tool_command_line in the structure command line format that Bazel uses in the BEP. These structured command lines are protos that we expect as a base64 encoded byte array. For simple scripts that wish to use this feature without compiling the proto, we will also accept any old string (that cannot be interpreted as a base64 encoding) as a single "chunk" in a structured command line. This is experimental for now and users should not get attached to the format. We will remove the experimental_ prefix when it is stable. RELNOTES: None. PiperOrigin-RevId: 172341216
* Make tests more independent of default valuesGravatar Klaus Aehlig2017-10-18
| | | | | | | | | | | | Some tests depend on the target pattern evaluation strategy used. Make them specify the target pattern evaluator they need. Same, if the tests depend on a particular human-readable output stream. While there, also increase shard count for the bazel_repository_cache_test to speed it up. RELNOTES: None PiperOrigin-RevId: 172328801
* Actions now have a temp envvar.Gravatar László Csomor2017-10-16
| | | | | | | | | | | | | | | | | | | | | Every build and test action that creates a Spawn will now have platform-specific environment variables for temp directories: - on Windows: TMP and TEMP - on Linux/Darwin: TMPDIR This is particularly important on Windows where e.g. Java programs cannot create temp directories unless there's a valid TMP or TEMP environment variable set. Fixes: - https://github.com/bazelbuild/bazel/issues/1590 - https://github.com/bazelbuild/bazel/issues/2349 - https://github.com/bazelbuild/bazel/issues/2870 Change-Id: Ib758307daf6b3a51b0f71ae5e65e5bb564dad643 PiperOrigin-RevId: 172326371
* run_test: fix portability issueGravatar Klaus Aehlig2017-10-16
| | | | | | | | | | There are different versions of sed, some implicitly add a newline character to the last line, some don't. To work around, add an additional newline character (so that the file for sure is newline-terminated) to all the files we're editing/comparing. Change-Id: I83e829f26dae839a965349fa137909249b581105 PiperOrigin-RevId: 172312277
* BEP: explicitly report failures associated with a label as suchGravatar Klaus Aehlig2017-10-16
| | | | | | | | | | There is a conceptual difference between the (maybe unsuccessful) completion of a top-level target and a label as the root cause for a failure (i.e., a missing source file). Indicate that difference as such, by having a separate message for failures associated with an unconfigured label. Change-Id: I3f2e20d4dc85782eb11b104a7baf089e66d972e7 PiperOrigin-RevId: 172299938
* Some tests depend on the target pattern evaluation strategy used.Gravatar aehlig2017-10-16
| | | | | | | Make them specify the target pattern evaluator they need. RELNOTES: None PiperOrigin-RevId: 172296001