aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/py
Commit message (Collapse)AuthorAge
* Java: add @bazel_tools//tools/java/runfilesGravatar Laszlo Csomor2018-08-09
| | | | | | | | | | | See https://github.com/bazelbuild/bazel/issues/5803 Change-Id: I49a2e744af667d34aedc3384629acd48641b0921 Closes #5804. Change-Id: I75f85f02384fd1d9f6ebac5fff7c96c7278f7cdd PiperOrigin-RevId: 208010815
* Only detect artifact conflicts between targets in current build.Gravatar tomlu2018-08-01
| | | | | | | Previously, two successive builds of targets A and B would fail if the two sets had conflicting actions. Now, only fail such builds if the targets from the current build has action conflicts. RELNOTES: None PiperOrigin-RevId: 206974011
* Remove old implementation for object file pathGravatar pcloudy2018-07-10
| | | | | | RELNOTES: --experimental_shortened_obj_file_path is removed. PiperOrigin-RevId: 203944948
* Windows, CROSSTOOL: Remove MSVC wrapper scripts from Bazel completelyGravatar Yun Peng2018-07-06
| | | | | | | | | | | The only reason that those python wrapper scripts still exists is for TensorFlow's Windows GPU build. As we will create a custom GPU CROSSTOOL in TF repo, we can finally remove wrapper scripts from Bazel. Closes #5526. RELNOTES: Python wrapper scripts for MSVC are removed. PiperOrigin-RevId: 203472223
* Remove support for java_runtime_suiteGravatar cushon2018-07-05
| | | | | RELNOTES: Remove support for java_runtime_suite; use alias() together with select() instead. PiperOrigin-RevId: 203393253
* Windows,python tests: fine if $JAVA_HOME is emptyGravatar laszlocsomor2018-07-05
| | | | | | | | | | | It's no longer fatal for the test if $JAVA_HOME environment variable is unset. Before this fix the test was crashing if JAVA_HOME was not set. RELNOTES: none PiperOrigin-RevId: 203350738
* python tools: ensure files are closedGravatar laszlocsomor2018-07-05
| | | | | | | | | | | Use the "with" statement to open files in various Python scripts used by Bazel, to ensure these files are closed eagerly. See https://github.com/bazelbuild/bazel/issues/5512 RELNOTES: none PiperOrigin-RevId: 203346678
* Windows CROSSTOOL: Add action_config for preprocess-assembleGravatar pcloudy2018-07-02
| | | | | | | Fixed https://github.com/bazelbuild/bazel/issues/5495 RELNOTES: None PiperOrigin-RevId: 202929359
* Windows: Native launcher now works with unicode.Gravatar Yun Peng2018-06-25
| | | | | | | | | | | | | | The native launcher can now launch Java and Bash binary in directory with non-English characters. Unfortunately, python doesn't support running python zip file under directory with non-English characters. eg. python ./??/bin.zip will still fail. See https://github.com/bazelbuild/bazel/issues/4473 Change-Id: I77fe9cdaabffc2e0d25c7097da5c0c9333a9c4a3 PiperOrigin-RevId: 201939391
* Make the embedded JDK targets the defaultGravatar Liam Miller-Cushon2018-06-18
| | | | | | Closes #5403. PiperOrigin-RevId: 201007405
* Change generated DEF file name from <target name>.def to <target name>.gen.defGravatar pcloudy2018-06-13
| | | | | | | | | This helps avoid name conflicts when users want to generate DEF files by themselves. For example, when using a genrule to do that, people naturally name the def file as <target name>.def. Fixed https://github.com/bazelbuild/bazel/issues/5357 RELNOTES: None PiperOrigin-RevId: 200354303
* Fix documentation in bazel_external_repository_test.pyGravatar pcloudy2018-06-13
| | | | | RELNOTES: None. PiperOrigin-RevId: 200351084
* Fix archive decompression with symlink on WindowsGravatar pcloudy2018-06-13
| | | | | | | | | On Windows, extracting file symlink in an archive would be performed as copy. To ensure the copy will be successful, we defer all symlink creation after all regular files are extracted. Fix https://github.com/bazelbuild/bazel/issues/5367 RELNOTES: None. PiperOrigin-RevId: 200345463
* update bazel's embedded jdk to jdk9Gravatar cushon2018-06-11
| | | | | | | | | | | - 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
* Remove usage of COMPILER_MSVC in Bazel and ijarGravatar Loo Rong Jie2018-06-11
| | | | | | | | | | | | | Convert most `COMPILER_MSVC` to `_WIN32` (as they apply to Windows platform, not MSVC compiler). Only `src/tools/singlejar/zip_headers.h` and `src/main/cpp/util/md5.h` actually need `_MSC_VER`. `COMPILER_MSVC` in `third_party/protobuf` are not removed. They can be fixed by updating dependency to newer version. /cc @meteorcloudy Closes #5350. Change-Id: Ibc131abfaf34a0cb2bd338549983ea9d28eaabfe PiperOrigin-RevId: 200019793
* Remove CC_CONFIGURE_DEBUG in test_base.pyGravatar pcloudy2018-06-07
| | | | | | | Since the issue that requires debugging has been fixed. RELNOTES: None PiperOrigin-RevId: 199628410
* Windows,testing: add query regression testGravatar Laszlo Csomor2018-06-01
| | | | | | | | | | | This test could have prevented https://github.com/bazelbuild/bazel/issues/5300 Change-Id: I02e3b723958c81e0de80f2c2130b583ea4e7f40b Closes #5310. Change-Id: I02e3b723958c81e0de80f2c2130b583ea4e7f40b PiperOrigin-RevId: 198849437
* runfiles,cc: C++ runfiles library in @bazel_toolsGravatar Laszlo Csomor2018-05-30
| | | | | | | | | | | | | | Add the C++ runfiles library to @bazel_tools//tools/cpp/runfiles:runfiles. RELNOTES[NEW]: C++,runfiles: to access data-dependencies (runfiles) in C++ programs, use the runfiles library built into Bazel. For usage info, see https://github.com/bazelbuild/bazel/blob/master/tools/cpp/runfiles/runfiles.h Change-Id: I5057a9f477289eea7244c60105e77fc71652a817 Closes #5293. Change-Id: I90cba6fa4c6595c838ae42f9d2c17548c8387e5d PiperOrigin-RevId: 198531849
* Windows: Make environment variables case-insensitive when creating Windows ↵Gravatar Yun Peng2018-05-28
| | | | | | | | | | | | process If users pass the same environment variables with different cases, the last one will override the previous ones. Fixed https://github.com/bazelbuild/bazel/issues/5285 Change-Id: Ieec857553bc54a4ad9809455687551303037e240 PiperOrigin-RevId: 198303684
* Windows: Fix link parameter file for dynamic linkingGravatar pcloudy2018-05-23
| | | | | | | | Related issue: https://github.com/bazelbuild/bazel/issues/1013 Fix https://github.com/bazelbuild/bazel/issues/5243 RELNOTES: PiperOrigin-RevId: 197715690
* CROSSTOOL: Make C++ compiled and linked artifact name pattern configurableGravatar Yun Peng2018-05-22
| | | | | | | | | | | | This change makes Bazel respect artifact name patterns specified in CROSSTOOL. Users cannot specify any arbitrary name pattern, it must ends with allowed extensions. For example, for dynamic library, it can only ends with .so, .dylib or .dll, otherwise Bazel throws an error. Change-Id: I21d9e6fa7c3a282e1a9b8ff29679b00925cddb33 PiperOrigin-RevId: 197553413
* Windows, python test: Explicitly shutdown Bazel server after test finishedGravatar pcloudy2018-05-17
| | | | | | | Fix https://github.com/bazelbuild/bazel/issues/4924 RELNOTES:None PiperOrigin-RevId: 196956075
* Add absolute path handling to Rlocation implementation used for remote ↵Gravatar Googler2018-05-07
| | | | | | | | | | | | | execution on Windows from Java launcher. Previously the test case would fail because it tried to run a path like this: C:/temp/build-1dad9dd4-ee96-40c5-b551-c8ae12461e45/bazel-out/x64_windows-fastbuild/bin/foo/foo_test.exe.runfiles/C:/openjdk/bin/java.exe Passing presubmit: https://buildkite.com/bazel/google-bazel-presubmit/builds/2558#b83dbc25-d9ad-4d49-8f78-cde9d6810741 RELNOTES: N/A PiperOrigin-RevId: 195675424
* Make runfiles usage on Windows more flexible to support remote execution.Gravatar Googler2018-04-30
| | | | | | | | | | | | | | | When trying to find a runfile on Windows: 1. First look for the runfiles MANIFEST and find runfile locations using this if it exists (current behavior). 2. If no MANIFEST file exists, look for runfiles in the runfiles directory (new behavior). As part of this, remove setting RUNFILES_MANIFEST_ONLY for the benefit of test-setup.sh. Instead of telling it what to do, it decides what to do based on the observed state of the world. Launchers still set RUNFILES_MANIFEST_ONLY for the benefit of launched programs, since some may depend on this. Fixes https://github.com/bazelbuild/bazel/issues/4962. RELNOTES: Remote execution works for Windows binaries with launchers. PiperOrigin-RevId: 194785440
* Bash,runfiles: ignore RUNFILES_MANIFEST_ONLYGravatar Laszlo Csomor2018-04-26
| | | | | | | | | | | | | | | | | | The Bash runfiles library now ignores $RUNFILES_MANIFEST_ONLY, instead it checks if the requested runfile exists either under $RUNFILES_DIR or under the path that $RUNFILES_MANIFEST_FILE associates it with. In this sense, the library now reflects "reality" (returns the file if it exists) rather than a "promise" (returns paths based on faith in envvars). See https://github.com/bazelbuild/bazel/issues/4460 Change-Id: Idbcfede0757e4b8217313b234c94c88bfd780691 PiperOrigin-RevId: 194388639
* Enable Windows remote test on CI now that Bazel 0.12 is used for CI.Gravatar Googler2018-04-23
| | | | | | | Passing run that includes "windows_remote_test": https://buildkite.com/bazel/google-bazel-presubmit/builds/2082 RELNOTES: None. PiperOrigin-RevId: 193946399
* Bash,runfiles: add testsGravatar Laszlo Csomor2018-04-23
| | | | | | | | | | | | | | | | | | The runfiles library can now discover where the runfiles are. Also remove the shebang line from the runfiles library. This script should never by executed on its own but be sourced by other Bash scripts. See https://github.com/bazelbuild/bazel/issues/4460 RELNOTES[NEW]: Bash,runfiles: use the new platform-independent library in `@bazel_tools//tools/bash/runfiles` to access runfiles (data-dependencies). See https://github.com/bazelbuild/bazel/blob/master/tools/bash/runfiles/runfiles.bash for usage information. Closes #5071. Change-Id: I94557133e76ecc927646d109e2611d711c363cdc PiperOrigin-RevId: 193923870
* Java,runfiles: add Runfiles.getEnvVars()Gravatar Laszlo Csomor2018-04-16
| | | | | | | | | | | | | | | | The new method lets Java programs export the RUNFILES_* environment variables for subprocesses, in case those subprocesses are other Bazel-built binaries that also need runfiles. See https://github.com/bazelbuild/bazel/issues/4460 Change-Id: I05c0b84db357128bc15f21a167a0d92e8d17599c Closes #5016. Change-Id: I66ca5c44067a7353b8de180a64f20c8352e3c9ec PiperOrigin-RevId: 193013289
* Add a test that builds a Windows binary remotely and runs it locally, to ↵Gravatar Googler2018-04-11
| | | | | | | | | | | validate this key use case for remote Windows builds. This is a working test case, but I plan to add more in this style to demonstrate fixes to address #4962. Note that to run this test requires a build of Bazel that includes https://github.com/bazelbuild/bazel/commit/b4545ba2b1aa4079b09a346a6d441ffa1e1b7d20 since this changed the way runfile manifests are discovered. Bazel 0.11 doesn't include this. RELNOTES: None. PiperOrigin-RevId: 192444770
* python,runfiles: move to different packageGravatar Laszlo Csomor2018-04-10
| | | | | | | | | | | | | | | | | | | | Move the Python runfiles library from `@bazel_tools//tools/runfiles:py-runfiles` to `@bazel_tools//tools/python/runfiles:runfiles` Also rename the testdata runfiles.py to foo.py. This file was not a mock runfiles library, just a client file using the runfiles library that was also called runfiles.py Fixes https://github.com/bazelbuild/bazel/issues/4878 Change-Id: I874b230c93679d4454ac91e816932c8272ecc5c7 Closes #4981. Change-Id: I908e0ab7ec61225e82f70793b1a05432e7f0b07e PiperOrigin-RevId: 192256481
* runfiles,Python: remove library from @bazel_toolsGravatar Laszlo Csomor2018-03-20
| | | | | | | | | | | | | | | | | | | | | | Temporarily remove the Python runfiles library from @bazel_tools and so prevent releasing it in Bazel 0.12.0. Motivation: https://github.com/bazelbuild/bazel/issues/4878 Fixing that bug *after* the python library is in release Bazel would be harder because users would need to update their code and BUILD files. Fixing that bug before the library is released is a lot easier because nobody depends on it yet, and we can release the library when it's in the right place. Closes #4879. Change-Id: I8adc219410571f9e2a4c8060f5b3239b957fbd5f PiperOrigin-RevId: 189744985
* windows,tests: fix //src/test/py/bazel:py_testGravatar Laszlo Csomor2018-02-23
| | | | | | | | | | | | | | | | | The test was failing because it assumed Bazel was generating a runfiles tree for py_binary. On Windows, Bazel actually builds a zip file which contains the py_binary's runfiles tree. This commit adjusts the tests to assert the zip file's contents when the test is running on Windows. Fixes https://github.com/bazelbuild/bazel/issues/4673 Change-Id: I7544bff6c1866249b8e7982b1a106202d78e10d9 PiperOrigin-RevId: 186770549
* runfiles,test: prepare for cc runfiles libraryGravatar Laszlo Csomor2018-02-20
| | | | | | | | | | | Refactor the runfiles library tests so adding the upcoming C++ runfiles library's tests will be easy. See https://github.com/bazelbuild/bazel/issues/4460 Change-Id: Ib52a0ae1f20cc870fa1d45a15644ae1666600be2 PiperOrigin-RevId: 186268961
* Increase timeout on //src/test/py/bazel/runfiles_test.Gravatar ruperts2018-02-15
| | | | | RELNOTES: None. PiperOrigin-RevId: 185879731
* runfiles library: py_binary can run java_binaryGravatar Laszlo Csomor2018-02-15
| | | | | | | | | | | | | | Add "JAVA_RUNFILES" (and "RUNFILES_DIR") to the dict that Runfiles.EnvVars() returns in the Python runfiles library, so Python programs that use the Python runfiles library in @bazel_tools can now run java_binary data-dependencies as subprocesses and the latter will find the runfiles. See https://github.com/bazelbuild/bazel/issues/4460 Change-Id: I0566f6d3c68631a1d99e67964fbe8019ee82324b PiperOrigin-RevId: 185812948
* Automated rollback of commit fa0fac2a4e8a2e5c01b8390878289d00dcc17dba.Gravatar lberki2018-02-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Remove example changes; those need to build with the last Bazel release. *** Original change description *** Automated rollback of commit 0f9c6ea574918dda094cf5423fa3822112846c30. *** Reason for rollback *** Breaks Kokoro and I accidentally submitted the change without presubmit checks. *** Original change description *** Make __init__.py files creation optional Introduce a new attribute to py_binary and py_test to control whether to create `__init__.py` or not. Fixes https://github.com/bazelbuild/rules_python/issues/55 Closes #4470. PiperOrigin-RevId: 185806241
* Automated rollback of commit 0f9c6ea574918dda094cf5423fa3822112846c30.Gravatar lberki2018-02-14
| | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks Kokoro and I accidentally submitted the change without presubmit checks. *** Original change description *** Make __init__.py files creation optional Introduce a new attribute to py_binary and py_test to control whether to create `__init__.py` or not. Fixes https://github.com/bazelbuild/rules_python/issues/55 Closes #4470. PiperOrigin-RevId: 185676592
* Make __init__.py files creation optionalGravatar Mouad Benchchaoui2018-02-14
| | | | | | | | | | | Introduce a new attribute to py_binary and py_test to control whether to create `__init__.py` or not. Fixes https://github.com/bazelbuild/rules_python/issues/55 Closes #4470. PiperOrigin-RevId: 185672243
* windows,launcher: now picks up RUNFILES_* envvarsGravatar Laszlo Csomor2018-02-14
| | | | | | | | | | | | | | The Windows native {java,py,sh}_binary launcher now picks up the RUNFILES_MANIFEST_FILE and RUNFILES_DIR envvars from the environment. This enables running such binaries even when they are data-dependencies of other binaries and thus have no runfiles (manifest or directory) of their own. See https://github.com/bazelbuild/bazel/issues/4460 Change-Id: I1bc8e30f81b9932ea7c96ded2717ac9d0600403d PiperOrigin-RevId: 185656004
* Java,runfiles,test: test finding runfilesGravatar Laszlo Csomor2018-02-09
| | | | | | | | | | | | | | | | | | | | Add a test to //src/test/py/bazel:runfiles_test that ensures that Java binaries using the Java runfiles library in @bazel_tools can find their runfiles, even if JAVA_RUNFILES and the RUNFILES_* envvars are undefined. There's already a shell script test for this in //src/test/shell/bazel:java_launcher_test, but we don't run that on Windows, shell tests are slower on Windows than on Linux anyway, and adding this test was very little work. Plus I'll need the new Bar.java file for other tests that are coming. See https://github.com/bazelbuild/bazel/issues/4460 Change-Id: Ie0fa51046c3f3a1e5ece7a6206131261a5a5b1f8 PiperOrigin-RevId: 185137988
* python,runfiles library,refactor: rename EnvVar()Gravatar Laszlo Csomor2018-02-09
| | | | | | | | | | | | | | | | Rename the runfiles library's Runfiles.EnvVar() method to EnvVars(), indicating that it may return multiple entries in the dict. In the future this method will return multiple keys, but I want to update the interface ASAP so that it is stable after it's released in Bazel 0.12.0. See https://github.com/bazelbuild/bazel/issues/4460 Change-Id: I8ab3a2a64736ff746dd96fea80ba2f5356dcfcc3 PiperOrigin-RevId: 185118832
* python,runfiles library: don't pick up TEST_SRCDIRGravatar Laszlo Csomor2018-02-08
| | | | | | | | | | | | | | | | | | | | The Python runfiles library will no longer pick up the runfiles directory from $TEST_SRCDIR. This is in accordance with the Java runfiles library, see the motivation in https://github.com/bazelbuild/bazel/issues/4598 The commit also adds a test for this functionality as well as exercising that the runfiles library can find the runfiles directory even if no RUNFILES_* envvars are exported. See https://github.com/bazelbuild/bazel/issues/4598 See https://github.com/bazelbuild/bazel/issues/4460 Change-Id: I6e4d154cdca66b29d7c6e77743cf8109638238b5 PiperOrigin-RevId: 185009819
* java,runfiles: fix tests with TEST_SRCDIRGravatar Laszlo Csomor2018-02-08
| | | | | | | | | | | | Update //src/test/py/bazel:runfiles_test to test that the Java (and Python) runfiles libraries do NOT pick up TEST_SRCDIR from their environment. See https://bazel-review.googlesource.com/c/bazel/+/37190 See https://github.com/bazelbuild/bazel/issues/4598 Change-Id: I06eb50c8cb4c93a331e51cd38ebdd7c1bcf38bba PiperOrigin-RevId: 184994372
* runfiles test: extract mock Java code to a fileGravatar Laszlo Csomor2018-02-06
| | | | | | | | | | | | | Move the mock java file in //src/test/py/bazel:runfiles_test to an actual file in the source tree. This change makes the test more readable, and the file more easily discoverable. See https://github.com/bazelbuild/bazel/issues/4460 Change-Id: I94b033f63b218554b0e0e11814fde4c13bf7cca0 PiperOrigin-RevId: 184692391
* runfiles,py: add test to run a data-dependencyGravatar Laszlo Csomor2018-02-06
| | | | | | | | | | | | Update the runfiles test's mock Python binary to run another mock Python binary and assert that the outer binary propagates the runfiles information to the inner one. See https://github.com/bazelbuild/bazel/issues/4460 Change-Id: I3bba799a376642196777f7bc988837084a53bc93 PiperOrigin-RevId: 184650962
* python,runfiles: runfiles library in @bazel_toolsGravatar Laszlo Csomor2018-02-05
| | | | | | | | | | | | | Also update the Python stub script template to set $RUNFILES_MANIFEST_FILE or $RUNFILES_DIR so the runfiles library only needs to look for those. See https://github.com/bazelbuild/bazel/issues/4460 RELNOTES[NEW]: python,runfiles: You can now depend on `@bazel_tools//tools/runfiles:py-runfiles` to get a platform-independent runfiles library for Python. See DocString of https://github.com/bazelbuild/bazel/blob/master/src/tools/runfiles/runfiles.py for usage information. Change-Id: I4f68a11cb59f2782e5203e39fe60cc66b46023a2 PiperOrigin-RevId: 184515490
* Disable the src/test/py/bazel/launcher_test test.Gravatar jmmv2018-02-02
| | | | | | | | | This test currently times out when run on our CI and we don't have a root cause yet -- but it's blocking all submissions. Thus disable it in the meantime while we investigate. RELNOTES: None. PiperOrigin-RevId: 184304422
* Automated rollback of commit 99b474de4fafd22c366fbb0a71913dc90730c730.Gravatar jmmv2018-02-02
| | | | | | | | | | | | | | | | *** Reason for rollback *** Did not help so there is no need to carry this further. *** Original change description *** tests: increase shard_count for launcher_test This test is timing out on internal CI, breaking presubmits. RELNOTES: none PiperOrigin-RevId: 184283585
* tests: increase shard_count for launcher_testGravatar laszlocsomor2018-02-02
| | | | | | | | This test is timing out on internal CI, breaking presubmits. RELNOTES: none PiperOrigin-RevId: 184270477
* Fix py_tests.py with Python3Gravatar pcloudy2018-01-31
| | | | | RELNOTES: None PiperOrigin-RevId: 183978326