aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test
Commit message (Collapse)AuthorAge
* Undo change to introduce methods to remove file system instance from Path.Gravatar tomlu2017-12-28
| | | | | | | | I no longer believe that it is worthwhile to remove the file system instance from Path. Measurements indicate that I can simply replace the Path implementation in one go and just leave the instance on the Path class. This CL was done entirely using IDE refactoring, so should be safe. PiperOrigin-RevId: 180287162
* Replace Attribute.ConfigurationTransition with ↵Gravatar gregce2017-12-28
| | | | | | | | | | | | | | | | config.transitions.ConfigurationTransitionProxy. The "proxy" part is to dissuade people from writing: void myfunc(ConfigurationTransition transition) signatures casually. Maybe that's actually a better name than "Transition". But I'd rather rename Transition to ConfigurationTransition in its own change if we want to do that. PiperOrigin-RevId: 180285321
* Fix test that accidentally masked an exceptionGravatar brandjon2017-12-28
| | | | | | | Looks like the test was originally broken (to always pass) by https://github.com/bazelbuild/bazel/commit/01120026dc313ee7ad9ea95069a29252eb19173b and its roll-forward https://github.com/bazelbuild/bazel/commit/950310ff911da6c26339f4dc0b124487adc0cdbb. RELNOTES: None PiperOrigin-RevId: 180272998
* Rename some ClassObject/Provider-related methodsGravatar brandjon2017-12-28
| | | | | | | The terminology "field" is preferred over "key" for the components of a struct or struct-like object. RELNOTES: None PiperOrigin-RevId: 180269374
* Mark toolchain_test as flaky until we can uncover the cause and fix it.Gravatar jcater2017-12-22
| | | | PiperOrigin-RevId: 179962502
* Replace Attribute.SplitTransition with config.transitions.SplitTransition.Gravatar gregce2017-12-22
| | | | PiperOrigin-RevId: 179948322
* Replace Attribute.Transition with config.transitions.Transition.Gravatar gregce2017-12-22
| | | | PiperOrigin-RevId: 179936355
* Remove more dead codeGravatar Googler2017-12-22
| | | | | RELNOTES: none PiperOrigin-RevId: 179933248
* Redo FileType to reduce generated garbage.Gravatar tomlu2017-12-22
| | | | | | | | | | | | | * Change FileType to no longer assume it operates on just the base name (it can now be given a full path). * Move the responsibility to specific classes (Artifact, Path, PathFragment) to decide how they want to offer up a string that includes the file name. * Flip the order in which users are expected to check Artifact type, from FileType#matches(Artifact) to Artifact#isFileType(FileType). This looks natural and should encourage developers to use efficient file type checking methods. * Change CppCompileAction to use the new API. RELNOTES: None PiperOrigin-RevId: 179903239
* Remove testing flag --internal_do_not_export_builtinsGravatar brandjon2017-12-21
| | | | | | | Also add a @VisibleForTesting accessor to SkyframeExecutor. RELNOTES: None PiperOrigin-RevId: 179875655
* Open source the option processor tests.Gravatar ccalvarin2017-12-21
| | | | | | | The @Option annotation processor tests verify that the processor generates the correct errors at compile time. RELNOTES: None. PiperOrigin-RevId: 179872837
* Remove implicit dependency on //net/proto2/bridge/public:message_downgrader.Gravatar ckennelly2017-12-21
| | | | | RELNOTES: None PiperOrigin-RevId: 179866092
* Call through to Path#createDirectoryAndParents from FileUtils.Gravatar tomlu2017-12-21
| | | | | | | | | | | | This CL removes a method that due to its implementation causes threading difficulties for Path#createDirectory. The tests for the method are brought across to FileSystemTests since the methods are now implemented natively by the FileSystem classes. The tests were also cleaned up. The test revealed an edge case bug in JavaIoFileSystem, so fix this. In two cases some code was using the return value from the old method. Returning "false" essentially means that the directory already existed, and the code doesn't look racy, so we can replace it with an existence check. PiperOrigin-RevId: 179864042
* Move config transition definitions out of lib.packages.Attribute.Gravatar gregce2017-12-21
| | | | | | | | | | | | | This cleans up a legacy API from Bazel's "static configuration" days, when transition definitions involved deep and complex logic in the analysis code. That was too much cruft to embed into lib.packages. But the modern definitions are way simpler and thus easier to embed. This change only *copies* the existing definitions. Because a lot of references will have to be updated, we'll migrate the move over a few changes. PiperOrigin-RevId: 179859293
* Warn about config expansions as we do for other expansions.Gravatar ccalvarin2017-12-21
| | | | | | | | | If an expanded value overrides an explicit value, users who do not know the contents of the expansion may be surprised. We already warned about this for hard-coded expansions, and this is now applicable for --config expansions as well. This will only warn when a single-valued option has its value replaced. Options that accumulate multiple values in a list (e.g., --copt) will silently include both explicit and expanded values. RELNOTES: None. PiperOrigin-RevId: 179857526
* Change Mock xcrunwrapper dependency to accurately be a sh_binary instead of ↵Gravatar cparsons2017-12-21
| | | | | | | | | a file. This allows writing java tests for skylark rules which might need to depend on a sh_binary xcrunwrapper. RELNOTES: None. PiperOrigin-RevId: 179857352
* Deprecate "xctest" attribute from ios_test. This removes any functionality ↵Gravatar kaipi2017-12-21
| | | | | | related to using xctest = 0, but keeps the attribute to not break the users who have xctest = 1. PiperOrigin-RevId: 179855856
* Remove final accessors of ConfigurationTransition.HOST.Gravatar gregce2017-12-21
| | | | | | | Also lean interfaces from Attribute.ConfigurationTransition to Attribute.Transition. PiperOrigin-RevId: 179846158
* Use an annotation preprocessor to validate SkylarkConfigurationField.Gravatar cparsons2017-12-21
| | | | | RELNOTES: None. PiperOrigin-RevId: 179845261
* Consolidate instances of the --loading_phase_threads flag.Gravatar juliexxia2017-12-21
| | | | | RELNOTES: None. PiperOrigin-RevId: 179838936
* Remove package name from license.Gravatar dannark2017-12-21
| | | | | RELNOTES: None PiperOrigin-RevId: 179838832
* Change cfg(HOST) to cfg(HostTransition.INSTANCE).Gravatar gregce2017-12-21
| | | | | | Preparatory step for removing ConfigurationTransition.HOST. PiperOrigin-RevId: 179838374
* Move FileStateValue.Type to Metadata; add Metadata.getType()Gravatar ulfjack2017-12-21
| | | | | | | | This is in preparation for merging FileArtifactValue and FileStateValue. Progress on #3360. PiperOrigin-RevId: 179832948
* Improve testing for miss details on action cache stats.Gravatar jmmv2017-12-21
| | | | | | | | | | | | | | | | The previous tests (internal-only, sorry) were checking for the total number of misses before testing for the actual breakdown by reason. This was confusing because the total number was quite mysterious and because a test failure would point at the total instead of the breakdown, making the test problems harder to understand. To resolve this: check for the miss reasons first, which will give a better indication of what's wrong with the test, and then check for the total using a number that is derived from the breakdown, which avoids a magical number in the test. RELNOTES: None. PiperOrigin-RevId: 179830122
* Add FileSystem#createDirectoryAndParents.Gravatar tomlu2017-12-21
| | | | | | | | A native implementation of this (instead of using FileSystemUtils, which can only use public interfaces) should be more efficient and more easy to make correct. In particular, it should allow removing FileSystemUtils#createDirectoriesAndParents, which has poor thread safety characteristics. The latter method has a lot of logic that forces certain unnatural atomicity guarantees on createDirectory, and it also has logic that is conditional on sub-string content of exception messages. PiperOrigin-RevId: 179819623
* Refactor SkylarkProvider constructors and add testsGravatar brandjon2017-12-21
| | | | | | | A new constructor is exposed for building an already-exported SkylarkProvider. The existing constructor no longer takes a name argument (since it was almost entirely ignored). The contract around the name arg for BaseFunction has been refined: it is null if the subclass provides its own naming mechanism. RELNOTES: None PiperOrigin-RevId: 179804491
* ParallelEvaluator: report events early for cache hitsGravatar ulfjack2017-12-21
| | | | | | | | | | | | | | | | | | In the case that a node is already done when evaluation starts, we now report events and postables early, rather than waiting until the end of evaluation. This makes reporting more timely, and ensures reporting even if the evaluation is interrupted. This caused a problem with moving the TargetCompleteEvent into Skyframe (unknown commit). I added two unit tests at the Skyframe level to cover the guarantees that we need for that. Note that the replay call in constructResult can duplicate the events from a cache hit - this is not a problem since the replaying visitor automatically removes duplicates (and it wasn't obvious which keys correspond to cache hits). PiperOrigin-RevId: 179788157
* Remove xcode_toolchain flagGravatar dmishe2017-12-21
| | | | PiperOrigin-RevId: 179785531
* Move compulsory ProcessWrapperUtil parameters into its builder() method, to ↵Gravatar ruperts2017-12-20
| | | | | | | be consistent with LinuxSandboxUtil. RELNOTES: None. PiperOrigin-RevId: 179758847
* Add "extra_deps" to targets in tests that were forgotten in ↵Gravatar dannark2017-12-20
| | | | | | | https://github.com/bazelbuild/bazel/commit/e6940a554bfbd79e3e4534100fb7bf92be87cab2. RELNOTES: None PiperOrigin-RevId: 179756852
* Remove ConfigurationTransition.HOST references from lib.packages.Gravatar gregce2017-12-20
| | | | | | | | | | | | | | | | | | | | This removes the main barrier to making host transitions routine patch transitions. Today you signify a host transition by calling Attribute.Builder.cfg(ConfigurationTransition.HOST). Blaze's configuration machinery auto-converts this to HostTransition.INSTANCE, which is a patch transition. This change provides the groundwork for removing ConfigurationTransition.HOST and removing the special conversion logic. This also paves the way for better API support for multiple host configurations. Also change some cfg(HOST) rule references to cfg(HostTransition.INSTANCE). PiperOrigin-RevId: 179754619
* Correct typos found by the linter.Gravatar gregce2017-12-20
| | | | PiperOrigin-RevId: 179748374
* Update bootclasspath handling for JDK 9Gravatar cushon2017-12-20
| | | | | | | rt.jar etc. no longer exist, retrieve the default bootclasspath contents using a Java program instead. PiperOrigin-RevId: 179747945
* Migrate uses of xcode_config_alias to use the recently-introduced skylark ↵Gravatar cparsons2017-12-20
| | | | | | | late bound default instead. RELNOTES: None. PiperOrigin-RevId: 179738235
* Expose ObjcProtoAspect to Skylark.Gravatar cparsons2017-12-20
| | | | | RELNOTES: None. PiperOrigin-RevId: 179737025
* remote: fix download of output directoriesGravatar buchgr2017-12-20
| | | | | | | | Fix a bug where Bazel would crash if two Directory protos had the same hash. RELNOTES: Remote Caching and Execution support output directories. PiperOrigin-RevId: 179731040
* Get rid of LabelAndConfiguration class: ConfiguredTargetKey contains the ↵Gravatar janakr2017-12-20
| | | | | | same information and is more useful, since it's practically a SkyKey. PiperOrigin-RevId: 179727105
* Python 3 fixes for skylark testsGravatar dgreiman2017-12-20
| | | | | RELNOTES: None PiperOrigin-RevId: 179723648
* Remove references to some internal tooling.Gravatar ajmichael2017-12-20
| | | | | RELNOTES: None PiperOrigin-RevId: 179722149
* Refactor android_local_test test classes.Gravatar dannark2017-12-20
| | | | | RELNOTES: None PiperOrigin-RevId: 179719177
* Add CommandUsingLinuxSandboxtTest, to test execution statistics for Commands ↵Gravatar ruperts2017-12-20
| | | | | | | that use the linux-sandbox tool, irrespective of which SpawnRunner they use. RELNOTES: None. PiperOrigin-RevId: 179716067
* Use linux-sandbox via the (new) LinuxSandboxUtil. (second attempt).Gravatar ruperts2017-12-20
| | | | | RELNOTES: None. PiperOrigin-RevId: 179705357
* remote: rename auth flags.Gravatar Jakob Buchgraber2017-12-20
| | | | | | | | | | | | | | | | | | | | | | --auth_* flags only work with Google Cloud Authentication. That's confusing and restricts the naming of more general purpose authentication flags that we might want to add in the future. So instead of --auth_* let's call them --google_* (the old ones will continue working for a while). Also, --auth_enabled (aka --google_default_credentials) is no longer required when specifying --auth_credentials (aka --google_credentials). So now there's two simple ways to authenticate with Google Cloud: * bazel build --google_default_credentials * bazel build --google_credentials=creds.json RELNOTES: --auth_* flags were renamed to --google_* flags. The old names will continue to work for this release but will be removed in the next release. Change-Id: Ia1736f32e15a37995be3172cd9608d518ddeab44 PiperOrigin-RevId: 179700832
* Adjusts the filegroups generated for the Android NDK crosstool to correctlyGravatar ahumesky2017-12-20
| | | | | | | include certain toolchain binaries. RELNOTES: None. PiperOrigin-RevId: 179694510
* Change the definition of genrule to require a c++ toolchain.Gravatar cpeyser2017-12-20
| | | | | | This will allow a genrule implementation to make checks against the c++ target platform. PiperOrigin-RevId: 179692246
* remote: add directory support for remote caching and executionGravatar Hadrien Chauvin2017-12-20
| | | | | | Add support for directory trees as artifacts. Closes #4011. PiperOrigin-RevId: 179691001
* Support for ThinLTO to be enabled implicitly with AFDOGravatar Googler2017-12-20
| | | | | | | Allows for ThinLTO to be enabled once the --features=autofdo_implicit_thinlto feature is enabled in the crosstool. Also allows for --features=-thin_lto to override and prevent ThinLTO from being enabled. RELNOTES: None. PiperOrigin-RevId: 179687743
* Automated rollback of commit 52b62164af031c50b7a0584303caad67af5e1d4d.Gravatar aehlig2017-12-20
| | | | | | | | | | | | | *** Reason for rollback *** Breaks //src/test/shell/bazel:bazel_sandboxing_test *** Original change description *** Use linux-sandbox via the (new) LinuxSandboxUtil. RELNOTES: None. PiperOrigin-RevId: 179676894
* Aspects-on-aspect see and propagate over aspect attributes.Gravatar dslomov2017-12-20
| | | | | | | | | | | If an aspect is applied to a rule+aspect node, all attributes are merged into ctx.rule.attr collection, and the first one with the same name wins (in particular, rule attribute will always win over aspect attribute). This is backwards-compatible, and unlikely to cause problems in practice. RELNOTES: Aspects-on-aspect see and propagate over aspect attributes. PiperOrigin-RevId: 179675660
* Use linux-sandbox via the (new) LinuxSandboxUtil.Gravatar ruperts2017-12-20
| | | | | RELNOTES: None. PiperOrigin-RevId: 179646155