| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
testenv.sh no longer runs "bazel info bazel-bin"
and "bazel info bazel-genfiles", because the only
test that needs this information is
bazel_sandboxing_test.sh
This saves 1-2 seconds on Windows in every shell
test setup.
Also, on Windows we can safely run Bazel in a
subshell since https://github.com/bazelbuild/bazel/issues/3148 is fixed.
Change-Id: If9873221d536f1acfd4849afbfc83b94311de2bd
Closes #5707.
Change-Id: I04e37c4d5f794017a6050253d8d1b8a8ac43a6d1
PiperOrigin-RevId: 206714921
|
|
|
|
|
|
| |
Fixes #5439.
PiperOrigin-RevId: 203917717
|
|
|
|
|
|
|
|
|
|
| |
Sources:
https://github.com/bazelbuild/bazel-blog/commit/846478d6943162f4c4d7d50001069e0ca7b2ec28
https://github.com/bazelbuild/bazel-blog/commit/aacaa25314678c08772372b3d46697f7963bb201
RELNOTES: None.
PiperOrigin-RevId: 203763253
|
| |
|
|
|
|
| |
This reverts commit a2cac548616e6e6f433df27146c2971f352a4041.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Port //src/test/shell/bazel:rule_test_test to
Windows:
- Use the Bash runfiles library (in @bazel_tools)
- Update testenv.sh to retry failed "rm" commands
because often they attempt to delete a Bazel's
output directory that is still in the middle of
shutting down, and just needs a bit of time to
finish doing so.
See https://github.com/bazelbuild/bazel/issues/4292
Change-Id: I6a7687d15ae3af2ca605149fa75ff48bf2fb89c8
Closes #5490.
Change-Id: I6a7687d15ae3af2ca605149fa75ff48bf2fb89c8
PiperOrigin-RevId: 202903547
|
|
|
|
|
|
|
| |
In preparation of removing tools/defaults, I realized that creating empty build file under tools/defaults folder is unnecessary.
RELNOTES:none
PiperOrigin-RevId: 202635096
|
|
|
|
|
|
|
|
| |
This is the first PR for my Arm64 test cleanup.
Closes #5457.
PiperOrigin-RevId: 202492291
|
|
|
|
|
|
| |
Closes #5403.
PiperOrigin-RevId: 201007405
|
|
|
|
|
|
|
|
|
| |
Change-Id: I1039371e326dc260f2e70b32c9f4e2fd0dc0d7a6
Closes #5395.
Change-Id: I002ba4f0944594ab62a7dd7a3ed4b4e7438328c0
PiperOrigin-RevId: 200686443
|
|
|
|
|
|
|
|
|
|
|
| |
See https://github.com/bazelbuild/bazel/issues/4930
Change-Id: I148c0b1e4baa8ff44d86a6ee196bea7e9058320f
Closes #5387.
Change-Id: Iba32f21ff6cad1b538c72cfd08ce24846843c124
PiperOrigin-RevId: 200554084
|
|
|
|
|
|
|
|
|
|
|
| |
- Updates the embedded JDK to Azul Zulu 9.0.7
- All integration tests use Bazel with the embedded JDK
Also updated: http://storage.googleapis.com/bazel-mirror/openjdk/index.html
Closes #5312, #5314, #5315
PiperOrigin-RevId: 200055008
|
|
|
|
|
|
|
|
|
|
|
|
| |
...and point --experimental_distdir there, so that offline builds
are again possible out of the distribution archive.
Related #5175.
Fixes #5202.
To be cherry-picked for #5056.
Change-Id: I634296e9d83e4e18ed966b42f35acc63061259d9
PiperOrigin-RevId: 197866998
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Don't ask me how so many things can be wrong in a single test...
Progress towards #4770.
FYI @rupertks @buchgr @ulfjack
## Replace 25000 invocations of perl with a single "sha256sum"
This speeds up the test by a factor 2x on my iMac (before: 1200s, now: 600s).
On macOS, "shasum" is a Perl script. Instead of simply passing all input files to the thing at once, we were invoking it once per file. This means roughly 25,000 invocations of Perl per test run. And it's even worse - it wasn't just a call to that Perl script, it was wrapped in a "cat | shasum | cut" pipeline, resulting in silent data loss when you accidentally passed multiple input files to the thing, 75,000 processes being spawned just to compute hashes and losing the file name of what was actually hashed. WTF.
Also, we were using SHA256 to essentially verify that two directory trees are equal. For this purpose, relying on SHA1 should be absolutely fine - and that is, provided by a good native implementation, four times faster than `shasum`. It saves another 10 seconds of the overall run.
With this change, the test also prints the result of a failed determinism check in an easier to read format "filename hash" instead of "hash filename" and on top of that, it also prints the filenames in the diff on macOS, which was missing formerly. Without this, it was basically impossible to debug failures of this test on macOS, as you couldn't see *which files were different*. You had *one* job, bazel_determinism_test.
Before:
```
-- Test log: -----------------------------------------------------------
--- /private/var/tmp/_bazel_buildkite/30004132848cb6cbb0d8bc124cd9712b/bazel-sandbox/8820973750646175047/execroot/io_bazel/_tmp/e503f3f3df14b71e247bc3d7d9bf3608/sum1 2018-03-28 18:00:43.000000000 +0000
+++ /private/var/tmp/_bazel_buildkite/30004132848cb6cbb0d8bc124cd9712b/bazel-sandbox/8820973750646175047/execroot/io_bazel/_tmp/e503f3f3df14b71e247bc3d7d9bf3608/sum2 2018-03-28 18:10:34.000000000 +0000
@@ -10417,0 +10418 @@
+ecd53ba69a8d479d3fa4234e959f869cd10f7ebc68860d2b7915879f8b8b2c54
@@ -10605 +10605,0 @@
-f1954b59039b74d0a0ee3b2bced748604b95b8455a5bf80489296bd81878a5c8
------------------------------------------------------------------------
```
Now (I artificially introduced non-hermeticism to show how a failure would look like):
```
-- Test log: -----------------------------------------------------------
--- /private/var/tmp/_bazel_philwo/7a01905b4627ca044e5e3f5ad5b14d26/bazel-sandbox/5464595340038418595/execroot/io_bazel/_tmp/e503f3f3df14b71e247bc3d7d9bf3608/sum1 2018-03-30 17:12:39.000000000 +0000
+++ /private/var/tmp/_bazel_philwo/7a01905b4627ca044e5e3f5ad5b14d26/bazel-sandbox/5464595340038418595/execroot/io_bazel/_tmp/e503f3f3df14b71e247bc3d7d9bf3608/sum2 2018-03-30 17:17:27.000000000 +0000
@@ -903 +903 @@
-bazel-bin/src/bazel 31d811338ca364f0631560dd4d29406dd6a778ce
+bazel-bin/src/bazel 8f009173894730b00a1d1d6349af7d10f4d21cf3
@@ -5656 +5656 @@
-bazel-bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar f5ec8c4415ad8ecdc0385affc68f2dd4dbf241ef
+bazel-bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar 9899ae35cf431087a34a830bfdaf19d99616689c
@@ -8343 +8343 @@
-bazel-bin/src/main/java/com/google/devtools/build/lib/worker/_javac/worker/libworker_classes/com/google/devtools/build/lib/worker/WorkerFactory.class 780baa17c19ef99ef0b9291db1791ed8e0f1b231
+bazel-bin/src/main/java/com/google/devtools/build/lib/worker/_javac/worker/libworker_classes/com/google/devtools/build/lib/worker/WorkerFactory.class d45c14f09e73e7fcdf01f96aa32646c87b704bc2
@@ -8359 +8359 @@
-bazel-bin/src/main/java/com/google/devtools/build/lib/worker/libworker.jar 60e3afbfec17da7e44c1f0f61cf2a446196717be
+bazel-bin/src/main/java/com/google/devtools/build/lib/worker/libworker.jar 70f557e87d1b32b2e46c79554fe6bf3b89aeaf6e
@@ -11343 +11343 @@
-bazel-genfiles/src/install_base_key 3fad754e4ea19bd1120df5bf16e1f39372e6b9fe
+bazel-genfiles/src/install_base_key 7d7e8b62493912c5ec153032e104640e3980e6b3
@@ -11376 +11376 @@
-bazel-genfiles/src/package.zip 1ce3431b021ca338806162eca72ff84118001df5
+bazel-genfiles/src/package.zip 65f4801d91bbe10cba0d2d4d55c7cf319cd6722d
------------------------------------------------------------------------
test_determinism FAILED: Non-deterministic outputs found! .
```
## Remove obsolete check for BAZEL_TEST_XTRACE
That string does not appear anywhere in our repo, except for these two lines in the test, so there's no point in checking for it.
## Remove obsolete check for Java 7
That was about time.
## Performance improvements and usability fixes
- There's no need to use mktemp to create a unique directory under TEST_TMPDIR, as every test suite has its own TEST_TMPDIR.
- There's no need to remove stuff, as this will just degrade performance and make debugging harder. The surrounding Bazel or system will clean up later.
- There's no need to copy bazel-bin/src/bazel to ./bazel1 before calling it, as you can just call the built bazel from its original location.
- There's no need to run "bazel clean" before the second "bazel build" invocation - it's better to just use two separate output_bases. This is faster and also makes debugging easier, as you can compare the two output_bases in case of a test failure.
- There's no need to call "diff" twice - we can just save the output immediately in the `if` block.
Closes #4945.
PiperOrigin-RevId: 191118833
|
|
|
|
|
|
|
| |
Fixed https://github.com/bazelbuild/bazel/issues/4722
RELNOTES: None
PiperOrigin-RevId: 187443457
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove most of the hardcoded, Windows-only envvars
from testenv.sh:
- BAZEL_VC and BAZEL_PYTHON: Bazel can autodetect
these
- TMP/TEMP/TMPDIR and TEST_TMPDIR: Bazel sets
these automatically
As for BAZEL_SH, we can just get bash's path using
cygpath. We know there is a bash since this is
already inside a bash script.
Also, use `rlocation` for some of the the runfile
lookups.
Change-Id: Ib35d285ec0cbb88cb5d603a4eb0f3386f3c2033b
PiperOrigin-RevId: 184253597
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add logging to bazel_bootstrap_distfile_test in
case it is running on Windows. The logging will
help collect basic performance stats.
Also remove the %N placeholder from `date` format
string in the log messages, because macOS doesn't
support it.
See https://github.com/bazelbuild/bazel/issues/4503
Change-Id: Idf00bf1512d02a793b27e1cc761fbcd630e79618
PiperOrigin-RevId: 183642578
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We'll just replace them with either native support for running tests inside
Docker containers on CI or with VMs running the operating system.
This gets rid of the "let's download 8 GB of Docker images" step when running
`bazel build //...`.
RELNOTES: None.
Closes #4506.
PiperOrigin-RevId: 183078052
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Breaks C++ on gcc 4.8.4 (specifically, TensorFlow: https://github.com/bazelbuild/bazel/issues/4474)
Fixes #4474
*** Original change description ***
When linking mostly-static Linux binaries, link libstdc++.a explicitly.
This allows libstdc++ to be statically linked, which is normally only
possible when invoking GCC as `g++` with the `-static-libstdc++` flag.
Fixes https://github.com/bazelbuild/bazel/issues/2840
See https://github.com/envoyproxy/envoy/issues/415 for additional
background and context.
cc @htuch (for Envoy) and @calpeyser @hlopko (who I talked to earlier about this)...
***
RELNOTES: None.
PiperOrigin-RevId: 182519445
|
|
|
|
|
|
|
| |
...as it breaks shell tests
Change-Id: I191ec7c0f36832ff064af0b756a8c8fb41eb2a87
PiperOrigin-RevId: 182509548
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added tests for checking JavaExportsProvider state.
Refactored logic working with collection in favor of using Streams to improve readability.
All other providers will be implemented in next CLs.
previous CL with JavaCompilationArgsProvider implementation is https://github.com/bazelbuild/bazel/commit/32dff21d00ad7d1bdf50e8761d675a6e7e002de9,
JavaSourceJarsProvider : https://github.com/bazelbuild/bazel/commit/5bd53cb609480ca896ca2d011f415b424c63ce63
RELNOTES:none
PiperOrigin-RevId: 182342490
|
|
|
|
| |
Change-Id: I05fa85967317c4581081adfc620e24a7c6322669
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Argument mixes string and array. Use * or separate argument.
- Quote the grep pattern so the shell won't interpret it.
- Use "${var:?}" to ensure this never expands to /* .
- > is for string comparisons. Use -gt instead.
- Quote the parameter to -name so the shell won't interpret it.
Closes #4163.
PiperOrigin-RevId: 179042046
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows libstdc++ to be statically linked, which is normally only
possible when invoking GCC as `g++` with the `-static-libstdc++` flag.
Fixes https://github.com/bazelbuild/bazel/issues/2840
See https://github.com/envoyproxy/envoy/issues/415 for additional
background and context.
cc @htuch (for Envoy) and @calpeyser @hlopko (who I talked to earlier about this)
I'm only doing this in the Linux toolchain because MacOS doesn't do static linking of system libs anyway, and I don't know enough about Windows or FreeBSD to test on those platforms.
Closes #4031.
PiperOrigin-RevId: 178762357
|
|
|
|
|
|
|
|
|
| |
If a rule needs these template variables, it will need to declare a dependency on them in the future by adding @bazel_tools//tools/jdk:current_java_runtime to its toolchains= attribute.
RELNOTES[INC]: In order to access the template variables $(JAVA) and $(JAVABASE), @bazel_tools//tools/jdk:current_java_runtime needs to be added to the toolchains= attribute from now on.
RELNOTES: None.
PiperOrigin-RevId: 178070807
|
|
|
|
|
|
|
| |
//third_party/protobuf:protoc dependency to process_wrapper_test.
RELNOTES: None.
PiperOrigin-RevId: 177399066
|
|
|
|
|
|
|
|
| |
see #4023
Closes #4051.
PiperOrigin-RevId: 177279457
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Fixes https://github.com/bazelbuild/bazel/issues/3618
Change-Id: I1533088d4d51dc0510de5cd5b392edec95458057
PiperOrigin-RevId: 170458069
|
|
|
|
|
| |
Change-Id: I087eab43e321f99a17bbe442abdebc8711a73801
PiperOrigin-RevId: 166468950
|
|
|
|
|
|
|
|
|
| |
- Test if hash(bazel1) == hash(bazel2)
This ensure that the build of bazel is a fixed point.
Change-Id: I422dfc7ec5b95aa054a2677e59427cbd8cd4ef01
PiperOrigin-RevId: 166180529
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
./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
|
|
|
|
|
| |
Change-Id: If9373f81193050009432759da6299f1382e587ec
PiperOrigin-RevId: 165994437
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** 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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
VS2015.
This makes our Windows shell tests work on Windows systems where only VS2017 is installed.
PiperOrigin-RevId: 157573095
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Change-Id: I23e38767e18a90b2262a38bf8f4b347e06d1de8d
PiperOrigin-RevId: 155630560
|
|
|
|
| |
PiperOrigin-RevId: 154078281
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 149015634
MOS_MIGRATED_REVID=149015634
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Broke JDK7 tests
*** Original change description ***
Code clean-up
--
PiperOrigin-RevId: 149005807
MOS_MIGRATED_REVID=149005807
|
|
|
|
|
|
| |
Fixes #2591
Change-Id: I7038b71811c54d5ece1c0993052abdffc9d0de96
|
|
|
|
|
|
|
|
| |
--
Change-Id: Ia6c94304fded25de48eda2060c5ec11368ff172c
Reviewed-on: https://cr.bazel.build/8991
PiperOrigin-RevId: 148286095
MOS_MIGRATED_REVID=148286095
|
|
|
|
|
|
| |
https://github.com/google/error-prone-javac/archive/9-dev-r3297-3.zip
Change-Id: I78b073c8db4a525d19b73650ed8d3a12b10ff86a
|