aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test
Commit message (Collapse)AuthorAge
* Fixed the issue that hard links are handled improperly when bazel ↵Gravatar Googler2016-09-08
| | | | | | | | | decompresses tarballs. Issue link: https://github.com/bazelbuild/bazel/issues/574 -- MOS_MIGRATED_REVID=132434278
* Remove some dead code from PythonConfigurationLoader.Gravatar Ulf Adams2016-09-08
| | | | | | | | | There doesn't seem to be any need for a C++ toolchain to create a Python config anymore. I looked through the change history, but didn't find any obvious culprits / reasons for the current code. -- MOS_MIGRATED_REVID=132429818
* Use named parameters for function in SkylarkRepositoryContext when it make senseGravatar Damien Martin-Guillerez2016-09-07
| | | | | | | | | | | | | | RELNOTES[INC]: repository_ctx.{download,download_and_extract,execute} API now use named parameters for optional parameters and no longer uses argument type to distinguished between arguments (executable attribute name must be specified when preceding optional arguments are missing). Fixes #1426. -- Change-Id: I41d174cd9fd5c47edf4e2e9a86ce7f6c7882a104 Reviewed-on: https://bazel-review.googlesource.com/#/c/5673 MOS_MIGRATED_REVID=132421955
* Windows, tests: more refactoring in testsGravatar Laszlo Csomor2016-09-07
| | | | | | | | | Move more logic from FilesFileOperationsTest into WindowsTestUtil, and further separate test files in the BUILD file. -- MOS_MIGRATED_REVID=132417714
* Fixes breakage on CI with "sandbox-exec: ↵Gravatar Yue Gan2016-09-07
| | | | | | | external/bazel_tools/tools/cpp/osx_cc_wrapper.sh: No such file or directory" -- MOS_MIGRATED_REVID=132415409
* Windows, tests: move code into WindowsTestUtilGravatar Laszlo Csomor2016-09-07
| | | | | | | | | | | | Additionally: - clean up the corresponding BUILD file a bit - add a comment to Path A subsequent change will add tests for WindowsFileSystem, then fix a bug there. -- MOS_MIGRATED_REVID=132408212
* Re-add support for watchOS in swift_library.Gravatar Dmitry Shevchenko2016-09-07
| | | | | | | RELNOTES: swift_library can be used to build watchOS apps. -- MOS_MIGRATED_REVID=132355955
* Update all tests so that they use a cc_toolchain_suite instead of a ↵Gravatar Lukacs Berki2016-09-06
| | | | | | | | | filegroup to declare C++ toolchains. Tested by actually removing support for filegroups; it's a ~5-line change, but it's better to do that separately so that it can be rolled back easily if need be. -- MOS_MIGRATED_REVID=132320198
* Skylark no longer crashes when the default value of an attribute is a label ↵Gravatar Florian Weikert2016-09-06
| | | | | | | | | string that points to a remote repository. Fixes #1442. -- MOS_MIGRATED_REVID=132320130
* Make print() and fail() available in BUILD files to allow easier debugging.Gravatar Googler2016-09-06
| | | | | | | | | The functions were already available in Skylark extensions, but not directly in the BUILD files. RELNOTES[NEW]: print and fail are now available in BUILD files. -- MOS_MIGRATED_REVID=132307913
* Removing Guava deps from all BUILD files in junitrunner.Gravatar Irina Iancu2016-09-06
| | | | | | | | | | All usage of Guava has been removed from junitrunner. It is now safe to also remove all deps from the BUILD files. Fixing issue #1150. -- MOS_MIGRATED_REVID=132252042
* Generate documentation for named parameters for SkylarkCallableGravatar Damien Martin-Guillerez2016-09-06
| | | | | | | | | Fixes #1470. -- Change-Id: If16e32ac6e9b71680b6ed73987f1164545a99920 Reviewed-on: https://bazel-review.googlesource.com/#/c/5670/ MOS_MIGRATED_REVID=132243744
* Roll forward of commit 19db71413329da3f5d22b5fc7681471f3d971d88 (Skylark: ↵Gravatar Florian Weikert2016-09-06
| | | | | | | | | | | | | Replaced late bound attributes with computed default attributes) with two bug fixes: 1. Unlike SkylarkComputedDefault, SkylarkComputedDefaultTemplate did not sort the names of its attribute dependencies. Consequently, lookup operations failed when callback functions in bzl files specified the names of their required attributes in a non-alphabetical order since the order of the key tuples was different (e.g. [1, 2] vs [2, 1]). It would be less error prone to always sort the dependencies in createDependencyAssignmentTuple(), but this would impact performance. 2. SkylarkCallbackFunction ignores the legacy "cfg" parameter in callback functions. This special case should be deleted once all cfg parameters have been removed from the depot. -- MOS_MIGRATED_REVID=132235927
* Better API for creating immutable Skylark lists.Gravatar Dmitry Lomov2016-09-06
| | | | | -- MOS_MIGRATED_REVID=132226460
* Make --experimental_interleave_loading_and_analysis a no-op.Gravatar Ulf Adams2016-09-06
| | | | | | | | | | | | This is now enabled by default, and this change removes the code path where it's disabled. Remove a few tests that were testing the removed code, and rewrite some others that still seem useful. We still drop configured targets on configuration changes, so we use that to check that things are dropped from Skyframe. -- MOS_MIGRATED_REVID=132226208
* Adds a jar filter to the IntelliJ IDE aspect.Gravatar Googler2016-09-06
| | | | | | | | | | | | | | | | Any java rule that mixes generated and non-generated sources will produce a filtered jar containing only the generated output. For a java rule with only "normal" sources or only generated source files, no filtered jar is produced. This will allow the IDE to resolve those generated sources. RELNOTES:None -- MOS_MIGRATED_REVID=132113568
* Fixed NPEs when using built in functions as rule implementationsGravatar Vladimir Moskva2016-09-06
| | | | | -- MOS_MIGRATED_REVID=132066368
* Rollback of commit 19db71413329da3f5d22b5fc7681471f3d971d88.Gravatar Tobias Werth2016-09-06
| | | | | -- MOS_MIGRATED_REVID=132058819
* Test order of -l and -L args for CppLinkActionGravatar Marcel Hlopko2016-09-06
| | | | | | | | I'm going to refactor these args out to crosstool so I wrote this little test to keep me honest. -- MOS_MIGRATED_REVID=132044125
* Windows, JNI: implement native isJunction method.Gravatar Laszlo Csomor2016-09-06
| | | | | | | WindowsFileSystem.java does not yet use it. -- MOS_MIGRATED_REVID=132043739
* Implement flow control for gRPC and cleanup the interface to it a bit.Gravatar Lukacs Berki2016-09-06
| | | | | -- MOS_MIGRATED_REVID=132039389
* Skylark: Replaced late bound attributes with computed default attributesGravatar Mark Schaller2016-09-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Motivation: Compared to computed default attributes, late bound attributes are evaluated in a later phase (analysis instead of loading phase). While both mechanisms provide access to other attributes of a rule, only late bound attributes additionally provide access to the build configuration. However, late bound attributes could be used to return new labels that have not been loaded before. Since this happens in the analysis phase, it can break one of Blaze's underlying principles, thus introducing a serious correctness bug. We decided to replace late bound attributes in Skylark with computed default attributes since this moves the evaluation of values into the loading phase, thus fixing this bug. Moreover, none of the existing users of this mechanism required access to the build configuration, which means that the user impact of this change is minimal. Implementation details: Unlike attributes of non-Skylark rules, however, Skylark computed defaults need to be able to depend on more than two configurable attributes since all attributes of Skylark rules are configurable by default. This has two implications: 1. Unlike "normal" Skylark attributes, Skylark computed defaults need to know about the existence of other attributes in order to declare a dependency on them. This CL takes advantage of work previously done to require parameter names to be the names of attributes used by the computed default function. 2. Since Bazel computes the combinations of all possible attribute values, a Skylark rule with a computed default that depends on a lot of configurable attributes could crash Bazel. Consequently, this CL also introduces an upper bound (64) for the number of valid combinations. Caveats: 1. Getting the depended-on attributes' names from function paramters is mildly surprising. Alternatives: The best solution would be to keep SkylarkLateBound, but restrict it in a way that it can only return already loaded labels. This is not possible right now. -- MOS_MIGRATED_REVID=131967238
* Fix tests by explicitly passing TEST_TMPDIR to mk*temp.Gravatar Julio Merino2016-09-02
| | | | | | | | | | | We need to tell mktemp to explicitly create temporary files and directories under TEST_TMPDIR. The default of picking up the TMPDIR value (which may be unset) or /tmp may not work and was causing two tests to fail. I suspect that paths outside of TEST_TMPDIR may not be writable due to our sandboxing features. -- MOS_MIGRATED_REVID=131957733
* Make MemoizingEvaluatorTest#nodeInvalidatedThenDoubleCycle a bit more complete.Gravatar Janak Ramakrishnan2016-09-01
| | | | | -- MOS_MIGRATED_REVID=131944129
* fix run_under commandGravatar Yue Gan2016-09-01
| | | | | | | -- Change-Id: I765eaa6f0ecb31508eaf41f88be989f8e1169c51 Reviewed-on: https://bazel-review.googlesource.com/#/c/5711 MOS_MIGRATED_REVID=131934871
* Open-source many of tests from SkylarkIntegrationTest.Gravatar Dmitry Lomov2016-09-01
| | | | | -- MOS_MIGRATED_REVID=131929298
* First step towards allowing returning declared providers from rule ↵Gravatar Dmitry Lomov2016-09-01
| | | | | | | implementations. -- MOS_MIGRATED_REVID=131923497
* xcode_configure repository rule for determining locally installed versions ↵Gravatar Chris Parsons2016-09-01
| | | | | | | | | | | of xcode to select between, relaxing the requirement that users specify --xcode_version and --ios_sdk_version even if they have only one version installed. RELNOTES: On mac devices, detect locally installed versions of xcode to: 1. Use a sensible default if xcode is required but --xcode_version is unspecified. 2. Use sensible default iOS SDK version for the targeted version of xcode if ios_sdk_version is unspecified. -- MOS_MIGRATED_REVID=131841587
* Rollback of commit 1cd224a17bfe30f7d3c0e7f5eaada3e0331ff31a.Gravatar Cal Peyser2016-08-31
| | | | | | | | | | | | | *** Reason for rollback *** Re-enabling tests now that they are passing *** Original change description *** Disable broken tests. -- MOS_MIGRATED_REVID=131825670
* Remove the "cc_*.includes attribute must refer to the third_party directory" ↵Gravatar Lukacs Berki2016-08-31
| | | | | | | | | | | warning from Bazel. This behavior doesn't really make sense except within Google. Fixes #1286. -- MOS_MIGRATED_REVID=131813322
* Add a couple more stubs for new resource_* toolsGravatar Googler2016-08-31
| | | | | | | Add for consistency -- missed from the earlier CL -- MOS_MIGRATED_REVID=131735784
* Remove a duplicate test. Also move the counter file to a temp dir.Gravatar Ulf Adams2016-08-31
| | | | | | | | | | | There are multiple tests sharing the same counter file - if they end up running at the same time in different shards, then they can conflict with each other, effectively making the test flaky. This ought to fix it. I hope. -- MOS_MIGRATED_REVID=131715434
* Do not load the transitive closure of the Android SDK on every build.Gravatar Lukacs Berki2016-08-31
| | | | | | | This makes the sanity check dependent on the configuration fragments returning proper roots, but it's not that bad because it already depends on them returning the proper set of implicit labels and #getImplicitLabels() will go away soon anyway. -- MOS_MIGRATED_REVID=131705535
* Make aspects attached to aliases work when their actual= attribute is a select.Gravatar Lukacs Berki2016-08-31
| | | | | | | Fixes https://github.com/bazelbuild/e4b/issues/6 . -- MOS_MIGRATED_REVID=131698950
* Add support for watchOS in swift_libraryGravatar Dmitry Shevchenko2016-08-30
| | | | | -- MOS_MIGRATED_REVID=131631222
* Add a resource validator action for android_libraryGravatar Googler2016-08-30
| | | | | | | | | | | | | | | | | | Part 3 of the 3 new proposed android_library res processing actions. Pulls a zip file from the merging action, unpacks it, and then validates the results with aapt. Get an R.txt and srcjar w/ javadocs from aapt. In order to the get the R.txt, I think you need to ask for the R.java sources anyway. Split the processResources() into a runAapt() function that can be reused. Hookup in bazel coming separately. -- MOS_MIGRATED_REVID=131618410
* Add a lightweight resource merge action.Gravatar Googler2016-08-30
| | | | | | | | | | | | | | | | | | | | | | | | | | Part 2 of the 3 new proposed android_library res processing actions. The primary and deps are all assumed to be parsed+summarized in a protobuf. Represent that with a new class (similar to DependencyAndroidData but w/out R.txt). Avoid having "manifest" artifacts as deps input, and instead use "label", since that is only used in a warning. DepAD still uses the manifest for #asSymbolFileProvider, so we keep it there. Move loading the primary out of the merge function so that we can share the merge function with this style of primary data, and the existing style of of primary data (UnvalidatedAndroidData). This produces an R class.jar and a zip file to pass along to a future validation action. Images are stubbed out since they are irrelevant to the validation action. -- MOS_MIGRATED_REVID=131604421
* Avoid building android R class ijar / header jarGravatar Googler2016-08-29
| | | | | | | | | | | | | | | | | | | | | | | | | | It is already ignored and the real jar used as the compileTime jar in AndroidCommon. It's only used by the ide-resolve output group. The real jar is pretty close to the header jar in terms of content (field inits deleted). Tradeoff: The real jar is ~33% bigger (w/ same compression level), vs save build time and space by skipping the hjar actions and artifacts. At android_binary level, the hjar action can take ~40 seconds in some cases. At the library level, the hjar time is pretty tiny. hjars are not compressed. We could compress the real jars to make up for the extra 30% size (and beat the hjar size), but that adds ~25% elapsed time to do the compression (e.g., 10s vs 7.5s). Compression can shrink the jar 2-3x (37MB vs 100MB). -- MOS_MIGRATED_REVID=131588283
* Implement generating single-page Build Encyclopedia.Gravatar David Chen2016-08-29
| | | | | | | | | | | | | | * Adds a --single_page flag to the BE docgen for generating a single-page version of the Build Encyclopedia. * Refactor BuildEncyclopediaProcessor common logic into a base class and add subclasses for generating single- and multi-page BE respectively. * Enable RuleLinkExpander to expand rule references to single-page hrefs (headings on the current page). * Update docgen velocity templates to use RuleLinkExpander to ensure links are correct on both single- and multi-page versions of the BE. -- MOS_MIGRATED_REVID=131574793
* Add some type arguments to make Bazel compile again.Gravatar Lukacs Berki2016-08-29
| | | | | -- MOS_MIGRATED_REVID=131570943
* Replace doc pages with redirects to versioned doc pages.Gravatar David Chen2016-08-29
| | | | | | | | | | | | | | * Add a new `redirect` Jekyll layout. * Replace all pages under docs/ with redirects to corresponding page under versions/master/. * Prepend links on Documentation sidebar, including generated navs for the Skylark Library and Build Encyclopedia, with prefix for versioned directory. * Add code to both the internal jekyll-config.sh and external jekyll-tree.sh to add redirect pages for the Skylark Library and Build Encyclopedia. * Bring the branched User Manual doc up to date with latest changes. -- MOS_MIGRATED_REVID=131568800
* Add realpath method to SkylarkPath.Gravatar David Chen2016-08-29
| | | | | | | | | Fixes #1685 RELNOTES: Add path.realpath() method for Skylark repositories. -- MOS_MIGRATED_REVID=131568751
* Some little fixes to ResourceManager.Gravatar Philipp Wollermann2016-08-29
| | | | | | | | - Make sure that empty ResourceSets are always == ResourceSet.ZERO and use that for easier comparison. - No longer allow nested resource acquisition, because it may lead to deadlocks. -- MOS_MIGRATED_REVID=131567446
* Fix resource leakage on interrupt in ResourceManager identified by philwo.Gravatar Janak Ramakrishnan2016-08-27
| | | | | | | On interrupt, we never released any resources that we had asked to acquire, even though those resources would eventually be acquired. -- MOS_MIGRATED_REVID=131431321
* Remove all references to (incorrect) BlazeDirectories.buildDataDirectory rootGravatar Kristina Chodorow2016-08-26
| | | | | | | | | The buildDataDirectory is calculated off of the incorrect execroot. More progress towards #1681. -- MOS_MIGRATED_REVID=131407798
* Make SpawnActions honor the client environmentGravatar Klaus Aehlig2016-08-26
| | | | | | | | | | | | | | | ...for the variables that supposed to be inherited from it. Note That with this patch, we take the correct variables, but do not yet track the dependency on changes to the client environment; this will happen in a follow up patches. Also add a test that demonstrates that the client environment rather than that at startup is taken. -- Change-Id: I4d33efa8eaf4f8b689c9b7f2130f71309f3343f0 Reviewed-on: https://bazel-review.googlesource.com/#/c/5392 MOS_MIGRATED_REVID=131406356
* sandbox: Allow network access for builds by default.Gravatar Philipp Wollermann2016-08-26
| | | | | | | | | | | | | This solves a performance issue that slowed down builds by about 40% at least on Linux, due to clone() with CLONE_NEWNET becoming extremely slow (>1 second) for highly parallel builds. See this thread for a discussion: https://lkml.org/lkml/2014/8/20/40 For the sake of consistency, we apply the same policy on OS X, too. If we find a better way to block network access for processes on Linux that doesn't have this performance hit, we will revisit this. RELNOTES: Sandboxed builds allow network access for builds by default. Tests will still be run without networking, unless "requires-network" is specified as a tag. -- MOS_MIGRATED_REVID=131393514
* --Gravatar Philipp Wollermann2016-08-26
| | | | MOS_MIGRATED_REVID=131383292
* Add client environment to ActionExecutionContextGravatar Klaus Aehlig2016-08-26
| | | | | | | | | | | As the execution of an action now also depends on the client environment, make the latter part of the ActionExecutionContext, so that enough context is provided to actually execute an action. -- Change-Id: Ida7bf407ef0c0375728faba92494bfd47dcbaeb8 Reviewed-on: https://bazel-review.googlesource.com/#/c/5391 MOS_MIGRATED_REVID=131377490
* Allow cycle detector to be injected into ParallelEvaluator, so that callers ↵Gravatar Janak Ramakrishnan2016-08-26
| | | | | | | can use different cycle detection algorithms if they wish. -- MOS_MIGRATED_REVID=131347160