aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test
Commit message (Collapse)AuthorAge
* Implement pop(), popitem() and setdefault() for dictGravatar Francois-Rene Rideau2016-02-19
| | | | | -- MOS_MIGRATED_REVID=114966513
* Initial support for Java header compilationGravatar Liam Miller-Cushon2016-02-18
| | | | | | | | | 'Turbine' compiles ijars from source, ignoring method bodies and relaxing error checks for performance. We can then do normal compilation against those ijars and move javac off the build's critical path. -- MOS_MIGRATED_REVID=114919013
* Add a SkylarkRepositoryContextTestGravatar Damien Martin-Guillerez2016-02-17
| | | | | | | | | This test class is just testing attr for now but it will be extended with further test to test non trivial methods of the SkylarkRepositoryContext. -- MOS_MIGRATED_REVID=114897054
* Introduce SkylarkRepositoryModuleGravatar Damien Martin-Guillerez2016-02-17
| | | | | | | | | | | | | | | | | The SkylarkRepositoryModule declare the `repository_rule` function to Skylark to define new remote repository types (http://goo.gl/OZV3o0). The work is delagated to the `SkylarkRepositoryFunction` by the `RepositoryDelegatorFunction`. `SkylarkRepositoryContext` defines the `ctx` object passed to the `repository_rule` implementation function. This change also introduce a `SkylarkPath` and the necessary methods in `SkylarkRepositoryContext` to showcase the creation of a `local_repository` like repository. Issue #893: step 3 of the roadmap http://goo.gl/OZV3o0. -- MOS_MIGRATED_REVID=114895003
* Reinstate mutable maps, again.Gravatar Francois-Rene Rideau2016-02-17
| | | | | -- MOS_MIGRATED_REVID=114860576
* Use absolute paths in ProcessBuilder invocations.Gravatar Dmitry Lomov2016-02-17
| | | | | | | Needed for #276. -- MOS_MIGRATED_REVID=114838538
* Include real type in type casting error message.Gravatar Tobias Werth2016-02-16
| | | | | -- MOS_MIGRATED_REVID=114751682
* Roll forward of commit 500175fcfb37953f50cf0869df164902755807f2: Don't ↵Gravatar Googler2016-02-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | include absolute paths in blaze IDE artifacts NEW: Fixed bazel java_test rules Rollback of commit a4ba24e286b7e9a7a09e333d8eb64a8cf7e81895. *** Reason for rollback *** Rollforward, fixing bazel java_test rules *** Original change description *** Automated [] rollback of commit 500175fcfb37953f50cf0869df164902755807f2. *** Reason for rollback *** Breaks Bazel Build http://ci.bazel.io/job/Bazel/JAVA_VERSION=1.7,PLATFORM_NAME=linux-x86_64/356/console *** Original change description *** Don't include absolute paths in blaze IDE artifacts RELNOTES: Don't include absolute paths in blaze IDE artifacts -- MOS_MIGRATED_REVID=114751236
* bazel_go_example_test.sh: Inline BUILD.go-toolchainGravatar Damien Martin-Guillerez2016-02-16
| | | | | | | | | | | | | BUILD.go-toolchain was deleted as part of the base workspace removal and made bazel_go_example_test starts to fails because it was copying it. Recreating its content in the test corrects the test fixture. Fixes #905. -- MOS_MIGRATED_REVID=114732179
* Add support for downloading .tar.bz2 files with http_archive rules.Gravatar David Chen2016-02-16
| | | | | | | | | Fixes #897 RELNOTES: Add support for .tar.bz2 archives to http_archive rules. -- MOS_MIGRATED_REVID=114729580
* Reduce the number of stat calls when setting up a sandboxGravatar Brian Silverman2016-02-16
| | | | | | | | | | | | This improved performance for a (somewhat artificial) test which runs 100 genrules each with 3000 inputs by 25% on my laptop (2x hyperthreaded cores, SSD, ext4). Test code at <https://gist.github.com/bsilver8192/10527a862ce16bb7f79a>. -- Change-Id: I7a7aaccdfbe2925c7e962c0192924ef1cf80b33a Reviewed-on: https://bazel-review.git.corp.google.com/#/c/2840/1..2 MOS_MIGRATED_REVID=114694334
* Rollback of commit 500175fcfb37953f50cf0869df164902755807f2.Gravatar Damien Martin-Guillerez2016-02-15
| | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks Bazel Build http://ci.bazel.io/job/Bazel/JAVA_VERSION=1.7,PLATFORM_NAME=linux-x86_64/356/console *** Original change description *** Don't include absolute paths in blaze IDE artifacts RELNOTES: Don't include absolute paths in blaze IDE artifacts -- MOS_MIGRATED_REVID=114682419
* Replace a few more uses of the Constants.TOOLS_REPOSITORYGravatar Luis Fernando Pino Duque2016-02-15
| | | | | -- MOS_MIGRATED_REVID=114680762
* Enable injection of Skylark modules through the RuleClassProviderGravatar Damien Martin-Guillerez2016-02-15
| | | | | | | | | | | This enable BlazeModule to specify extraneous Skylark modules. This will be used by Skylark remote repositories to add them from the BazelRepositoryModule. Issue #893, step 2 of the roadmap of http://goo.gl/OZV3o0 -- MOS_MIGRATED_REVID=114677157
* Don't include absolute paths in blaze IDE artifactsGravatar Googler2016-02-15
| | | | | | | RELNOTES: Don't include absolute paths in blaze IDE artifacts -- MOS_MIGRATED_REVID=114550121
* Prevent load statements in remote repository's WORKSPACE file to breakGravatar Damien Martin-Guillerez2016-02-12
| | | | | | | | | | | | | | | If a load statements was present in a remote repository's WORKSPACE file, the parsing of the WORKSPACE file to get the workspace name will break the build because it tries to load the Skylark extension from the main repository. This change replace the parsing of the whole remote repository's WORKSPACE file by a parsing of only it first chunk (before the first load statement). This change also enforce that the workpace() function to be called only from the top of the WORKSPACE file. -- MOS_MIGRATED_REVID=114528640
* Add an experimental flag to enable the Skyframe-based loading phase runner.Gravatar Ulf Adams2016-02-12
| | | | | | | | | | | | | | Refactor the CommandEnvironment to no longer create a LoadingPhaseRunner eagerly. Unfortunately, that means we can't reuse the TargetPatternEvaluator either. Fortunately, the SkyframeTargetPatternEvaluator is a very lightweight class, which only contains the offset as state, so we just create a new instance whenever we need one. On the plus side, the LoadingPhaseRunner API is now stateless, and the QueryCommand no longer creates a unnecessary LoadingPhaseRunner instance. -- MOS_MIGRATED_REVID=114519731
* 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
* Support MOSTLY_STATIC with --build_test_dwp.Gravatar Googler2016-02-11
| | | | | -- MOS_MIGRATED_REVID=114469301
* Rollback of commit a0eefb52f529b73c6cb92f0a762853646ea2eae6.Gravatar Googler2016-02-11
| | | | | | | | | | | | | *** Reason for rollback *** Rolling forward with the restored logic to avoid stat calls on injected Metadata. *** Original change description *** Automated [] rollback of commit df03e10f6552566982399b8779fe7bc7a17d75dc. -- MOS_MIGRATED_REVID=114447944
* Rewrite the test to work with Bazel - avoid bash_version.Gravatar Ulf Adams2016-02-11
| | | | | | | | | | | Instead, we simply introduce an error after the rule - that means the package is in error, but the target still exists. I checked that this covers the same code path that I wanted to cover in the original change. Fixed #879. -- MOS_MIGRATED_REVID=114443076
* Expose some information about Java compilation to Skylark.Gravatar Dmitry Lomov2016-02-11
| | | | | -- MOS_MIGRATED_REVID=114438050
* Enable smoke tests for Java information being provided on Android rules.Gravatar Dmitry Lomov2016-02-11
| | | | | -- MOS_MIGRATED_REVID=114435744
* Add support for java_imports to Skylark IDE info aspect.Gravatar Dmitry Lomov2016-02-11
| | | | | -- MOS_MIGRATED_REVID=114434073
* Expose Java annotation processing information to Skylark.Gravatar Dmitry Lomov2016-02-11
| | | | | | | Also added some features to Skylark aspect. -- MOS_MIGRATED_REVID=114431594
* Add a few extra tests for XcodeProvider.Gravatar Lukacs Berki2016-02-11
| | | | | -- MOS_MIGRATED_REVID=114431043
* Make local_repository and new_local_repository work on Windows.Gravatar Lukacs Berki2016-02-11
| | | | | | | This makes it possible to compile //third_party/ijar with a bootstrapped Bazel on Windows in dslomov's tree. -- MOS_MIGRATED_REVID=114428109
* Allow for more flexibility in choices of Version for the ↵Gravatar Shreya Bhattarai2016-02-11
| | | | | | | GraphConcurrencyTest by allowing us to set an initial version, as well as a method to return the version's successor. -- MOS_MIGRATED_REVID=114367424
* Allow propagation of execution requirements to the ctx.resolve_command ↵Gravatar Chris Parsons2016-02-11
| | | | | | | | | function. In the case of the requires-darwin tag, /bin/bash will be used instead of an alternative, which matches the current genrule implementation. -- MOS_MIGRATED_REVID=114360408
* Allow ParallelEvaluator to not store errors alongside values if nodes ↵Gravatar Janak Ramakrishnan2016-02-11
| | | | | | | recover from errors. In the case of a single keep_going build, with no subsequent nokeep_going builds, storing the errors is unnecessary. -- MOS_MIGRATED_REVID=114355846
* Make xcode project generation generate correct filenames for external reposGravatar Kristina Chodorow2016-02-11
| | | | | -- MOS_MIGRATED_REVID=114350802
* Remove TransitivePackageLoader#getVisitedTargets, which was only used in ↵Gravatar Janak Ramakrishnan2016-02-11
| | | | | | | tests. Replace it in tests with direct Skyframe graph lookups. -- MOS_MIGRATED_REVID=114335937
* Make Bazel be able to reach ijar on Windows where it's called "ijar.exe" .Gravatar Lukacs Berki2016-02-11
| | | | | | | A small step towards the resolution of #276. -- MOS_MIGRATED_REVID=114330517
* Rollback of commit df03e10f6552566982399b8779fe7bc7a17d75dc.Gravatar Michajlo Matijkiw2016-02-11
| | | | | -- MOS_MIGRATED_REVID=114329043
* Forbid overloading of a repository outside of the first part of the ↵Gravatar Damien Martin-Guillerez2016-02-11
| | | | | | | | | workspace file Fixes #824. -- MOS_MIGRATED_REVID=114326952
* Fix bug in TargetPatternList.equals, which was ignoring the offset.Gravatar Ulf Adams2016-02-11
| | | | | -- MOS_MIGRATED_REVID=114326701
* Implement TODO from: ↵Gravatar Greg Estren2016-02-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://github.com/bazelbuild/bazel/blo[]fbbd6a32b95ba746f09dae1eaeaccf675cd5b3/src/main/java/com/google/devtools/build/lib/packages/Attribute.java#L1045 This allows the default value computation for latebound attributes to consider the values of configurable attributes. This is most directly useful for user-definable Skylark defaults, which have full access to the values of all non-latebound attributes. Without this change, this kind of scenario crashes Bazel. For example: ------------------ select_rules.bzl: ------------------ def _impl(ctx): ctx.file_action( output=ctx.outputs.out_file, content=ctx.attr.string_value, ) return struct() # Bug does not manifest without using this as a default. def _derived_value(attrs, _): return Label("//some:dep") selector_rule = rule( implementation=_impl, attrs={ "string_value": attr.string(default=""), "out_file": attr.output(), "_derived": attr.label(default=_derived_value), }, output_to_genfiles=True, ) def selector_macro(name, out_file="", string_value=""): # This will fail with selectors. selector_rule( name="%s_skylark" % name, string_value=string_value, out_file=out_file + ".skylark", ) # This does not. native.genrule( name="%s_genrule" % name, cmd="echo '" + string_value + "' > $@", outs=[out_file + ".genrule"], ) native.filegroup( name=name, srcs=[":%s_genrule" % name, "%s_skylark" % name], ) ------------------ BUILD.bzl: ------------------ config_setting( name = "selector", values = {"compilation_mode": "opt"}, ) selector_macro( name = "this_rule", string_value = """soup? """ + select({ ":selector": "no, thank you.", "//conditions:default": "yes, please!!", }), out_file = "this_rule.txt", ) -- MOS_MIGRATED_REVID=114326474
* Allow load of external label in the WORKSPACE file.Gravatar Damien Martin-Guillerez2016-02-10
| | | | | | | | | | | | | | | | | Issue #824 Step 5. The only thing left to resolve issue #824 are correct handling of the following cases: - Forbidding overloading of a repository outside of the first part of the workspace file (or it will leads to incorrectness issue and the only use-case is the redefinition of the bazel_tools repository). - Better error reporting when trying to refer to a non-existent repository from the workspace file, for now it will print a SkyFrame cycle exception. -- MOS_MIGRATED_REVID=114316464
* Make implicit attribute label lookup consistent.Gravatar Brian Silverman2016-02-10
| | | | | | | | | | | | | | | Previously, as of 0c8049f5fc866d785dd83769fa6c38ecf771ba96, these labels were treated as relative to the repository of the rule in some places but not others. From the other commit's message: They [implicit attribute defaults] now all point to @bazel_tools anyway, so there is no need [to special-case them]. -- Change-Id: If337eb2579ae613ba09cab0e0c927691922c0a39 Reviewed-on: https://bazel-review.googlesource.com/#/c/2783/ MOS_MIGRATED_REVID=114313341
* Fix SkyframeLoadingPhaseRunner posting of EventBus events.Gravatar Ulf Adams2016-02-10
| | | | | | | | The TargetParsingCompleteEvent was posting the post-expansion targets, and the LoadingPhaseCompleteEvent was missing the test-suite targets. -- MOS_MIGRATED_REVID=114312273
* SkyframeLoadingPhaseRunner: implement --compile_one_dependency.Gravatar Ulf Adams2016-02-10
| | | | | | | | Also fix a bug in the LoadingPhaseRunner - we weren't printing an error for failed targets, duh! -- MOS_MIGRATED_REVID=114310591
* Move two visibility-related loading tests to BuildViewTest.Gravatar Ulf Adams2016-02-10
| | | | | -- MOS_MIGRATED_REVID=114304151
* Fix callback handling in the Skyframe-based target pattern eval.Gravatar Ulf Adams2016-02-10
| | | | | | | | Add a unit test - there is test coverage for this in RunCommandTest, but this runs much faster. -- MOS_MIGRATED_REVID=114302062
* Make unpredictable action inputs and outputs available to Actions.Gravatar Michael Thvedt2016-02-10
| | | | | -- MOS_MIGRATED_REVID=114249806
* Skyframe-based loading phase runner: report errors if a package is in error.Gravatar Ulf Adams2016-02-10
| | | | | | | | | | | | | | | | | | | | | This is a bit odd - the legacy loading phase runner reports a loading error, but no target pattern error in keep_going mode, even though it's clearly an error in the referenced target itself, rather than in its transitive closure. This happens because the target pattern eval swallows such errors in keep_going mode, and doesn't even report the error. I tried changing that, but it's a fairly large refactoring, and that code path is dead if we switch to the new one. In the Skyframe-based implementation, both keep_going and nokeep_going paths now report a target pattern error. (Note that the new code can never report a loading error, because it doesn't perform transitive loading.) The corresponding test is moved from SkyframeLoadingAndAnalysisTest to LoadingPhaseRunnerTest - we don't need any integration test setup for that. -- MOS_MIGRATED_REVID=114236897
* Add support for tags to Skylark IDE info aspect.Gravatar Dmitry Lomov2016-02-10
| | | | | -- MOS_MIGRATED_REVID=114234447
* Add JavaSkylarkApiProvider to all Java rules.Gravatar Dmitry Lomov2016-02-10
| | | | | -- MOS_MIGRATED_REVID=114232294
* Fix NPE in TestsInSuiteFunction.Gravatar Ulf Adams2016-02-10
| | | | | | | | Note that this only affects the new Skyframe-based implementation of the LoadingPhaseRunner, which isn't live yet. -- MOS_MIGRATED_REVID=114230017
* Properly report loading errors during configuration creation.Gravatar Ulf Adams2016-02-10
| | | | | | | | | | | | | | | | | This only applies to interleaved loading and analysis - the production code is fine. Add tests for the RedirectChaser, the fdoOptimize code path, the XcodeConfig, and the Jvm loader. Unfortunately, the configuration factory we internally create by default contains a mock Jvm loader implementation. Since that is one Yak too many right now, I'm adding a temporary method to the AnalysisMock. I added the tests to BuildViewTest for now; technically, they ought to go into the language-specific test cases, but that would require more refactoring as those don't currently run with interleaved loading and analysis. -- MOS_MIGRATED_REVID=114221476
* Update FileSystemValueChecker to handle TreeArtifact values.Gravatar Michael Thvedt2016-02-10
| | | | | -- MOS_MIGRATED_REVID=114202845