aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/shell/integration
Commit message (Collapse)AuthorAge
* Report the structured Bazel command line via the BEP.Gravatar ccalvarin2017-10-10
| | | | | | | | | This is part of the effort outlined in https://bazel.build/designs/2017/07/13/improved-command-line-reporting.html. The refactoring of the options parser is not yet complete, so we still do not have complete & correct information about the canonical command line. Where the information is blatantly incorrect, a best approximation was made, with comments and tests documenting the deficiencies. Change the names of the initial CommandLine fields in the BEP to be explicitly identified as unstructured. RELNOTES: None. PiperOrigin-RevId: 171625377
* build_event_stream_test: fix usage of ed(1)Gravatar Klaus Aehlig2017-09-29
| | | | | | | | | | | | | | Unfortunately the various ed(1)s are different in subtle ways. The difference that hit us here is the different treatment of the implicit 'e' command when ed is started with a file as argument; GNU ed writes the answer of that command (i.e., the number of bytes read) on stderr, whereas ed on FreeBSD writes it on stdout. So, let's merge the two output channels and throw away the first answer explicitly. Fixes #3842. Change-Id: I4ef394957cdc316f896b54ca218d4f118465caff PiperOrigin-RevId: 170506490
* BEP: correctly report AliasConfiguredTargetsGravatar Klaus Aehlig2017-09-29
| | | | | | | | | When reporting the completion of a target specified by an alias, report the label of the alias, not that of the target being aliased to. Change-Id: If8416ceef73b01b7531ffa0012251f25a4e9f062 PiperOrigin-RevId: 170466076
* Make build_event_stream_test more portableGravatar aehlig2017-09-27
| | | | | | | | | - Make regexp to look for more strict; 'success' is too generic a keyword as it also matches the UI output 'Build did NOT complete successfully'. - Do not rely on backticks throwing away trailing carriage returns; mask them instead. PiperOrigin-RevId: 170063590
* Add an option to control building of transitive py_binary runfiles trees. ,Gravatar Benjamin Peterson2017-09-26
| | | | | | | | | | | | | | | | | ) Currently, "bazel build :script" constructs the bazel-bin/python-prog.runfiles tree. We'd like to do anyway with this behavior but doing so is a backwards-incompatible change. To facilitate a transition, this CL adds an option --experimental_build_transitive_python_runfiles to control the behavior. In the example above, "bazel build --noexperimental_build_transitive_python_runfiles :script" won't construct bazel-bin/python-prog.runfiles. Change-Id: If4d5a84c956a0bbac9067dcf38a00e5732c450f2 PiperOrigin-RevId: 170038245
* build_event_stream_test: simplify quotingGravatar Klaus Aehlig2017-09-18
| | | | | | | | | ...by quoting the delimiter of the here-documents, instead of the documents themselves. This is possible as the here-documents are constants in that test (not depending on the test setup). Change-Id: If272060ce9f6384821e4bd0bd9033925bd1efe9c PiperOrigin-RevId: 169080394
* BEP: Upon missing test targets, still generate a finished eventGravatar Klaus Aehlig2017-09-15
| | | | | | | | If a test command is aborted as no tests are found, still generate a BuildComplete event in the sequence of build events to properly report the exit status. Change-Id: Id811a116b309a26e67332947b3a5c66363b1ce9c PiperOrigin-RevId: 168703240
* BEP: always close stream, even if aborted due to missing testsGravatar Klaus Aehlig2017-09-12
| | | | | | | | | | If testing is requested, but no tests are found, the build is aborted. Ensure that even in this case the steam of build events is internally closed (i.e., all announced events are reported, the last event is marked as such). Change-Id: I88763ed6ccd7793deedbcb3428df7e8d289efa23 PiperOrigin-RevId: 168364127
* Unbreak discard_graph_edges_test.Gravatar philwo2017-09-12
| | | | PiperOrigin-RevId: 168220770
* Add a new toolchain type for c++. In order to do this, ↵Gravatar cpeyser2017-09-08
| | | | | | | | 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: 167901210
* Drop lower limit for RuleConfiguredTarget in object-counting test to account ↵Gravatar pcloudy2017-09-05
| | | | | | | | for Linux platforms. Fix discard_graph_edges_test.sh PiperOrigin-RevId: 167568133
* BEP: Add TargetConfigured events also for aspectsGravatar Klaus Aehlig2017-09-01
| | | | | | | | | Adding an event about which completed aspects to expect allows for earlier feedback of what the aspect is doing. It also allows consumers of the build event stream to prepare for the TargetCompleted events of the aspect. Change-Id: I29ef15472867a7169222e0394c7fe061fd1d2994 PiperOrigin-RevId: 167248206
* Automated rollback of commit 964f0a5d83fe7958236c9eb0be619f553d488748.Gravatar cpeyser2017-09-01
| | | | | | | | | | | | *** Reason for rollback *** Breaks rules_go CI *** Original change description *** Bazel c++ rules depend on a c++ toolchain. PiperOrigin-RevId: 167191667
* Bazel c++ rules depend on a c++ toolchain.Gravatar cpeyser2017-09-01
| | | | PiperOrigin-RevId: 167147239
* In terse test_summary, skip no-status testsGravatar Klaus Aehlig2017-08-30
| | | | | | | | | If there is a build failure, don't clobber the terse test summary by naming all the (usually many) tests that were skipped due to this failure. Change-Id: I6daae3efb1594c2b1018f87a50cf63949a34535b PiperOrigin-RevId: 166983264
* Automated rollback of commit 9d5bce66280094c0531ddfde2752e596d0d78c79.Gravatar plf2017-08-30
| | | | PiperOrigin-RevId: 166966182
* Move default value & converter finding logic to the OptionDefinition class.Gravatar ccalvarin2017-08-30
| | | | | | | | | | | Removes some duplicate computation by memoizing the results. Consolidates caching into a single optionDefinition object, instead of having multiple caches that go from the option name to different parts of what defines an option. Fly-by cleanup of OptionDescription's contents, all contents that are statically defined as part of an option are in OptionDefintion, while expansion data, which depends on the existence of other options, is more clearly stored separately. Will move the converter-to-option type matching sanity checks to a compile time check in a later change. RELNOTES: None. PiperOrigin-RevId: 166912716
* 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
* 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
* 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
* 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
* 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
* 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
* Add a --build_runfile_manifests flag which controls production ofGravatar Googler2017-08-22
| | | | | | | | foo_test.runfiles_manifest files. These are the largest local outputs in many builds, and unnecessary for remote test execution. RELNOTES: New --build_runfile_manifests flag controls production of runfiles manifests. PiperOrigin-RevId: 166001477
* When a worker can no longer be used, because one or more of its files on ↵Gravatar philwo2017-08-17
| | | | | | | disk have changed since it was launched, print *which* files have changed. RELNOTES: Improved logging when workers have to be restarted due to its files having changed. PiperOrigin-RevId: 165419664
* Send Bazel startup options to server.Gravatar ccalvarin2017-08-16
| | | | | | | | | | | Send the startup options tagged with their origin so that the server has correct information about the command line as the client received it. Removes the unconditional stderr printing of all bazelrc startup options in the bazel client. Instead, the startup options are sent to the server and the same informational printing is gated on the --announce_rc option. This avoids unconditional log spam to stderr early in startup. If the server is unreachable or there are errors parsing startup options, the message is still printed to stderr. Fixes https://github.com/bazelbuild/bazel/issues/2530. RELNOTES: --announce_rc now controls whether bazelrc startup options are printed to stderr. PiperOrigin-RevId: 165211007
* BEP: Make tags available in TargetConfigured eventGravatar Klaus Aehlig2017-08-14
| | | | | | | | | | | | The tags associated with a rule is information that is useful as information about the target, independent of the configuration. At the moment, tags cannot be configuration-dependent anyway, but even if the extend bazel it that way, the union of all possible tags is still useful information. Change-Id: Iabca0c28b0da4b13b8a62b2638a881c53cc70ccc PiperOrigin-RevId: 164996472
* BEP: move configuration-independent information to TargetConfigured eventGravatar Klaus Aehlig2017-08-11
| | | | | | | | | | Some information about a target is configuration independent and therefore can already be provided at a target level (i.e., in the TargetConfigured event). Do so, to have that information available earlier and, once the deprecation period is over, avoid redundant information in the stream. Change-Id: I8021ce3dd2a8168d409ea513190c4e3a349dbc2f PiperOrigin-RevId: 164967059
* Up the size of skylark_flag_test to "medium" to avoid timeoutsGravatar brandjon2017-08-11
| | | | | | | Fixes #3072 RELNOTES: None PiperOrigin-RevId: 164906305
* BEP: do not generate test summaries for broken testsGravatar Klaus Aehlig2017-08-02
| | | | | | | | | If a test fails to build, we obviously cannot run it. Therefore, it does not make sense to have a summary of the individual test runs. Change-Id: I0445e7a58fc5c1f4feaa592a13da1c7f9c9be083 PiperOrigin-RevId: 163866309
* Remove old intellij aspect code bundled with BazelGravatar Googler2017-07-31
| | | | PiperOrigin-RevId: 163538636
* Only report progress after a build has started.Gravatar Benjamin Peterson2017-07-31
| | | | | | | | | | | | Rather than assuming that all events are part of a build until NoBuildEvent or BuildCompleteEvent are posted, only start reporting build progress after a BuildStartingEvent or a NoBuildEvent with showProgress() true happens. This fixes https://github.com/bazelbuild/bazel/issues/3449. Change-Id: I78372a2286a4595cf3301c998be2c9036ad0f4b7 PiperOrigin-RevId: 163447622
* Remove unused module-related optionsGravatar hlopko2017-07-28
| | | | | RELNOTES: None. PiperOrigin-RevId: 163338873
* Add configuration and target label to ActionCompletedId.Gravatar Eduardo Colaco2017-07-27
| | | | | | | | This is a first step on moving the configuration checksum and target label from the ActionExecuted payload and into ActionCompletedId. Change-Id: I989c9b708cd2a4172f6483d97bc7842d9841e3a8 PiperOrigin-RevId: 163233097
* Fix bug where we incorrectly skip over subdirectories named 'external'. ↵Gravatar mschaller2017-07-27
| | | | | | We're actually just trying to skip over packages named '//external'. PiperOrigin-RevId: 163230119
* BEP: Merge all failures into the Aborted eventGravatar Klaus Aehlig2017-07-24
| | | | | | | | | In this way, for each event there can only be two event payloads for every event identifier: the expected one, and the Aborted event. The type of failure will be reported in the AbortReason enum value. Change-Id: Icce225ec156d1fc20c8facd18df13343712f775c PiperOrigin-RevId: 162911732
* Write directly to stdout when debugging in test: otherwise test log can get ↵Gravatar janakr2017-07-24
| | | | | | overwritten, losing info (http://ci.bazel.io/job/bazel-tests/899/BAZEL_VERSION=latest,PLATFORM_NAME=ubuntu_16.04-x86_64/consoleFull). PiperOrigin-RevId: 162764897
* Make all test cases pass with --noexperimental_separate_genfiles_directory.Gravatar lberki2017-07-24
| | | | | RELNOTES: None. PiperOrigin-RevId: 162715619
* Use new actions API in docs.Gravatar Dmitry Lomov2017-07-21
| | | | | Change-Id: Ibbc41193ca3f577fbbd1674e9dd1c7f04a246e93 PiperOrigin-RevId: 162612615
* Be more precise in which values we're looking for in the histogram: just ↵Gravatar janakr2017-07-20
| | | | | | GlobValue objects, not any others. PiperOrigin-RevId: 162533962
* BEP: Report configuration for all actionsGravatar Klaus Aehlig2017-07-14
| | | | | | | | | | Whenever we report an action in the build event protocol that has a configuration associated with it, report the configuration as well in the protocol (and not only the checksum, if the configuration is not that of one of the top-level configured targets). Change-Id: I9b085d5381b3c3509b4f3b99c8a77bc8fba6abfe PiperOrigin-RevId: 161789745
* build_event_stream_test: stop daemon before removing filesGravatar Klaus Aehlig2017-07-10
| | | | | | | | | | | | | | | | Bazel gets confused when files get removed where the daemon still has a handle on. By the way java closes a file (guarantees that the content is there, but the OS-level close can happen later), bazel can still have a handle on a build-event file when the test is cleaned up (but only on OSes where we cannot reliably reap the grand-children). Mitigate this by explicitly shutting down bazel before any cleaning up of the build event file. Fixes #3349. While there, also drop manual clean up that is done by the test framework anyway. Change-Id: Iec0e3d5c3f02dae496b361ef97abe5ef982ceb47 PiperOrigin-RevId: 161383286
* Restrict writing build events to a white-listed set of commandsGravatar Klaus Aehlig2017-07-07
| | | | | | | | | It is not desirable to have a build-event stream for all invocations of blaze; so restrict the BuildEventServiceModule to be only active if the executed command is in a white list of commands for which having build events is desirable. Change-Id: Id4acf9468f67b1af7fc8ea703785df5229c69258 PiperOrigin-RevId: 161207563
* Add debugging for flaky test: maybe fifo problem.Gravatar Janak Ramakrishnan2017-07-07
| | | | | Change-Id: I370310592a96889b4b69965ee0ba325337784b71 PiperOrigin-RevId: 161138809
* Make build_event_stream_test more robustGravatar aehlig2017-07-07
| | | | | | | | | | | | | ...by makeing it independent of the test executor; in particular, do not rely on the wrapper to create the test.xml files if the test fails to do so, and do not assume a particular name (e.g., remote execution might decide to call the files "remote_1.xml"). Also, make the constructor of VisibilityErrorEvent public, to allow extensions of bazel to generate visibility errors as well. RELNOTES: None PiperOrigin-RevId: 161087809
* Fix JSON expectationsGravatar Klaus Aehlig2017-07-05
| | | | | | | | With commit 97a1db383cc unnecessary whitespace in the JSON output was removed (which is a feature). Adapt the test expectation accordingly. Change-Id: I76026f45a80bc9d791833e0c37f546804052591f PiperOrigin-RevId: 160970633
* Make integration tests more portableGravatar Klaus Aehlig2017-07-05
| | | | | | | | By avoiding paths that are too specific for a given system, and bringing option arguments before non-option arguments. Change-Id: I82acae94e2d9808c9e81a85018c6a0578da8bd42 PiperOrigin-RevId: 160957203
* AspectCompleteEvent: correctly report artifacts for a failed aspectGravatar Klaus Aehlig2017-07-05
| | | | | | | | | | If an aspect completed unsuccessfully, there are no artifacts created. Internally, this is represented by the ArtifactsToBuild object being a null pointer. When asked for the built artifacts correctly handle that case and return an empty Collection. Change-Id: Ie0b0486354bb217834254518f35c97b7c9529481 PiperOrigin-RevId: 160827964