diff options
Diffstat (limited to 'src/test')
4 files changed, 6 insertions, 14 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/analysis/AspectDefinitionTest.java b/src/test/java/com/google/devtools/build/lib/analysis/AspectDefinitionTest.java index 4bf2c55102..aeb989f086 100644 --- a/src/test/java/com/google/devtools/build/lib/analysis/AspectDefinitionTest.java +++ b/src/test/java/com/google/devtools/build/lib/analysis/AspectDefinitionTest.java @@ -31,7 +31,6 @@ import com.google.devtools.build.lib.packages.NativeAspectClass; import com.google.devtools.build.lib.packages.Rule; import com.google.devtools.build.lib.skylarkinterface.SkylarkModule; import com.google.devtools.build.lib.util.FileTypeSet; - import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; diff --git a/src/test/java/com/google/devtools/build/lib/skylark/SkylarkIntegrationTest.java b/src/test/java/com/google/devtools/build/lib/skylark/SkylarkIntegrationTest.java index a140187290..fa8beb1508 100644 --- a/src/test/java/com/google/devtools/build/lib/skylark/SkylarkIntegrationTest.java +++ b/src/test/java/com/google/devtools/build/lib/skylark/SkylarkIntegrationTest.java @@ -417,7 +417,7 @@ public class SkylarkIntegrationTest extends BuildViewTestCase { " return struct(runfiles = rf)", "", "custom_rule = rule(implementation = custom_rule_impl, executable = True,", - " attrs = {'data': attr.label_list(cfg=DATA_CFG, allow_files=True)})"); + " attrs = {'data': attr.label_list(cfg='data', allow_files=True)})"); scratch.file( "test/skylark/BUILD", diff --git a/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleClassFunctionsTest.java b/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleClassFunctionsTest.java index 3e677be5b9..78e4b4e51d 100644 --- a/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleClassFunctionsTest.java +++ b/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleClassFunctionsTest.java @@ -409,13 +409,6 @@ public class SkylarkRuleClassFunctionsTest extends SkylarkTestCase { } @Test - public void testAttrCfg_deprecated() throws Exception { - Attribute attr = evalAttributeDefinition("attr.label(cfg = HOST_CFG, allow_files = True)") - .build("a1"); - assertEquals(ConfigurationTransition.HOST, attr.getConfigurationTransition()); - } - - @Test public void testAttrCfg() throws Exception { Attribute attr = evalAttributeDefinition("attr.label(cfg = 'host', allow_files = True)") .build("a1"); @@ -664,8 +657,8 @@ public class SkylarkRuleClassFunctionsTest extends SkylarkTestCase { public void testTextMessageInvalidStructure() throws Exception { checkErrorContains( "Invalid text format, expected a struct, a string, a bool, or an int " - + "but got a ConfigurationTransition for struct field 'a'", - "struct(a=DATA_CFG).to_proto()"); + + "but got a function for struct field 'a'", + "struct(a=rule).to_proto()"); } private void checkJson(String from, String expected) throws Exception { @@ -711,8 +704,8 @@ public class SkylarkRuleClassFunctionsTest extends SkylarkTestCase { public void testJsonInvalidStructure() throws Exception { checkErrorContains( "Invalid text format, expected a struct, a string, a bool, or an int but got a " - + "ConfigurationTransition for struct field 'a'", - "struct(a=DATA_CFG).to_json()"); + + "function for struct field 'a'", + "struct(a=rule).to_json()"); } @Test diff --git a/src/test/shell/bazel/bazel_worker_test.sh b/src/test/shell/bazel/bazel_worker_test.sh index 6fecea28c4..defc9ff52b 100755 --- a/src/test/shell/bazel/bazel_worker_test.sh +++ b/src/test/shell/bazel/bazel_worker_test.sh @@ -106,7 +106,7 @@ def _impl(ctx): work = rule( implementation=_impl, attrs={ - "worker": attr.label(cfg=HOST_CFG, mandatory=True, allow_files=True, executable=True), + "worker": attr.label(cfg="host", mandatory=True, allow_files=True, executable=True), "worker_args": attr.string_list(), "args": attr.string_list(), "srcs": attr.label_list(allow_files=True), |