aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test
Commit message (Collapse)AuthorAge
* Narrow the LinkCommandLine API.Gravatar Googler2017-08-30
| | | | | | | | | Previously it had too many essentially identical accessors. This trims it down a bit and adjusts the call sites. This cl changes the command line passed to tests slightly - now they can possibly contain linkstamping command prepended to actual linker invocation. RELNOTES: None. PiperOrigin-RevId: 166888575
* BEP: add tool_tag explicitlyGravatar Klaus Aehlig2017-08-30
| | | | | | | | | Add the tool tag explicitly in the OptionsParsed event. In this way, consumers of the stream can more easily associate an invocation with a tool. Change-Id: I6040e91f657082782bf8010a6576001118672e2d PiperOrigin-RevId: 166862895
* Rollforward of ↵Gravatar apell2017-08-29
| | | | | | | | | https://github.com/bazelbuild/bazel/commit/0071b396776be4d146fd271499716dd5dea6f7e9: Enable parameter files for manifest merger actions. NEW: Using shell quoted param files and unescape arguments in ParamsFilePreProcessor to avoid miss-processing --manifestValues arguments containing whitespace. RELNOTES: None. PiperOrigin-RevId: 166858411
* Fix NPE in WorkerFilesHash.Gravatar philwo2017-08-29
| | | | | | | | We must check that a given artifact is a file, before calling getDigest, according to the interface contract specified in actions/Metadata.java. Add a regression test to bazel_worker_test.sh, too. It's enough to simply add a directory entry to the worker's data to trigger the original bug. PiperOrigin-RevId: 166856512
* Add a new toolchain type for c++. In order to do this, ↵Gravatar cpeyser2017-08-29
| | | | | | | | PlatformConfiguration is made a legal configuration fragment for every rule class. Add a default "dummy" c++ toolchain to prevent resolution errors when legacy toolchain selection logic is used. Add toolchain mocks to java and shell tests. PiperOrigin-RevId: 166854893
* Split "shell", "graph" into their own packages.Gravatar philwo2017-08-29
| | | | PiperOrigin-RevId: 166849610
* aar_import creates res/values/empty.xml if it contains no resources.Gravatar ajmichael2017-08-29
| | | | | | | | | To do this, add a new tool that is used instead of zipper to get the resources out of the AAR. This tool creates res/values/empty.xml if there are no resources in the AAR. Also, some general cleaning of the code. RELNOTES: None PiperOrigin-RevId: 166768607
* Automated rollback of commit 363413110f3a63a11d900864be1852adbaed2899.Gravatar cpeyser2017-08-29
| | | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks //src/test/shell/bazel:bazel_bootstrap_distfile_test: INFO: You can skip this first step by providing a path to the bazel binary as second argument: INFO: ./compile.sh compile /path/to/bazel 🍃 Building Bazel from scratch...... 🍃 Building Bazel with Bazel. .WARNING: /tmp/bazel_cHivhPBc/out/external/bazel_tools/WORKSPACE:1: Workspace name in /tmp/bazel_cHivhPBc/out/external/bazel_tools/WORKSPACE (@io_bazel) does not match the name given in the repository's definition (@bazel_tools); this will cause a build error in future versions. ERROR: in target '//external:cc_toolchain': error loading package '@local_config_cc//': Extension file not found. Unable to load file '@local_config_cc//:dummy_toolchain.bzl': file doesn't exist or isn't a file. INFO: Elapsed time: 3.343s ERROR: Could not build Bazel Found by git bisect. *** Original change description *** Add a new toolchain type for c++. In order to do this, PlatformConfiguration is made a legal configuration fragment for every rule class. Add a default "dummy" c++ toolchain to prevent resolution errors when legacy toolchain selection logic is used. Add toolchain mocks to java and shell tests. PiperOrigin-RevId: 166750885
* Add debugging to other flaky test case in discard_graph_edges_test. We ↵Gravatar janakr2017-08-29
| | | | | | actually don't need most of the information being logged here, but on the other hand, I have no reports of flakiness from the other test case after these log lines were added, so maybe it'll be a heisenbug and go away. PiperOrigin-RevId: 166731945
* Visit subtrees of the AST in evaluation orderGravatar fzaiser2017-08-29
| | | | | | | | | | | For instance, it makes more sense to visit the RHS of an assignment first because this is evaluated first. This also fixes a bug in the validator, which allowed definitions like "a = a" RELNOTES: None PiperOrigin-RevId: 166709589
* Set the Objc tests to not run on windows.Gravatar dmarting2017-08-28
| | | | PiperOrigin-RevId: 166705717
* Change Identifier#boundNames to #boundIdentifiers.Gravatar fzaiser2017-08-28
| | | | | RELNOTES: None PiperOrigin-RevId: 166704851
* //src/test/shell/bazel:toolchain_test: increase sizeGravatar Klaus Aehlig2017-08-28
| | | | | | | ...and shard count, to avoid timeouts. See #3619. Change-Id: I52c0d1a2bcf8e7e6c5c01db58bdddc87fb9e7f07 PiperOrigin-RevId: 166696089
* Use CustomCommandLine directly instead of via SpawnAction.Builder.Gravatar tomlu2017-08-28
| | | | | | | | | | | | | This change forces use of CustomCommandLine.Builder, which has a richer interface for constructing memory-efficient command lines. It will also permit surveying the code base for inefficient patterns using an IDE. This change was done by hand and split using Rosie to assist with rollbacks in case of bugs. Reviewers, please pay particular attention to: * Each all to addInputArgument/addOutputArgument should come with a corresponding matching pair to SpawnAction.Builder#addInput and CustomCommandLine.Builder#addExecPath (eg.). * The commandLine must be set on the SpawnAction using SpawnAction.Builder#setCommandLine. Note that most calls to addPrefixed("arg=", val) should be more idiomatically expressed as add("arg", val), but this involves changing tests and making sure that the command line tools can accept the format. PiperOrigin-RevId: 166694174
* Implement CustomCommandLine support for Skylark.Gravatar tomlu2017-08-28
| | | | | RELNOTES: Support ctx.actions.args() for more efficient Skylark command line construction. PiperOrigin-RevId: 166694148
* Replace which by bash-builtin hashGravatar Klaus Aehlig2017-08-28
| | | | | | | | | | | | Reportedly, which is not installed by default on all non-windows systems bazel is used. As we only use which to test if a program can be found on PATH, use the bash builtin hash command. While there - replace the search for [ by a search for tr, a program we care more, as [ is the builtin test anyway, - fix a typo in the name of the GNU tools collection searched for. Change-Id: Id78737eba10e96c6fa41ca68a47102ab28e6031f PiperOrigin-RevId: 166685117
* Open source some objc tests. Most notably, proto and j2objc tests still ↵Gravatar cparsons2017-08-28
| | | | | | | remain, but will follow. RELNOTES: None. PiperOrigin-RevId: 166635306
* Enforce that there should be no RuleConfiguredTarget objects on the heap ↵Gravatar janakr2017-08-28
| | | | | | during execution when using --discard_analysis_cache. PiperOrigin-RevId: 166611136
* Add a test to ensure that the AndroidManifest.xml from an aar_import isGravatar ajmichael2017-08-28
| | | | | | | exported. RELNOTES: None PiperOrigin-RevId: 166546091
* Refactoring: OptionsParser now uses the visitor pattern to iterate over ↵Gravatar fwe2017-08-28
| | | | | | | | | Blaze options. This change is in preparation for unknown commit which also needs to iterate over all options, but has to execute a different action than getOptionsCompletion(). As a result, applying the visitor patterns helps to avoid duplicate iteration code. PiperOrigin-RevId: 166515117
* Add a new toolchain type for c++. In order to do this, ↵Gravatar cpeyser2017-08-28
| | | | | | | | PlatformConfiguration is made a legal configuration fragment for every rule class. Add a default "dummy" c++ toolchain to prevent resolution errors when legacy toolchain selection logic is used. Add toolchain mocks to java and shell tests. PiperOrigin-RevId: 166509298
* Update Bazel BUILD file to allow def_parse depend on Bazel specific targets ↵Gravatar pcloudy2017-08-28
| | | | | | from third_party. PiperOrigin-RevId: 166475827
* Make tests independent of the current state of the ↵Gravatar vladmos2017-08-28
| | | | | | incompatible_descriptive_string_representations flag PiperOrigin-RevId: 166475260
* Increase size of //src/test/shell/integration:java_integration_testGravatar Klaus Aehlig2017-08-25
| | | | | | | | | | | ...and re-enable of FreeBSD. It turns out that the timeout-flakyness was just because the CI machines weren't fast enough. Running the test 150 times showed no further timeout. Fixes #3614. Change-Id: Icdf2f91b1fe91e22117c3cf6d3fda9409d473198 PiperOrigin-RevId: 166470850
* testenv.sh,Windows: support VC BuildTools 2017Gravatar László Csomor2017-08-25
| | | | | Change-Id: I087eab43e321f99a17bbe442abdebc8711a73801 PiperOrigin-RevId: 166468950
* Implement field declarations for declared providers.Gravatar dslomov2017-08-25
| | | | | RELNOTES: Skylark providers can specify allowed fields and their documentation. PiperOrigin-RevId: 166446104
* Automated rollback of commit 1af9b1e2238c3b43a2b66233495ecf7b6ef4dcab.Gravatar Googler2017-08-25
| | | | | | | | | | | | *** Reason for rollback *** Reason for previous rollback was identified as being a memory regression causing some cases to hit java heap limit. Proposal is to increase java heap limit to compensate and just go with the original change. *** Original change description *** Automated rollback of commit 6cfffdf37e11018c7e6e2cabc90440d6d29c819b. PiperOrigin-RevId: 166426608
* Adds -p to zipalign invocation to align stored (not compressed) .so files in ↵Gravatar ahumesky2017-08-25
| | | | | | | apks on memory page boundaries. RELNOTES: .so files in APKs will be memory-page aligned when android_binary.nocompress_extensions contains ".so" and --experimental_android_use_nocompress_extensions_on_apk is specified. PiperOrigin-RevId: 166399337
* Enable using a parameter for large lists of resources to link.Gravatar corysmith2017-08-25
| | | | | RELNOTES: None PiperOrigin-RevId: 166379334
* Busybox all the Bazel Android tools.Gravatar ajmichael2017-08-25
| | | | | | | | | This change reduces the size taken up in the bazel binary by Android tools deploy jars from 38.2 mb to 9.8 mb, which is 15% of the bazel binary size. Also, some minor cleanups of our BUILD files. https://github.com/bazelbuild/bazel/issues/2385 RELNOTES: None PiperOrigin-RevId: 166373241
* Naming style fix for AndroidInstrumentationInfo(Provider).Gravatar dslomov2017-08-25
| | | | | RELNOTES: None. PiperOrigin-RevId: 166368143
* Refactor JavaInfo.Gravatar dslomov2017-08-25
| | | | | | | | | | Convert implementation from populating an immutable map to a set of SkylarkCallables. That saves memory and allows specifying documentation. Also properly implements equals() and hashCode(). RELNOTES: None. PiperOrigin-RevId: 166364059
* Windows: Implement Java native launcherGravatar Yun Peng2017-08-25
| | | | | | | | | | | Now Bazel build a Windows exe binary to launch JVM for java_binary and java_test. The Java native launcher is implemented with the same logic and functionalities as the original java shell stub script. Change-Id: Ida40579bce82425f3506f9376b7256aa3edc265e PiperOrigin-RevId: 166346445
* Remove "set -o pipefail" as it breaks bazel_sandboxing_test.Gravatar philwo2017-08-24
| | | | | | http://ci.bazel.io/job/bazel-tests/978/artifact/tests-node=linux-x86_64-variation=/src/test/shell/bazel/bazel_sandboxing_test/test.log/*view*/ PiperOrigin-RevId: 166345991
* Replace deprecated `set` constructor and its order names in integration testsGravatar vladmos2017-08-24
| | | | | | | The name `set` and order names "stable", "compile", "naive_link", and "link" are deprecated and will soon be removed from Blaze. PiperOrigin-RevId: 166341984
* Trick the srcs_test to regenerate the list of sources at every change of the ↵Gravatar dmarting2017-08-24
| | | | | | | | workspace We need to declare a dependency on something that change every time the workspace change or we get false negative failure. PiperOrigin-RevId: 166327024
* Allow CommandLine expansion to throw an exception.Gravatar tomlu2017-08-24
| | | | | | | | | | | | | | | | | | | This paves the way for Skylark-side compact command lines that can fail during expansion. In general, expansion happens in these scenarios: * Action execution expands the command line to execute it. This is fine since we are well equipped already to handle failing actions. * In the analysis phase we expand command lines to investigate whether we need a params file. This could be moved to the execution phase, which would have the benefit of getting params files out of the action graph and saving memory. * Key computation expands the command line. This could be fixed by allowing command lines to compute their own keys (which wouldn't try to expand the command line). This could have the benefit of being more efficient. * Extra actions expand the command line to construct the extra action proto. This could maybe be deferred to the execution phase (writing the extra action), which would also be more memory efficient. For failed key computations, we return a singleton "error" key. This means multiple actions that will fail will map to the same key. These actions will necessarily fail if executed, so we should not need to worry about these ending up in the action cache. If we do manage to make the command line compute its own keys then this will become moot in the future. RELNOTES: None PiperOrigin-RevId: 166266385
* Check at compile time that all options are declared public, and are ↵Gravatar ccalvarin2017-08-24
| | | | | | | | non-final and non-static. Remove the now redundant check in the testing framework, as the cases being tested no longer compile. Keep tests that check the contents of the OptionsBase as a whole, however, as this is still not being tested at compile time. PiperOrigin-RevId: 166239209
* Add resource filtering support for third pseudolocaleGravatar Googler2017-08-24
| | | | | | | | Apparently, there's a third pseudolocale, en-rXC. Add support for it in ResourceFilter. RELNOTES: none PiperOrigin-RevId: 166238886
* Stop using CustomMultiArgv in ProtoCompileActionBuilder.Gravatar tomlu2017-08-24
| | | | | | CustomMultiArgv is hard to serialise. This CL still uses mapping functions, which are equally hard to serialise, but it moves one step closer to being structural. PiperOrigin-RevId: 166230153
* Pull maven -src jars when available alongside jars re:Gravatar juliexxia2017-08-24
| | | | | | | https://github.com/bazelbuild/bazel/issues/308 RELNOTES: None. PiperOrigin-RevId: 166219871
* Final tweaks and fixes to enable aapt2 for Blaze.Gravatar corysmith2017-08-24
| | | | | | | Implemented processing databinding for compile passes RELNOTES: None PiperOrigin-RevId: 166215052
* Change default_macosx_sdk_version to default_macos_sdk_version.Gravatar cparsons2017-08-24
| | | | | | | Bazel has supported both for some time, and now the former is being removed (changes to follow). RELNOTES: None PiperOrigin-RevId: 166207231
* Store content digests in repository marker files. ↵Gravatar Benjamin Peterson2017-08-24
| | | | | | | https://www.bazel.build/designs/2016/10/18/repository-invalidation.html Change-Id: I6cb01397a35cd32169a0e415f8d7f944e7d840df PiperOrigin-RevId: 166200841
* Refactor: Parse return statements without an expression properlyGravatar fzaiser2017-08-24
| | | | | | | | This is an internal refactoring necessary for the Skylark linter. It does not change any behavior. RELNOTES: None PiperOrigin-RevId: 166199367
* Set +x to bazel_determinism_test.sh and srcs_test.shGravatar dmarting2017-08-23
| | | | | | The import script failed to add them and none of our presubmit caught it. PiperOrigin-RevId: 166193514
* Adds compile action for aapt2: Aapt2ResourcePackagingActionGravatar corysmith2017-08-23
| | | | | | | | Adds a ManifestContainer interface to centralize the types that provide manifests. Adds PackagedResources to represent a linked dexless resource apk RELNOTES: None PiperOrigin-RevId: 166193049
* Add a Bazel test testing determinism of `bazel build //src:bazel`Gravatar Damien Martin-Guillerez2017-08-23
| | | | | | | | | - Test if hash(bazel1) == hash(bazel2) This ensure that the build of bazel is a fixed point. Change-Id: I422dfc7ec5b95aa054a2677e59427cbd8cd4ef01 PiperOrigin-RevId: 166180529
* Minor refactor of UserDefinedFunction constructor, accessorsGravatar brandjon2017-08-23
| | | | | RELNOTES: None PiperOrigin-RevId: 166149340
* Remove unnecessary custom android_sdk from apksigner tests.Gravatar ajmichael2017-08-23
| | | | | RELNOTES: None PiperOrigin-RevId: 166147838