From efb88a9a5fc737cf45356faf5369acd380f0d659 Mon Sep 17 00:00:00 2001 From: Googler Date: Wed, 10 Aug 2016 23:24:10 +0000 Subject: Rollback of commit fbaa700337bf0cf9083f083e6cd0d2f82faf1506. *** Reason for rollback *** I want to do this in a way that exposes the data attribute only for android_test and android_binary, so I'll add it to the deploy manifest instead. *** Original change description *** Expose test "data" attribute to IDE. This is needed to deploy android_tests to the device for testing. For symmetry we expose it for all tests rules. -- MOS_MIGRATED_REVID=129926351 --- .../devtools/build/lib/ideinfo/AndroidStudioInfoAspectTest.java | 8 -------- .../java/com/google/devtools/build/lib/ideinfo/intellij_info.bzl | 7 ------- 2 files changed, 15 deletions(-) (limited to 'src/test/java/com/google/devtools/build/lib') diff --git a/src/test/java/com/google/devtools/build/lib/ideinfo/AndroidStudioInfoAspectTest.java b/src/test/java/com/google/devtools/build/lib/ideinfo/AndroidStudioInfoAspectTest.java index b8df3e0fff..998ec257b5 100644 --- a/src/test/java/com/google/devtools/build/lib/ideinfo/AndroidStudioInfoAspectTest.java +++ b/src/test/java/com/google/devtools/build/lib/ideinfo/AndroidStudioInfoAspectTest.java @@ -475,7 +475,6 @@ public class AndroidStudioInfoAspectTest extends AndroidStudioInfoAspectTestBase " srcs = ['FooBarTest.java'],", " size = 'large',", " deps = [':foobar'],", - " data = ['MyData'],", ")"); Map ruleIdeInfos = buildRuleIdeInfo( "//java/com/google/example:FooBarTest"); @@ -502,13 +501,6 @@ public class AndroidStudioInfoAspectTest extends AndroidStudioInfoAspectTestBase .isEqualTo("java/com/google/example/FooBarTest.jdeps"); assertThat(testInfo.getTestInfo().getSize()).isEqualTo("large"); - assertThat(testInfo.getTestInfo().getDataList()).containsExactly( - ArtifactLocation.newBuilder() - .setIsSource(true) - .setRootPath(testLegacyAswbPluginVersionCompatibility() ? "/workspace" : "") - .setRelativePath("java/com/google/example/MyData") - .build() - ); } @Test diff --git a/src/test/java/com/google/devtools/build/lib/ideinfo/intellij_info.bzl b/src/test/java/com/google/devtools/build/lib/ideinfo/intellij_info.bzl index ffaf80a28f..1d17d19943 100644 --- a/src/test/java/com/google/devtools/build/lib/ideinfo/intellij_info.bzl +++ b/src/test/java/com/google/devtools/build/lib/ideinfo/intellij_info.bzl @@ -358,19 +358,12 @@ def build_android_rule_ide_info(target, ctx, legacy_resource_label): ide_resolve_files = set(jars_from_output(target.android.idl.output)) return (android_rule_ide_info, ide_resolve_files) -def _get_data(ctx): - """Returns a list of artifact locations from the data attribute.""" - if not hasattr(ctx.rule.attr, "data"): - return [] - return [artifact_location(f) for data in ctx.rule.attr.data for f in data.files] - def build_test_info(target, ctx): """Build TestInfo""" if not is_test_rule(ctx): return None return struct_omit_none( size = ctx.rule.attr.size, - data = _get_data(ctx), ) def is_test_rule(ctx): -- cgit v1.2.3