aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/shell/bazel/local_repository_test.sh
Commit message (Collapse)AuthorAge
* Remove obsolete stuff related to JDK7 supportGravatar Philipp Wollermann2018-07-25
| | | | | | Closes #5626. PiperOrigin-RevId: 205991094
* Remove the legacy loading phase runnerGravatar ulfjack2018-06-08
| | | | PiperOrigin-RevId: 199775400
* Remove warning about non-canonical workspace namesGravatar Klaus Aehlig2018-04-09
| | | | | | | | | | | | While we still recommend to name repositories in canonical way, a canonical way can not always be ensured, e.g., if different versions of the same external repository have to be used. Our design for upcoming renaming repositories honors this observation. So remove the old warning about the name in an external repository's WORKSPACE file not matching the name given to it in the global WORKSPACE file; we certainly will not make this an error in the future. Change-Id: I5eef92ec61dc81d25734d71187a635024630322c PiperOrigin-RevId: 192114195
* Make error messages about illegal dependencies involving aliases clearer.Gravatar lberki2018-03-28
| | | | | RELNOTES: None. PiperOrigin-RevId: 190759949
* Update some of the tests to use the label-based load() syntax.Gravatar laurentlb2017-11-30
| | | | | RELNOTES: None. PiperOrigin-RevId: 177476726
* Make tests more independent of default valuesGravatar Klaus Aehlig2017-10-18
| | | | | | | | | | | | Some tests depend on the target pattern evaluation strategy used. Make them specify the target pattern evaluator they need. Same, if the tests depend on a particular human-readable output stream. While there, also increase shard count for the bazel_repository_cache_test to speed it up. RELNOTES: None PiperOrigin-RevId: 172328801
* Make tests more portableGravatar Klaus Aehlig2017-08-04
| | | | | | | | | By replacing uses of /bin/bash by /bin/sh, a tool which is more reliably at this location. Then, enable most of the bazel tests for FreeBSD as well. Change-Id: Ic56a1705858f1ed67d1e96e2937e9389dd1d0e36 PiperOrigin-RevId: 164241635
* Migrate tests to ctx.actions.run/run_shell.Gravatar dslomov2017-07-05
| | | | | RELNOTES: None. PiperOrigin-RevId: 160817326
* Use targets' labels' package identifier for query output=packageGravatar mschaller2017-06-22
| | | | | | | | | | Subinclude targets' packages are the package containing the load statement. Subinclude targets' labels are the bzl files they refer to. The latter has the appropriate package to display for --output=package. Fixes #3122. PiperOrigin-RevId: 159750840
* Automated rollback of commit 7dec00574aa91327693f6ba7e90bff5bc834253e.Gravatar ajmichael2017-06-22
| | | | | | | | | *** Reason for rollback *** Tickled a hidden bug in Blaze query. RELNOTES: None PiperOrigin-RevId: 159718294
* Make PackageOutputFormatter use PackageIdentifier instead of package name.Gravatar ajmichael2017-06-08
| | | | | | | Fixes #3122. RELNOTES: bazel query --output package now displays packages from external repository with the format "@reponame//package". Packages in the main repository continue to have the format "package". PiperOrigin-RevId: 158327492
* Add check to LocalRepositoryFunction that the path contains a WORKSPACEGravatar John Cater2017-04-25
| | | | | | | | | | | file. Fixes #2841. RELNOTES: Every local_repository now requires a WORKSPACE file. Change-Id: I11d50b852796b8f919b1a61c8c9b59cb78c5b724 PiperOrigin-RevId: 154179215
* Rollback of commit 4b73e972d909bcd533f2f9940f95a00b9b73bdde.Gravatar Dmitry Lomov2017-02-17
| | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Broke tests on CI: http://ci.bazel.io/job/bazel-tests/570/ *** Original change description *** Roll forward execroot change RELNOTES[INC]: Previously, an external repository would be symlinked into the execution root at execroot/local_repo/external/remote_repo. This changes it to be at execroot/remote_repo. This may break genrules/Skylark actions that hardcode execution root paths. If this causes breakages for you, ensure that genrules are using $(location :target) to access files and Skylark rules are using http://bazel.io/docs/skylark/lib/File.html's path, dirname, etc. functions. Cust... -- PiperOrigin-RevId: 147833177 MOS_MIGRATED_REVID=147833177
* Roll forward execroot changeGravatar Kristina Chodorow2017-02-16
| | | | | | | | | | | | | | | | | RELNOTES[INC]: Previously, an external repository would be symlinked into the execution root at execroot/local_repo/external/remote_repo. This changes it to be at execroot/remote_repo. This may break genrules/Skylark actions that hardcode execution root paths. If this causes breakages for you, ensure that genrules are using $(location :target) to access files and Skylark rules are using http://bazel.io/docs/skylark/lib/File.html's path, dirname, etc. functions. Custom crosstools that hardcode external/<repo> paths will have to be updated. Issue #1262. -- PiperOrigin-RevId: 147726370 MOS_MIGRATED_REVID=147726370
* Disable tests on JDK7 that are not supported by a new JavaBuilder.Gravatar Dmitry Lomov2017-02-14
| | | | | | -- PiperOrigin-RevId: 147464014 MOS_MIGRATED_REVID=147464014
* Fix private visibility for aliased targets. Gravatar Lukacs Berki2016-12-06
| | | | | | | | | | Also a drive-by improvement on some related error messages. RELNOTES[INC]: Only targets with public visibility can be bound to something in //external: . -- PiperOrigin-RevId: 141178039 MOS_MIGRATED_REVID=141178039
* Adds a check that the new local repository path exists and is aGravatar John Cater2016-10-25
| | | | | | | | | | | directory. Fixes #1981. -- Change-Id: I16a96be3f4f9de66e608b1914a2554613ddc096a Reviewed-on: https://bazel-review.googlesource.com/c/6910/ MOS_MIGRATED_REVID=137192543
* 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
* Fix test when run streamed and not sandboxed. (mkdir: File exists)Gravatar Yue Gan2016-10-07
| | | | | -- MOS_MIGRATED_REVID=135345593
* Rollback of commit 82d43279f93d95e4c41b4bc598a3cc05ddd1ae1a.Gravatar Laszlo Csomor2016-09-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks TensorFlow and other Bazel jobs on ci.bazel.io *** Original change description *** Change execution root for external repositories to be ../repo Some of the important aspect of this change: * Remote repos in the execution root are under output_base/execroot/repo_name, so the prefix is ../repo_name (to escape the local workspace name). * Package roots for external repos were previously "output_base/", they are now output_base/external/repo_name (which means source artifacts always have a relative path from their repository). * Outputs are under bazel-bin/external/repo_name/ (or similarly under genfiles). Note that this is a bit of a change from how this was implemented in the previous cl. Fixes #1262. RELNOTES[INC]: Previously, an external repository would be symlinked into the execution root at execroot/local_repo/external/remote_repo. This changes it to be at execroot/remote_repo. This may break genrules/Skylark actions that hardcode execution root paths. If this causes breakages for you, ensure that genrules are using $(location :target) to access files and Skylark rules are using http://bazel.io/docs/skylark/lib/File.html's path, dirname, etc. functions. Roll forward of bdfd58a. -- MOS_MIGRATED_REVID=133709658
* Change execution root for external repositories to be ../repoGravatar Kristina Chodorow2016-09-20
| | | | | | | | | | | | | | | | | | | | | | | Some of the important aspect of this change: * Remote repos in the execution root are under output_base/execroot/repo_name, so the prefix is ../repo_name (to escape the local workspace name). * Package roots for external repos were previously "output_base/", they are now output_base/external/repo_name (which means source artifacts always have a relative path from their repository). * Outputs are under bazel-bin/external/repo_name/ (or similarly under genfiles). Note that this is a bit of a change from how this was implemented in the previous cl. Fixes #1262. RELNOTES[INC]: Previously, an external repository would be symlinked into the execution root at execroot/local_repo/external/remote_repo. This changes it to be at execroot/remote_repo. This may break genrules/Skylark actions that hardcode execution root paths. If this causes breakages for you, ensure that genrules are using $(location :target) to access files and Skylark rules are using http://bazel.io/docs/skylark/lib/File.html's path, dirname, etc. functions. Roll forward of bdfd58a. -- MOS_MIGRATED_REVID=133606309
* Deprecation warnings for deprecated syntaxGravatar Vladimir Moskva2016-09-16
| | | | | | | | | RELNOTES: Global varaiables HOST_CFG and DATA_CFG are deprecated in favor of strings "host" and "data. Argument `cfg = "host"` or `cfg = "data"` is mandatory if `executable = True` is provided for a label. -- MOS_MIGRATED_REVID=133285197
* Fix build_file_content overwriting source filesGravatar Kristina Chodorow2016-09-14
| | | | | | | Fixes #1697. -- MOS_MIGRATED_REVID=133056813
* Make repository name warning less noisyGravatar Kristina Chodorow2016-07-01
| | | | | | | This way it won't print if the repo maintainer doesn't set the repo name. -- MOS_MIGRATED_REVID=126300205
* Rollback of commit bdfd58a8ca2ed5735d6aaa5b238fb0f689515724.Gravatar Laurent Le Brun2016-06-20
| | | | | -- MOS_MIGRATED_REVID=125160288
* Make the execution root match the runfiles tree structure for external ↵Gravatar Kristina Chodorow2016-06-17
| | | | | | | | | | | | | | | | | | | | | repositories One interesting side effect of how this is implemented is that for external repositories, bin/ and genfiles/ are combined. External repo output is under bazel-out/local-fastbuild/repo_name for each repo. Fixes #1262. RELNOTES[INC]: Previously, an external repository would be symlinked into the execution root at execroot/local_repo/external/remote_repo. This changes it to be at execroot/remote_repo. This may break genrules/Skylark actions that hardcode execution root paths. If this causes breakages for you, ensure that genrules are using $(location :target) to access files and Skylark rules are using http://bazel.io/docs/skylark/lib/File.html's path, dirname, etc. functions. -- MOS_MIGRATED_REVID=125095799
* Switch to using ../repo-name syntax for runfilesGravatar Kristina Chodorow2016-05-04
| | | | | -- MOS_MIGRATED_REVID=121475668
* Automated [] rollback of commit 857cda2c45a5cc68c3fa398311c48c571a64915d and ↵Gravatar Damien Martin-Guillerez2016-04-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | commit 790d2f6009d47fe92cf0cd92a1473bbf0141f32e. *** Reason for rollback *** Broke non-Bazel projects on ci.bazel.io Fixes #1168 *** Original change description *** Move the runfiles for external repositories to under the x.runfiles/ directory This also sets the Bazel workspace name to io_bazel_source. Fixes #848. Relevant to #1116, #1124, RELNOTES[INC]: All repositories are now directly under the x.runfiles directory in the runfiles tree (previously, external repositories were at x.runfiles/main-repo/external/other-repo. This simplifies handling remote repository runfiles considerably, but will break existing references to external repository runfiles.... *** -- MOS_MIGRATED_REVID=120535721
* Overwrite the WORKSPACE file for new_local_repositoryGravatar Kristina Chodorow2016-04-20
| | | | | | | | | | | | | This prevents an ugly warning when you do something like: new_local_repository( name = "bazel_tools", path = ".", build_file = "BUILD", ) -- MOS_MIGRATED_REVID=120271366
* Move the runfiles for external repositories to under the x.runfiles/ directoryGravatar Kristina Chodorow2016-04-20
| | | | | | | | | | | | | | | This also sets the Bazel workspace name to io_bazel_source. Fixes #848. Relevant to #1116, #1124, RELNOTES[INC]: All repositories are now directly under the x.runfiles directory in the runfiles tree (previously, external repositories were at x.runfiles/main-repo/external/other-repo. This simplifies handling remote repository runfiles considerably, but will break existing references to external repository runfiles. --- Furthermore, if a Bazel project does not provide a workspace name in the WORKSPACE file, Bazel will now default to using __main__ as the workspace name (instead of "", as previously). The repository's runfiles will appear under x.runfiles/__main__/. -- MOS_MIGRATED_REVID=120224534
* Rollback of commit 9dc24effb614f3695c962c4e1d1012e9e2aeb453.Gravatar Cal Peyser2016-04-19
| | | | | | | | | | | | | *** Reason for rollback *** looks like this is probably break [] *** Original change description *** Bind path to xcrunwrapper in workspace files. -- MOS_MIGRATED_REVID=120167193
* Bind path to xcrunwrapper in workspace files.Gravatar Cal Peyser2016-04-19
| | | | | -- MOS_MIGRATED_REVID=120124909
* Support labels in new_{http,local}_repository's build_file attributeGravatar Damien Martin-Guillerez2016-03-31
| | | | | | | Fixes #855. -- MOS_MIGRATED_REVID=118711400
* Canonicalize the name of the target itself for java indirect dep errors.Gravatar Brian Silverman2016-03-03
| | | | | | | | | | | | | | | Roll-forward of I3762e6be911b79a133a2959fce3a8bf34d183232 with fixes. Otherwise it prints the wrong message when the target which is missing a dependency is in a repository other than the default one. Second try with the new test disabled for jdk7 because that uses an old, fixed version of the code. -- Change-Id: I7e16fa874066e1b63064662df42a98784fcae233 Reviewed-on: https://bazel-review.googlesource.com/#/c/3032/ MOS_MIGRATED_REVID=116248259
* Rollback of commit 37059e4ffd23fbc10828f61ab198b98c2ca7a8a9.Gravatar Kristina Chodorow2016-03-02
| | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks on Java 1.7 See http://ci.bazel.io/job/Bazel/385/. *** Original change description *** Canonicalize the name of the target itself for java indirect dep errors. Otherwise it prints the wrong message when the target which is missing a dependency is in a repository other than the default one. -- MOS_MIGRATED_REVID=116164887
* Canonicalize the name of the target itself for java indirect dep errors.Gravatar Brian Silverman2016-03-02
| | | | | | | | | | Otherwise it prints the wrong message when the target which is missing a dependency is in a repository other than the default one. -- Change-Id: I3762e6be911b79a133a2959fce3a8bf34d183232 Reviewed-on: https://bazel-review.googlesource.com/#/c/2782/ MOS_MIGRATED_REVID=116128663
* Adds a build_file_content attribute to new_git_repository, new_http_archive, andGravatar Alex Humesky2016-02-12
| | | | | | | | | | | | | new_local_repository which allows the build file to be specified by a string directly in the rule rather than using a separate file. build_file and build_file_content are both optional, but one or the other must be specified. RELNOTES: build_file_content attribute added to new_git_repository, new_http_archive, and new_local_repository. -- MOS_MIGRATED_REVID=114490435
* Convert skylark rules and tests to use _ in repo namesGravatar Kristina Chodorow2016-01-27
| | | | | -- MOS_MIGRATED_REVID=113081497
* Fix NullPointerException in DelegatingWalkableGraphGravatar Damien Martin-Guillerez2016-01-22
| | | | | | | | | | Package name comparison did not included the repository name which leads to a crash when trying to build :* targets. Fixes #792. -- MOS_MIGRATED_REVID=112708531
* Now that external files are not always treated as immutable, eliminate the ↵Gravatar Lukacs Berki2015-12-10
| | | | | | | "overlaid BUILD files" hack in RepositoryValue. -- MOS_MIGRATED_REVID=109877252
* Don't treat external files as immutableGravatar Kristina Chodorow2015-12-08
| | | | | | | | | Fixes #352. RELNOTES: Files in external repositories are now treated as mutable, which will make the correctness guarantees of using external repositories stronger (existent), but may cause performance penalties. -- MOS_MIGRATED_REVID=109676408
* Add a (disabled) test case that tickles a bug in new_local_repository.Gravatar Lukacs Berki2015-11-13
| | | | | -- MOS_MIGRATED_REVID=107763223
* C++ libraries in remote repos don't need to set include pathsGravatar Kristina Chodorow2015-11-12
| | | | | | | | | Fixes #445, based on https://github.com/bazelbuild/bazel/compare/master...ulfjack:cpp-include-path. RELNOTES: C++ libraries no longer need includes = ["."] (or similar copts) to include paths relative to a remote repository's root. -- MOS_MIGRATED_REVID=107593486
* Move the check whether a repository name contains a slash to ↵Gravatar Philipp Wollermann2015-10-23
| | | | | | | PackageIdentifier, where it actually belongs. -- MOS_MIGRATED_REVID=106086272
* ArtifactFactory.findSourceRoot now handles the case where an execPath refers ↵Gravatar Philipp Wollermann2015-10-22
| | | | | | | to a remote repository. -- MOS_MIGRATED_REVID=106051348
* Remove the repository name from PACKAGE_NAME and move it to the new ↵Gravatar Lukacs Berki2015-10-21
| | | | | | | REPOSITORY_NAME symbol. -- MOS_MIGRATED_REVID=105954652
* Change the preprocessor interface to take the byte[] contents of the BUILD ↵Gravatar Nathan Harmata2015-10-21
| | | | | | | | | file rather than a ParserInputSource. This is part of a series of changes with the net result being that we open, read, and parse each BUILD file exactly once. -- MOS_MIGRATED_REVID=105911557
* Make recursive package wildcards work in remote repositories.Gravatar Lukacs Berki2015-10-15
| | | | | | | Ideally, PrepareDepsOfPatternFunction and maybe even RecursivePkgFunction would also be changed to take a PackageIdentifier instead of RootedPath because the less places we store the set of roots, the better, but I've done enough refactoring in the past weeks to not be thrilled by the idea of doing more. -- MOS_MIGRATED_REVID=105486561
* 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
* Make intra-package wildcards work for remote repositories and clean up ↵Gravatar Lukacs Berki2015-09-24
| | | | | | | | | target pattern parsing just a tiny little bit. This wounds #389 dealing 4d6 fire damage (recursive wildcards, e.g. /... and friends still don't work) -- MOS_MIGRATED_REVID=103822319