aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/shell
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
* Fix file permissions on aild_integration_test.shGravatar aehlig2017-10-09
| | | | | RELNOTES: None PiperOrigin-RevId: 171504480
* Clean up TODOs.Gravatar László Csomor2017-10-09
| | | | | | | | | | | | | | | | | | | In this commit: * buildenv.sh: restore its state to that as of commit 511c35b46cead500d4e76706e0a709e50995ceba * CommonCommandOptions.java: remove a deprecated no-op flag * WindowsPathFragment.java: implement an ASCII-only isLetter function, use that instead of Character.isLetter, because the latter returns true for some Unicode characters too * bazel_bootstrap_distfile_test: remove logging that we no longer need, since the bugfix for issue #3618 will be pushed to GitHub later today Change-Id: Ibda70219e974f0c47bc82addc647d8951f4bd701 PiperOrigin-RevId: 171498977
* Add an integration test for android_library IDL support.Gravatar Adam Michael2017-10-07
| | | | | | | This should catch breakages due to changes in the AIDL tools bundled in the SDK. Change-Id: Iaff6ce058112a57b2b8da3e00a1172ee49cfdd85 PiperOrigin-RevId: 171357883
* testenv.sh: don't run Bazel in a subshellGravatar Laszlo Csomor2017-10-06
| | | | | | | | | | | | | | | | | | | | | | | | In this commit: - testenv.sh no longer runs Bazel in a subshell - testenv.sh prints informative log messages that show the origin (testenv.sh) and the date - testenv.sh logs to $TEST_log by appending to it, not by overwriting it This change speeds up //src/test/shell/bazel:bazel_windows_example_test from ~260s to ~165s. On Windows, Bash (MSYS) waits for all subprocesses of a subshell to terminate before allowing the subshell itself to terminate too, even if some subprocesses are daemons. I think this is a bug, and it's the culprit of https://github.com/bazelbuild/bazel/issues/3148 Change-Id: If97ea6dfeb904af560b291a7acebd09e43863ab4 PiperOrigin-RevId: 171267462
* Use bundled proguard 5.3.3 instead of 4.7 from the SDKGravatar ajmichael2017-10-06
| | | | | | | | | Fixes https://github.com/bazelbuild/bazel/issues/3777 Also adds a proguard integration test so that hopefully we notice next time it breaks. RELNOTES: Updated Android proguard to 5.3.3. It now works with android-24+. PiperOrigin-RevId: 171162295
* In apple integration tests, for fat simulator builds, specify a ↵Gravatar cparsons2017-10-06
| | | | | | | | | minimum_os_version < 11.0, as they are unsupported at 11.0. Fixes https://github.com/bazelbuild/bazel/issues/3841. RELNOTES: None. PiperOrigin-RevId: 170731919
* 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
* Windows, sh tests: fix corrupt installation errorGravatar Laszlo Csomor2017-09-29
| | | | | | | Fixes https://github.com/bazelbuild/bazel/issues/3618 Change-Id: I1533088d4d51dc0510de5cd5b392edec95458057 PiperOrigin-RevId: 170458069
* Remove compilation and bundling attributes from apple_binary and ↵Gravatar cparsons2017-09-29
| | | | | | | apple_static_library. RELNOTES: apple_binary and apple_static_library no longer support compilation attributes such as 'srcs'. If this breaks any existing targets, you may migrate all such attributes to a new objc_library target and depend on that objc_library target via the 'deps' attribute of apple_binary or apple_static_library. PiperOrigin-RevId: 170373794
* Automated rollback of commit 411039319c1c67f2b9c8a7ada9e0a11d9bd4023f.Gravatar elenairina2017-09-28
| | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks coverage for android_test (N/A). Can be reproduced with unknown commit. *** Original change description *** Rollforward change of Java coverage logic. RELNOTES: None. *** Original change description *** Automated rollback of commit 8d6fc64b18c7e35b93f5c43dae1dbd2f8cae2147. PiperOrigin-RevId: 170322801
* Update bazel_apple_test to run on XCode 9.Gravatar John Cater2017-09-28
| | | | | | | Fixes #3827. Change-Id: Ie51650a3df6f40d2aa2c3ec016c00c98ce18c3de PiperOrigin-RevId: 170237678
* BEP: also report baseline coverageGravatar Klaus Aehlig2017-09-27
| | | | | | | ...as part of the TargetComplete message. Change-Id: I8aa321a2810c3926db943f32cb1811a169e34dd7 PiperOrigin-RevId: 170171458
* Refactor srcs-less android_library rules: deps -> exports.Gravatar jingwen2017-09-27
| | | | | | | | | | | This CL captures the BUILD files and macro callers of native.android_library which use deps without srcs or local resources (exports_manifest, assets_dir, resource_files, etc). Using deps to implicitly export targets will be deprecated soon; please use android_library.exports instead. Follow-up CL to this LSC by brendandouglas@: https://docs.google.com/document/d/1h2ay0i9Tyun6rJ3a7cFT3YrMar9qYoCEv9dZ_pXOSzY LSC timeline:[] RELNOTES: None. PiperOrigin-RevId: 170090131
* Add integration tests for android_sdk_repository() and ↵Gravatar jingwen2017-09-27
| | | | | | | | | | | | | | | | | | | | | android_ndk_repository() for testing invalid directory path attributes, and improve error descriptiveness. Moved AndroidRepositoryUtils logic into an abstract AndroidRepositoryFunction that Android{S,N}dkRepositoryFunction extends from. Examples of error messages: 1) Invalid NDK path ERROR: Analysis of target '//examples/android/java/bazel:hello_world' failed; build aborted: in target '//external:android/crosstool': no such package '@androidndk//': Could not read RELEASE.TXT in Android NDK: /tmp/RELEASE.TXT (No such file or directory) Unable to read the Android NDK at /tmp, the path may be invalid. Is thepath in android_ndk_repository() or ANDROID_NDK_HOME set correctly? If the path is correct, the contents in the Android NDK directory may have been modified. Please remove the NDK and download it again with the Android SDK manager. 2) Invalid SDK path ERROR: Analysis of target '//examples/android/java/bazel:hello_world' failed; build aborted: no such package '@androidsdk//com.android.support': Expected directory at /tmp/platforms but it is not a directory or it does not exist. Unable to read the Android SDK at /tmp, the path may be invalid. Is the path in android_sdk_repository() or ANDROID_HOME set correctly? If the path is correct, the contents in the Android SDK directory may have been modified. Please remove the SDK and download it again with the Android SDK manager. GITHUB: #3740 RELNOTES: None. PiperOrigin-RevId: 170068567
* 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
* Rollforward change of Java coverage logic.Gravatar elenairina2017-09-26
| | | | | | | | | | RELNOTES: None. *** Original change description *** Automated rollback of commit 8d6fc64b18c7e35b93f5c43dae1dbd2f8cae2147. PiperOrigin-RevId: 170038845
* 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
* Remove the status xml attribute from AntXmlResultWriterGravatar elenairina2017-09-26
| | | | | | | | | as it was not part of a valid junit xml schema. To cherry-pick for #3286. RELNOTES: None. PiperOrigin-RevId: 170022796
* BEP: Add coverage data to test_resultGravatar Klaus Aehlig2017-09-26
| | | | | | | | Include the coverage data file into the list of files repeorted in the test_result event in the BEP. Change-Id: Ia7b653addd5589268ce919b3e0349371dbc18bf2 PiperOrigin-RevId: 169956864
* Make local_action_cache_test.sh executable.Gravatar John Cater2017-09-25
| | | | | Change-Id: I64202a318bb352c2b473f3570243f545ab9fbdc1 PiperOrigin-RevId: 169913876
* Fix bazel_test_test by removing pollution of config with external bazelrc, ↵Gravatar Googler2017-09-25
| | | | | | | | | | | | | | | | such as from /etc/bazel.bazelrc. Fixes https://github.com/bazelbuild/bazel/issues/3727. This should not be the final fix. There are remaining issues: - This test should pass regardless of the UI used (either fix the experimental UI or fix the test to make fewer assertions). - Outside bazelrcs should not pollute the test. But this fixes the breakage. RELNOTES: N/A PiperOrigin-RevId: 169906770
* Check parameter types for methods when multiple types are allowed.Gravatar Dmitry Lomov2017-09-25
| | | | | | | | | | | | | | | Relanding https://github.com/bazelbuild/bazel/commit/17214ac78ffaec369d5d5bafe62a39730473cfaa with fixes to 'repository_ctx.download()' and 'repository_ctx.download_and_extract()'. I reviewed other usages of @ParamType annotation - I do not think there are more issues. Fixes #3714. Change-Id: I17087ef3fc2d28ab99224740a2164675a49847d3 PiperOrigin-RevId: 169896223
* Internal changeGravatar David Ostrovsky2017-09-25
| | | | PiperOrigin-RevId: 169874059
* Create AndroidManifest.xml symlink if user provides a manifest not namedGravatar jingwen2017-09-25
| | | | | | | | | | "AndroidManifest.xml". aapt requires the manifest to be named "AndroidManifest.xml" (unknown commit) This allows users to provide manifests with custom names. RELNOTES: Android rules no longer restrict the manifest file to be named "AndroidManifest.xml". PiperOrigin-RevId: 169695062
* Don't emit an undeclared outputs MANIFEST if there are no files.Gravatar Googler2017-09-25
| | | | | | | Tested manually (with a test that doesn't emit undeclared outputs), and added a test that failed before and passes after the test-setup.sh change. RELNOTES: N/A PiperOrigin-RevId: 169687782
* Add a global failure when a test is interrupted/cancelled.Gravatar elenairina2017-09-22
| | | | | | | | | | | When a timeout occurred, the current test case is interrupted and the others are cancelled. This was not reflected in any way and all tests were reported as success, even if there was a timeout and the tests were cancelled/interrupted. Also add a status xml attribute to mark if the test was completed, cancelled or interrupted. Fixes #3763 RELNOTES: None. PiperOrigin-RevId: 169665622
* Delete ios_application, ios_extension(_binary), objc_binary.Gravatar allevato2017-09-21
| | | | PiperOrigin-RevId: 169428146
* Fix unittest.bash to get the correct TEST_script path.Gravatar John Cater2017-09-21
| | | | | Change-Id: Ia250c322353638928747d99fbfdb62808a2fd838 PiperOrigin-RevId: 169417597
* Add support for writing undeclared outputs to TEST_UNDECLARED_OUTPUTS_DIR ↵Gravatar Googler2017-09-20
| | | | | | | | | | | | | | | | | | | and TEST_UNDECLARED_OUTPUTS_ANNOTATIONS_DIR to Bazel. After this change: - Any files written to the TEST_UNDECLARED_OUTPUTS_DIR directory will be zipped up and added to an outputs.zip file under bazel-testlogs. - Files will be listed in a MANIFEST file under bazel-testlogs. - Any files written to TEST_UNDECLARED_OUTPUTS_ANNOTATIONS_DIR will be concatenated together into an ANNOTATIONS file under bazel-testlogs. This provides a channel for tests to provide extra information outside of the test output itself. This is useful for things like verbose server logs. Note: The //src/test/shell/bazel:bazel_test_test target has a pre-existing breakage (see https://github.com/bazelbuild/bazel/issues/3727). But the new tests pass. RELNOTES: Tests can now write files to TEST_UNDECLARED_OUTPUTS_DIR and TEST_UNDECLARED_OUTPUTS_ANNOTATIONS_DIR and these will be reflected under bazel-testlogs. PiperOrigin-RevId: 169282528
* Expose full compile time jars in SkylarkGravatar elenairina2017-09-19
| | | | | | | | | | | There are several use cases for using full compile time jars instead of ijars (scala macros cannot use ijar, kotlin dependencies, etc). This change allows creating a provider with or without creating interface jars for compile time, exposing the right full/interface jars on target[JavaInfo].compile_jars and target[JavaInfo].full_compile_jars. For more details see https://github.com/bazelbuild/bazel/issues/3528. Fixes #3528 RELNOTES: java_common.create_provider is now supported with creating ijars by default. This introduces incompatibilities for existing users. Please set use_ijar=False if you don't want to use ijars. PiperOrigin-RevId: 169222793
* Java Launcher: Create classpath jar with a random nameGravatar Yun Peng2017-09-18
| | | | | | | | | | | | | | | When the classpath is too long, the launcher creates a jar file to pass the classpath value. This change makes the jar file's name random. It fixed the bug that when running multiple instances of the same java binary, they all try to create the same classpath jar file. For example, when running java_test with shard_count > 1. Also, we delete the classpath jar file after the program finishes, so that we don't leave any garbages behind. Change-Id: I67926b3ef76dcb1806797e977ecaa7c6763c5cf2 PiperOrigin-RevId: 169087032
* 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
* bazel_bootstrap_distfile_test: fix unbound varsGravatar laszlocsomor2017-09-18
| | | | | | | | | | When printing envvars, use "${FOO:-}" instead of "${FOO}", so the test won't fail if an envvar is undefined. See https://github.com/bazelbuild/bazel/issues/3618 PiperOrigin-RevId: 169059836
* Move PrenotCalculator from Bazel examples to rules_apple examples.Gravatar allevato2017-09-18
| | | | | | This also migrates the example to the new rules_apple ios_application rule, since the native Bazel rule is being deleted. PiperOrigin-RevId: 168902357
* 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
* bazel_bootstrap_distfile_test: fix breakageGravatar laszlocsomor2017-09-13
| | | | | | Fix bad `date` invocation submitted in unknown commit. PiperOrigin-RevId: 168517542
* bazel_bootstrap_distfile_test: add loggingGravatar laszlocsomor2017-09-13
| | | | | | | | | | | | Add logging to bazel_bootstrap_distfile_test.sh and to buildenv.sh in hopes of catching this bug: https://github.com/bazelbuild/bazel/issues/3618 For justification, see: https://github.com/bazelbuild/bazel/issues/3618#issuecomment-328857891 RELNOTES: none PiperOrigin-RevId: 168508723
* 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
* Remove swift_library and tests, lives in the apple rules repo now.Gravatar thomasvl2017-09-11
| | | | | RELNOTES: The swift_library rule that is distributed with Bazel has been deleted. Users who wish to compile Swift should use the rules in https://github.com/bazelbuild/rules_apple instead. PiperOrigin-RevId: 168032330
* 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
* Move bazel_determinism_test to bazel-slow-test jobGravatar Damien Martin-Guillerez2017-09-08
| | | | | | | | | Now every test labelled slow will be moved to that job. Issue bazelbuild/continuous-integration#98. Change-Id: I37baa0f4233201557493a8fac643e571026fcd93 PiperOrigin-RevId: 167854935
* Update PackageLookupFunction to report the corrected label when aGravatar John Cater2017-09-07
| | | | | | | | | package crosses into a local repository. Part of #3553. Change-Id: Ib21de0a1843e72055c53ef34922d69290aee72ed PiperOrigin-RevId: 167726591
* Returns repository does not exists when referring to a bind rule...Gravatar Damien Martin-Guillerez2017-09-07
| | | | | | | | | | | | | ...or any other non repository rule. Using a bind rule as the name of the repository was returning a strange error "could not find handler for bind rule" which was not useful, so was replaced by a crash. Fixes #3664 Change-Id: Id0711470e6a1ab9267e05eb273900b18d0a27d6b PiperOrigin-RevId: 167706825
* More BUILD file refactorings.Gravatar philwo2017-09-06
| | | | | | | | | Split collect, concurrent, vfs, windows into package-level BUILD files. Move clock classes out of "util", into their own Java package. Move CompactHashSet into its own Java package to break a dependency cycle. Give nestedset and inmemoryfs their own package-level BUILD files. PiperOrigin-RevId: 167702127
* Add java_common.build_ijar.Gravatar elenairina2017-09-06
| | | | PiperOrigin-RevId: 167699728
* Support warn/default strict deps in java_common.compile.Gravatar elenairina2017-09-06
| | | | | | Fixes #3626. PiperOrigin-RevId: 167687039
* Change check for Android SDK in shell integration tests.Gravatar ajmichael2017-09-06
| | | | | | | | | | tools/android is no longer part of the SDK, they've switched to tools/bin/sdkmanager. Furthermore, on Windows it is tools/bin/sdkmanager.bat. Instead, just check if the sdk directory exists. RELNOTES: None PiperOrigin-RevId: 167573133