aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test
Commit message (Collapse)AuthorAge
* Make local_repository and new_local_repository work with the limitations of ↵Gravatar Lukacs Berki2016-01-26
| | | | | | | our plans for symlink support on Windows. -- MOS_MIGRATED_REVID=113043269
* Separate runfiles middlemen into two layers: one that is a middleman for the ↵Gravatar Lukacs Berki2016-01-26
| | | | | | | | | | | files itself, and one that contains this middleman and the runfiles output manifest. This is in preparation for Windows symlink support in runfiles manifests: on Windows, we'll need the target files created before we can create the runfiles symlinks for them, but we can't do that by adding the current runfiles middleman to the inputs of SymlinkTreeAction because it would create a cycle (output manifest -> SymlinkTreeAction -> runfiles manifest -> MiddlemanAction -> output manifest) The alternative is to just add the artifacts to the inputs of SymlinkTreeAction, but that would create a bunch of extra edges and, more importantly, reverse edges in the action graph which we don't want. -- MOS_MIGRATED_REVID=113041344
* RELNOTES[INC]: Set stamping to false by default (i.e., --nostamp)Gravatar Damien Martin-Guillerez2016-01-26
| | | | | | | Stamping make build non-deterministic and should not be the default. -- MOS_MIGRATED_REVID=113040937
* Add documentation for workspace functionGravatar Kristina Chodorow2016-01-26
| | | | | -- MOS_MIGRATED_REVID=112971086
* Move RepositoryName to its own top-level classGravatar Kristina Chodorow2016-01-26
| | | | | | | | | | As it's about to get more important in its own right. The only change that isn't just moving code around is making RepositoryName.validate package-private. -- MOS_MIGRATED_REVID=112956571
* Rollback of commit bd9f25c593a140acb15d3fd3fc7f66d091e1a898.Gravatar Ulf Adams2016-01-25
| | | | | | | | | | | | | | | | *** Reason for rollback *** Violates layering - genrule should not depend on platform- or language-specific parts. *** Original change description *** Add a DEVELOPER_DIR make variable to genrules to propagate the apple xcode environment variable DEVELOPER_DIR to commands. If $(DEVELOPER_DIR) is included in the genrule command, we bootstrap the XCODE_VERSION_OVERRIDE environment variable to the command. The contract with the actual action executor is, if XCODE_VERSION_OVERRIDE is present in the environment, to additionally bootstrap the DEVELOPER_DIR absolute path to the command. -- MOS_MIGRATED_REVID=112951074
* Add test coverage that failures and printed errors are consistent.Gravatar Ulf Adams2016-01-25
| | | | | | | | Apparently, there's at least one case where errors are printed, but we exit with a zero exit code. How's that. -- MOS_MIGRATED_REVID=112950105
* Always generate a workspace name for new repositoriesGravatar Kristina Chodorow2016-01-25
| | | | | -- MOS_MIGRATED_REVID=112790992
* Make select() statements in remote repositories with selector labels ↵Gravatar Lukacs Berki2016-01-25
| | | | | | | | | | | pointing back to the main repository ("@//:...") work. In principle, we should just use main repository labels instead of default repository labels in all the SkyKeys that take labels. @bsilver8192 is working on it, but in the meantime, this will serve to unblock @chin33z. Fixes #811. -- MOS_MIGRATED_REVID=112787545
* Allow switching on header processing (parse_headers or preprocess_headers)Gravatar Manuel Klimek2016-01-22
| | | | | | | | | | | | | | | | | for targets in the transitive closure of a target that is built. Previously, this would only happen if a link action for the library containing the headers was also built; this specifically means it did not trigger if a library didn't contain source files, as there is no link action for such libraries. That led to no header-only libraries would get their headers parsed, which includes all cc_public_library rules. Adding a flag to introduce this under so we can switch it on independently from the blaze release. Once it is switched on, we can remove the edges in the action graph from the link actions to the header processing actions. -- MOS_MIGRATED_REVID=112782219
* Restore the test for analysis root cause reporting.Gravatar Ulf Adams2016-01-22
| | | | | -- MOS_MIGRATED_REVID=112780859
* Do not compile source files mentioned in 'hdrs'.Gravatar Manuel Klimek2016-01-22
| | | | | | | | | | | | Currently for a library: cc_library(name='a', hdrs=['a.cc']) we compile a.cc into a.pic.o and link that into its reverse dependencies. With this change, a .cc file in hdrs will be treated like a .inc file or a file in textual_hdrs. -- MOS_MIGRATED_REVID=112770625
* Extract parsing of the WORKSPACE file in two partsGravatar Damien Martin-Guillerez2016-01-22
| | | | | | | | | | | The WORKSPACE file AST is now parsed as a separate SkyFunction and this will be used to have multiple SkyValue for the same WORKSPACE file, splitting the execution of the AST after load statements to enable load statement of external dependencies in the WORKSPACE file. -- MOS_MIGRATED_REVID=112768897
* Make SkylarkList a List.Gravatar Francois-Rene Rideau2016-01-22
| | | | | | | | | | | | | | | SkylarkList now implements the List interfaces, except that its mutating methods throw an UnsupportedOperationException, just like ImmutableList does. To actually mutate a SkylarkList, you need to pass a Location and a suitable Environment object with a matching Mutability while it is still active. Introduce SkylarkMutable and SkylarkMutable.MutableCollection to better handle mutable data structures. Remove some functions in EvalUtils made obsolete by this and previous changes regarding Skylark lists. -- MOS_MIGRATED_REVID=112768457
* Add test case to SingleBuildFileCache for unreadable filesGravatar Michajlo Matijkiw2016-01-22
| | | | | -- MOS_MIGRATED_REVID=112713014
* 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
* Improve space efficiency of Blaze action cache: For actions that don't ↵Gravatar Eric Fellheimer2016-01-22
| | | | | | | perform input discovery, there is no need to store the full set of edges in the action cache. This data is only used to formulate the set of input files for an action prior to checking the validity of a cache entry. For non-input-discovering actions, the set of input files is known statically and the action cache data is not used. -- MOS_MIGRATED_REVID=112704382
* Raise error if we find an unknown type in native.rule().Gravatar Han-Wen Nienhuys2016-01-21
| | | | | | | | | | | | Handle more types: * Boolean * TriState * SkylarkValue (eg. FileSetEntry) * skip Licenses, Distribs. -- MOS_MIGRATED_REVID=112690550
* Copy output files out of the sandbox even when the action failed.Gravatar Philipp Wollermann2016-01-21
| | | | | -- MOS_MIGRATED_REVID=112683298
* Fix extra_actions with sandboxing.Gravatar Brian Silverman2016-01-21
| | | | | | | | | | | | | | | The ExtraAction code assumed that it didn't need to list the runfiles of its tools when running locally, but this isn't true with sandboxing. I don't think fixing this will negatively affect anybody's performance because they probably don't have any runfiles because they currently can't use them, unless they're running actions remotely in which case this change has no effect. -- Change-Id: Ibeb3db9d31321912a7163d1bce0edf5f6288ea3e Reviewed-on: https://bazel-review.googlesource.com/#/c/2520/ MOS_MIGRATED_REVID=112670586
* Perform package loading in parallel with transitive target visitation. This ↵Gravatar Janak Ramakrishnan2016-01-21
| | | | | | | is a partial rollback of commit f1e257d because it turns out that loading sequentially can be a bottleneck. -- MOS_MIGRATED_REVID=112628616
* Enforce aspect configuration fragment specification when present.Gravatar Michael Staib2016-01-21
| | | | | | | | | | | | | | | | | If an aspect has specified its configuration fragment dependencies, use these in place of the rule's. Note that the dynamic configuration support for this is yet to come. Also in this CL: * RuleContext is constructed with a ruleClassNameForLogging, which allows error messages involving aspects to be clearer. RELNOTES[NEW]: Skylark aspects can now specify configuration fragment dependencies with fragments and host_fragments like rules can. -- MOS_MIGRATED_REVID=112614357
* Add a DEVELOPER_DIR make variable to genrules to propagate the apple xcode ↵Gravatar Chris Parsons2016-01-21
| | | | | | | | | | environment variable DEVELOPER_DIR to commands. If $(DEVELOPER_DIR) is included in the genrule command, we bootstrap the XCODE_VERSION_OVERRIDE environment variable to the command. The contract with the actual action executor is, if XCODE_VERSION_OVERRIDE is present in the environment, to additionally bootstrap the DEVELOPER_DIR absolute path to the command. -- MOS_MIGRATED_REVID=112605616
* Rename defaultShellEnvironment to localShellEnvironment and clarifyGravatar Han-Wen Nienhuys2016-01-21
| | | | | | | its intended use. -- MOS_MIGRATED_REVID=112598772
* Respect maven excludes and separate build rules.Gravatar Stein Eldar Johnsen2016-01-21
| | | | | | | | | | | | | | Updating the generate_workspace tool to: - Respect dependency exclutions from the project object model (maven). - Generate one rule per pom dependency or maven_jar source rule (using maven group ID and artifact ID). -- Change-Id: Ieb878f82be4352dcfb5755f8f71dfa7e592de78a Reviewed-on: https://bazel-review.googlesource.com/#/c/2551/ MOS_MIGRATED_REVID=112574031
* Add a Java property to influence symlinking strategy so that we can test ↵Gravatar Lukacs Berki2016-01-20
| | | | | | | what kind of performance we could get from how we imagine it would work under Windows. -- MOS_MIGRATED_REVID=112572621
* Allow empty go_prefix.Gravatar Han-Wen Nienhuys2016-01-20
| | | | | | | | | Fixes #676. -- Change-Id: I7474d3e3071c99452b6e1835d6f70671f34b1fd9 Reviewed-on: https://bazel-review.googlesource.com/#/c/2693 MOS_MIGRATED_REVID=112564791
* Fix a couple of bugs related to error handling for top-level aspects.Gravatar Ulf Adams2016-01-20
| | | | | -- MOS_MIGRATED_REVID=112561390
* Support unreadable filesGravatar Michajlo Matijkiw2016-01-20
| | | | | -- MOS_MIGRATED_REVID=112507181
* Skylark IDE info aspect: sources and dependencies.Gravatar Dmitry Lomov2016-01-19
| | | | | | | | | | | | | | 1. Refactored IntelliJSkylarkAspectTest. Eventually that test will be merged with AndroidStudioInfoAspect test to validate implementation equivalence. 2. Exposed ``root`` and ``is_source`` on Artifacts to Skylark. 3. Skylark aspect implementation outputs sources and dependencies information. -- MOS_MIGRATED_REVID=112473407
* Fileset (Google internal): code cleanup.Gravatar Laszlo Csomor2016-01-19
| | | | | -- MOS_MIGRATED_REVID=112466264
* Use a separate XML_OUTPUT_FILE for unittest.bash testsGravatar Damien Martin-Guillerez2016-01-19
| | | | | | | The current set-up was overwriting the XML_OUTPUT_FILE of unittest_test, leading to weird error on ci.bazel.io. -- MOS_MIGRATED_REVID=112462362
* Rewrite SkylarkAspectsTest to inherit AnalysisTestCase.Gravatar Ulf Adams2016-01-19
| | | | | | | | | | | | | | | | | | While BuildViewTestCase now has an update() function, it also has a lot of legacy cruft that doesn't match how the code is used in production. This also makes the test code a bit simpler. Also add a couple missing fail() statements. This is in preparation for adding a couple more tests; we don't have good test coverage for interaction between Skylark aspects and native rules and vice versa, especially for error scenarios. I may reuse some of the AspectTest code, but that inherits AnalysisTestCase. Inheriting AnalysisTestCase here also makes that easier. -- MOS_MIGRATED_REVID=112460142
* Set test_class for java_test test target where it is neededGravatar Damien Martin-Guillerez2016-01-19
| | | | | | | | | This make those test target compatible with --nolegacy_bazel_java_test. -- Change-Id: I2316c9aa53327b417ecce5fd5dab95ec726da11d Reviewed-on: https://bazel-review.googlesource.com/#/c/2690 MOS_MIGRATED_REVID=112446514
* Generate a default dummy XML file when the test runner does not.Gravatar Damien Martin-Guillerez2016-01-18
| | | | | -- MOS_MIGRATED_REVID=112409554
* Fix #757: Bazel does not copy xml test output from sandbox.Gravatar Philipp Wollermann2016-01-18
| | | | | -- MOS_MIGRATED_REVID=112404257
* Disallow loads from external repos in WORKSPACE files. Currently, attempting ↵Gravatar John Field2016-01-18
| | | | | | | | | to do such a load will result in a skyframe circular dependency exception. As a side effect of this change, SkylarkImportFailedExceptions thrown by SkylarkImportLookupFunction are now caught by PackageFunction and wrapped and rethrown as a PackageFunctionException. Previously, the first exception wasn't caught, generating an uncaught exception error at top level. -- MOS_MIGRATED_REVID=112328755
* Increase the size of some tests that time out on ci.bazel.ioGravatar Damien Martin-Guillerez2016-01-15
| | | | | | | See http://ci.bazel.io/job/Bazel/JAVA_VERSION=1.7,PLATFORM_NAME=darwin-x86_64/302/console -- MOS_MIGRATED_REVID=112280018
* Enable Aspects to specify their configuration fragment dependencies.Gravatar Michael Staib2016-01-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note: This specification currently does not have any effect, but soon... In the default mode, when an aspect does not call any of the configuration fragment methods on its AspectDefinition.Builder, the old behavior will persist; aspects can only access fragments their associated rule has access to, and have no guarantee as to what those fragments are. This mode will become deprecated with a future CL. If an aspect does call a configuration fragment method, it will have a configuration fragment policy. In a future CL, this will mean it will be restricted to accessing only those fragments, but will be understood as requiring access to them for the purposes of dynamic configuration, even if the rule it is attached to or created by does not otherwise require them. Eventually, all aspects will be required to declare their configuration fragments this way. Skylark aspects may also declare configuration fragments as of this CL. Two new parameters are added to the aspect() function, fragments and host_fragments, mirroring the similar parameters for rules. If both of these parameters are empty or unspecified, the default mode is used, as with normal aspects. Also in this CL: * Minor javadoc fixes for AspectDefinition. * Additional tests for AspectDefinition. -- MOS_MIGRATED_REVID=112271713
* Adds support for invocation policy to the canonicalize-flags command.Gravatar Alex Humesky2016-01-15
| | | | | -- MOS_MIGRATED_REVID=112267123
* Add native.rule(NAME), which returns the attributes of a previously defined ↵Gravatar Han-Wen Nienhuys2016-01-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | rule. Add native.rules(), which returns all previously defined rules. These primitives can be used to write Skylark extensions that aggregate over the contents of a BUILD file, eg. def instantiate_if_needed(name): n = name + "_wrapped" if not native.rule(n): py_test(name = n , ... ) def archive_cc_src_files(tag): all_src = [] for r in native.rules().values(): if tag in r["tags"] and r["kind"] == "cc_library": all_src.append(r["srcs"]) native.genrule(cmd = "zip $@ $^", srcs = all_src, outs = ["out.zip"]) RELNOTES: Support aggregation over existing rules in Skylark extensions through native.rules and native.rule. -- MOS_MIGRATED_REVID=112249050
* Increase the size of some tests that time out on ci.bazel.ioGravatar Damien Martin-Guillerez2016-01-15
| | | | | | | See http://ci.bazel.io/job/Bazel/JAVA_VERSION=1.7,PLATFORM_NAME=linux-x86_64/301/console -- MOS_MIGRATED_REVID=112238153
* Add a method for getting the root of a rule workspace to the Label methodGravatar Damien Martin-Guillerez2016-01-15
| | | | | | | | This method is exposed to Skylark and will enable correct handling of protobuf skylark files. See #784 -- MOS_MIGRATED_REVID=112235357
* Actually fix test_fetch to not errexit by ls-ing a non-existent directoryGravatar Kristina Chodorow2016-01-15
| | | | | | | | | Fixes #769. -- Change-Id: I085b0a9c9faed45bee8cf4185a71531b95a66e14 Reviewed-on: https://github.com/bazelbuild/bazel/pull/779 MOS_MIGRATED_REVID=112228906
* ConfigurationFragmentPolicy: assume Skylark names, allow merging.Gravatar Michael Staib2016-01-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In preparation for allowing aspects to have their own configuration fragments specified, allow ConfigurationFragmentPolicy.Builder to merge with built policies more easily, setting up SetMultimaps in place of maps of sets. This changes how named (Skylark) fragments are declared in the RuleContext builder, hopefully to be a bit easier to write. In order to do this, make SkylarkModuleNameResolver the only name resolver in use (because it is the only name resolver which exists) so as to not worry about collisions of different name resolvers. This also changes isLegalConfigurationFragment's one-argument form to mean "legal in ANY configuration" rather than "legal in the target (NONE) configuration", as that is how it's used by TransitiveTargetFunction. Uses of it to mean the latter have been revised to be more explicit. Also in this CL: * refactor ConfigurationFragmentPolicy to enforce its contracts about which ConfigurationTransitions are legal * use containsEntry or containsValue rather than looking in get(key) or values() for the configuration fragment multimaps * add tests for ConfigurationFragmentPolicy * make SkylarkModuleNameResolver a static method -- MOS_MIGRATED_REVID=112191439
* Display parsing errors for WORKSPACE filesGravatar Kristina Chodorow2016-01-15
| | | | | | | | | | | | | Previously, for some types of errors, you'd just see "WORKSPACE file could not be parsed" if there was a syntax error (instead of what the syntax error was). Change-Id: Ia278cf23b79f8daba02917cdfb4cc515a87080b1 -- Change-Id: Ia278cf23b79f8daba02917cdfb4cc515a87080b1 Reviewed-on: https://github.com/bazelbuild/bazel/pull/774 MOS_MIGRATED_REVID=112190322
* Add a few other Label.resolveRepositoryRelative() calls to make select() ↵Gravatar Lukacs Berki2016-01-15
| | | | | | | | | | | statements work in remote repositories. This work is somewhat sisyphean; the principled thing to do would be to just do this resolution when labels are parsed. Fixes #783. -- MOS_MIGRATED_REVID=112137996
* Limit the number of parallel jobs in test Bazel instances so that running ↵Gravatar Lukacs Berki2016-01-15
| | | | | | | the tests (which spawn multiple tests in the outside Bazel instance with each its own inner Bazel instance which in turn have their own thread pool) doesn't grind the machine to a halt. -- MOS_MIGRATED_REVID=112132298
* Set external_correctness_test size to largeGravatar Damien Martin-Guillerez2016-01-14
| | | | | | | This test was timing out on ci.bazel.io: http://ci.bazel.io/job/Bazel/JAVA_VERSION=1.7,PLATFORM_NAME=linux-x86_64/298/console -- MOS_MIGRATED_REVID=112126463
* For native rule classes, (de)serialize only explicit attrsGravatar Mark Schaller2016-01-14
| | | | | | | | | | | Native rule classes can provide default values for rules after they're deserialized, so there isn't a need to serialize those default values. This doesn't apply yet to rules with Skylark-defined rule classes, due to the non-serializablity of Skylark rule classes. -- MOS_MIGRATED_REVID=112066930