aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/shell/testenv.sh
Commit message (Collapse)AuthorAge
* 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
* 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
* 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
* testenv.sh,Windows: support VC BuildTools 2017Gravatar László Csomor2017-08-25
| | | | | Change-Id: I087eab43e321f99a17bbe442abdebc8711a73801 PiperOrigin-RevId: 166468950
* 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
* Make the srcs test be a Bazel testGravatar Damien Martin-Guillerez2017-08-23
| | | | | | | | | | | | | | | | ./compile.sh srcs has been broken at several time because this test cannot run on our internal presubmit (more precisely, don't see most breakage on our internal presubmit). Making this test a Bazel test should fix that at the same time reducing the scope of ./compile.sh (with the other move of the determinism test, this make compile.sh being only the bootstrapping script). To do so, we fetch the list of sources in the repository through a skylark repository and use genquery to interrogate the list of sources in //:srcs filegroup. Change-Id: If83af28a366cc0c52a7327ce9ed2489c7e88532f PiperOrigin-RevId: 166064682
* Update javac version to 9-dev-r4023-3Gravatar Liam Miller-Cushon2017-08-22
| | | | | Change-Id: If9373f81193050009432759da6299f1382e587ec PiperOrigin-RevId: 165994437
* Automated rollback of commit c3e0660bf8d5c6e32ae817f8a3f52c7fc6bf039e.Gravatar dmarting2017-07-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Rollforward with fix *** Original change description *** Automated rollback of commit e5f970906594d9097bb7c3736b2de1750cc8655f. *** Reason for rollback *** Break apple test on darwin. *** Original change description *** Refactor docker tests to be buildable without docker. This make this build a bit non-deterministic since the way it will be built depend on wether docker is installed or not. We now use the docker_pull from bazelbuild/continuous-integration to generate the base docker images and generate a fake docker binary that j... *** PiperOrigin-RevId: 162731090
* Move the docker tests in src/test/dockerGravatar dmarting2017-06-27
| | | | | | | | | | | | This is a better location and tools/cpp is packaged in embedded_tools that make the test ends-up in embedded_tools, which is requiring network access to build embedded_tools! Side-effect: have to correctly mock the bazel workspace file on a couple of tests. This is blocking on https://bazel-review.googlesource.com/c/12350/ PiperOrigin-RevId: 160265524
* Minor Bash improvementsGravatar Androbin2017-06-27
| | | | | | | | | | | | | | | | | Based on output of static analysis tool. https://github.com/koalaman/shellcheck/wiki/SC2166 https://github.com/koalaman/shellcheck/wiki/SC2207 https://github.com/koalaman/shellcheck/wiki/SC2145 https://github.com/koalaman/shellcheck/wiki/SC2001 https://github.com/koalaman/shellcheck/wiki/SC2129 https://github.com/koalaman/shellcheck/wiki/SC2128 https://github.com/koalaman/shellcheck/wiki/SC2004 https://github.com/koalaman/shellcheck/wiki/SC2048 Closes #3162. PiperOrigin-RevId: 160261247
* java_stub_template: remove cygpath callGravatar Laszlo Csomor2017-06-06
| | | | | | | | | | | | | | | | | | Remove the cygpath call on non-Windows platforms, that was recently added by 102ce6ddc04063d26165c6a2167059f2348026bf Also add a test for Bazel's Java launcher. Also update the testenv.sh:cleanup method to wait for Bazel to shut down, don't give up immediately if it could not clean up the inner Bazel's temp dir. Fixes https://github.com/bazelbuild/bazel/issues/3092 See https://github.com/bazelbuild/bazel/issues/3069 Change-Id: I82b1026a60056f340caa53a59b6f2ec8a1397ef3 PiperOrigin-RevId: 158139846
* testenv.sh: Use Visual Studio 2017 if it is installed, otherwise fallback to ↵Gravatar philwo2017-05-31
| | | | | | | | VS2015. This makes our Windows shell tests work on Windows systems where only VS2017 is installed. PiperOrigin-RevId: 157573095
* Remove references to ANDROID_SDK_API_LEVEL from CIGravatar Adam Michael2017-05-11
| | | | | | | | | ANDROID_SDK_API_LEVEL was previously set by a script that parsed that platforms/ directory of the SDK. Now this functionality is handled by android_sdk_repository which autodetects the available API levels. Change-Id: Ifbbc5499444f465929b9d70bf488ff5ba3c4cded PiperOrigin-RevId: 155747062
* Update javac version to 9-dev-r4023-2Gravatar Liam Miller-Cushon2017-05-10
| | | | | Change-Id: I23e38767e18a90b2262a38bf8f4b347e06d1de8d PiperOrigin-RevId: 155630560
* Update to javac9-r4023Gravatar cushon2017-04-25
| | | | PiperOrigin-RevId: 154078281
* Small shell fixed to cleanup distfile testingGravatar Stephen Twigg2017-04-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix permissions issue in testenv.sh to clarified chmod on tools/jdk/BUILD when copying tools into new workspace: Original script always tried to append but only set it to be writable after the copy when extra BUILD.* files were available. Exported is_absolute in test-setup.sh: rlocation, which is called by tests to properly locate bazel, itself calls is_absolute. This would generally cause a (presumably recoverable) error since most tests continue to call a bazel properly. However, tests that are inspecting the error log will fail due to the message error. Note, that not all tests pass yet. Also getting an issue with: * scripts/release/testenv.sh : line 38 (file doesn't exist) * in test_delete_tree_in_unwritable_dir, "fails on first compilation: due to mkdir: cannot create directory 'bazel-out/local-fastbuild/genfiles/x/unwritable/somedir' * test_run_under_path 'occasionally' fails to fail (bazel_test_test.sh:197) Change-Id: I957a346d320070a310dee4076cc9349ed1e140e1 PiperOrigin-RevId: 152247475
* windows: Improve env var handling of shell integration tests.Gravatar Philipp Wollermann2017-03-20
| | | | | | | | | | | | | | | | | | | | | | Use a unique TEST_TMPDIR for each running test on Windows, too. The old behavior caused shell tests to share the same TEST_TMPDIR, which caused conflicts when multiple tests were run in parallel. Set Bazel's TEST_TMPDIR root on Windows to c:/temp by default in TestStrategy. This avoids tripping the 260-character limit for paths. We still have to keep the override in testenv.sh for the time being, because Bazel's tests are often run with the latest released Bazel and thus we have to wait for a new Bazel release before we can remove the TEST_TMPDIR override from testenv.sh. Once that is done, the flag --test_tmpdir should also magically start working on Windows. Move the Python detection logic out of bazel_windows_example_test.sh into testenv.sh. This is better than copying that code into every new test's set_up method. -- PiperOrigin-RevId: 150433265 MOS_MIGRATED_REVID=150433265
* Rollback of commit c3102b722af6fba2a67fdfed55426471c0927ab8.Gravatar Damien Martin-Guillerez2017-03-03
| | | | | | -- PiperOrigin-RevId: 149015634 MOS_MIGRATED_REVID=149015634
* Rollback of commit 55b20c4a50642d8f1ac11cb721ecd5831f02dd76.Gravatar Damien Martin-Guillerez2017-03-03
| | | | | | | | | | | | | | *** Reason for rollback *** Broke JDK7 tests *** Original change description *** Code clean-up -- PiperOrigin-RevId: 149005807 MOS_MIGRATED_REVID=149005807
* Update to latest javac and Error ProneGravatar Liam Miller-Cushon2017-03-02
| | | | | | Fixes #2591 Change-Id: I7038b71811c54d5ece1c0993052abdffc9d0de96
* Make bazel_bootstrap_distfile_test work on WindowsGravatar Yun Peng2017-02-23
| | | | | | | | -- Change-Id: Ia6c94304fded25de48eda2060c5ec11368ff172c Reviewed-on: https://cr.bazel.build/8991 PiperOrigin-RevId: 148286095 MOS_MIGRATED_REVID=148286095
* Add javac-9-dev-r3297-3Gravatar Liam Miller-Cushon2017-02-22
| | | | | | https://github.com/google/error-prone-javac/archive/9-dev-r3297-3.zip Change-Id: I78b073c8db4a525d19b73650ed8d3a12b10ff86a
* Revert "Add javac-9-dev-r3297-3"Gravatar Damien Martin-Guillerez2017-02-16
| | | | | | | This reverts commit efe4a6d889d6a6f563a1d492530f13351ce4eef7. This commit broke several downstream project with a bug in the Java compiler, see http://ci.bazel.io/job/intellij-clion/78/BAZEL_VERSION=HEAD,PLATFORM_NAME=linux-x86_64/console
* Add javac-9-dev-r3297-3Gravatar Liam Miller-Cushon2017-02-16
| | | | | | https://github.com/google/error-prone-javac/archive/9-dev-r3297-3.zip Change-Id: I173e50f92f93009270c84ba90916e2696501f4de
* Open source java 8 desugarer.Gravatar Adam Michael2017-02-10
| | | | | | | | | | Fixes https://github.com/bazelbuild/bazel/issues/2222. RELNOTES: Support for Java 8 lambdas, method references, type annotations and repeated annotations in Android builds with --experimental_desugar_for_android. -- PiperOrigin-RevId: 147109786 MOS_MIGRATED_REVID=147109786
* Print a nicer error message when android tests can't be run Gravatar Kristina Chodorow2017-01-12
| | | | | | | | | | This was creating an invalid WORKSPACE file and then erroring out with a syntax error. -- Change-Id: I59389f565a0a4a893659df8a0c29d4a5d7377e62 Reviewed-on: https://cr.bazel.build/8171 PiperOrigin-RevId: 144324721 MOS_MIGRATED_REVID=144324721
* Clean-up of the integration test environmentGravatar Damien Martin-Guillerez2016-12-21
| | | | | | | | -- Change-Id: I670a89eac5622c38415a76bc74343ff53178c511 Reviewed-on: https://cr.bazel.build/7970 PiperOrigin-RevId: 142570044 MOS_MIGRATED_REVID=142570044
* Remove usages of build_tools_version attribute.Gravatar Adam Michael2016-12-20
| | | | | | -- PiperOrigin-RevId: 142494003 MOS_MIGRATED_REVID=142494003
* Update to javac9-r3297Gravatar Liam Miller-Cushon2016-12-08
| | | | | | -- PiperOrigin-RevId: 141396618 MOS_MIGRATED_REVID=141396618
* Remove iossim from Bazel. Gravatar Dave MacLachlan2016-10-25
| | | | | | | | | We have stopped using iossim in Bazel and replaced it with direct access to xcode's APIs. As a result we can clean up our code base by removing any references to iossim. RELNOTES:none -- MOS_MIGRATED_REVID=137165435
* Remove hack from bazel_apple_test to select an xcode that is 7-series or ↵Gravatar Chris Parsons2016-10-24
| | | | | | | | | | 8-series. The test now relies on the auto-detection skylark repository rule (querying the result for an appropriate 7-series or 8-series alternative) -- MOS_MIGRATED_REVID=137050518
* Fix and re-enable bazel_windows_example_testGravatar Yun Peng2016-10-21
| | | | | | | -- Change-Id: I09d8ef5daceb48066ec40420ad5cf21514059f4a Reviewed-on: https://bazel-review.googlesource.com/#/c/6770 MOS_MIGRATED_REVID=136825145
* Add more useful bazelrc options.Gravatar John Cater2016-10-19
| | | | | -- MOS_MIGRATED_REVID=136590448
* Set show_progress_rate_limit to -1 for all tests to ensure progress messagesGravatar John Cater2016-10-19
| | | | | | | are not lost. -- MOS_MIGRATED_REVID=136579898
* Create a proper wrapper script for executing "bazel" in the integration tests.Gravatar Luis Fernando Pino Duque2016-10-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently a call to "bazel" in an integration test means calling a (quite hidden) function in test-setup.sh which actually calls "$bazel" defined in "shell/bazel/testenv.sh" which is equal to "$(rlocation io_bazel/src/bazel)". This is extremely confusing and error prone. The new mechanism is to add a wrapper script to shell/bin called bazel and export this directory to the PATH. Moreover, not every test loads the same test environment, for instance consider how bazel_query_test loads the test environment: - Load shell/integration/testenv.sh which loads, - shell/bazel/test-setup.sh which loads, - shell/bazel/testenv.sh which loads, - shell/unittest.bash which loads, - shell/testenv.sh Again this is error prone and specially hard to understand, in fact each test writer needs to decide which of these testenv to load. This change fixes all of this by having only one testenv.sh and summarizing the test setup in integration_test_setup.sh. Namely, for any new integration test, the developer needs to load integration_test_setup to get the environment set up including the unittest framework (also it helps to attract contributions). This change also allows to open sourcing client_sigint_test: Since bazel was a function client_sigint_test was using a wrong process id to interrupt the build. The problem is that $! returns bash's id instead of the id of the process running in the background when using a function instead of an executable. A few tests needed to be adapted to the new infrastructure. -- MOS_MIGRATED_REVID=136470360
* unittest.bash: Correctly handle failures due to "errexit" in tests. This ↵Gravatar Philipp Wollermann2015-12-15
| | | | | | | will get rid of all the "ghost flakes" where tests crashed with no apparant reason printed into our logs. Now a stack trace is printed and an easy to understand failure reason, too. -- MOS_MIGRATED_REVID=110142957
* Don't print an error message about cat if a test exits abnormallyGravatar Kristina Chodorow2015-12-10
| | | | | | | | | | On calls to fail, the failure message is written to $TEST_TMPDIR/__fail. This is cat-ed to get the message, but if the test exited without calling fail then an annoying 'cat: blah/blah/blah/__fail: No such file or directory' message is printed. This throws out the error message if the cat fails. -- MOS_MIGRATED_REVID=109896051
* Rationalize copyright headersGravatar Damien Martin-Guillerez2015-09-25
| | | | | | | | | | | The headers were modified with `find . -type f -exec 'sed' '-Ei' 's|Copyright 201([45]) Google|Copyright 201\1 The Bazel Authors|' '{}' ';'` And manual edit for not Google owned copyright. Because of the nature of ijar, I did not modified the header of file owned by Alan Donovan. The list of authors were extracted from the git log. It is missing older Google contributors that can be added on-demand. -- MOS_MIGRATED_REVID=103938715
* Open-source Bazel integration testsGravatar Damien Martin-Guillerez2015-03-25
| | | | | | | | | It is a first batch of integration tests for Bazel. They tests some basic behaviors and nominal cases of Bazel rules (especially they tests the behavior of the examples provided in //examples). -- MOS_MIGRATED_REVID=89440074
* Open-source unittest.bashGravatar Damien Martin-Guillerez2015-03-18
This is part of the shell test infrastructure for Bazel. It creates test suites in Bazel shell. Handling the test ouputs efficiently for making test summaries. -- MOS_MIGRATED_REVID=88929067