Search in sources :

Example 61 with Package

use of com.google.devtools.build.lib.packages.Package in project bazel by bazelbuild.

the class AbstractAttributeMapperTest method testPackageDefaultProperties.

@Test
public void testPackageDefaultProperties() throws Exception {
    rule = scratchRule("a", "myrule", "cc_binary(name = 'myrule',", "          srcs = ['a', 'b', 'c'])");
    Package pkg = rule.getPackage();
    assertEquals(pkg.getDefaultHdrsCheck(), mapper.getPackageDefaultHdrsCheck());
    assertEquals(pkg.getDefaultTestOnly(), mapper.getPackageDefaultTestOnly());
    assertEquals(pkg.getDefaultDeprecation(), mapper.getPackageDefaultDeprecation());
}
Also used : Package(com.google.devtools.build.lib.packages.Package) Test(org.junit.Test)

Aggregations

Package (com.google.devtools.build.lib.packages.Package)61 SkyKey (com.google.devtools.build.skyframe.SkyKey)25 Test (org.junit.Test)20 PackageIdentifier (com.google.devtools.build.lib.cmdline.PackageIdentifier)14 NoSuchPackageException (com.google.devtools.build.lib.packages.NoSuchPackageException)14 Label (com.google.devtools.build.lib.cmdline.Label)13 Path (com.google.devtools.build.lib.vfs.Path)13 RootedPath (com.google.devtools.build.lib.vfs.RootedPath)13 Target (com.google.devtools.build.lib.packages.Target)12 NoSuchTargetException (com.google.devtools.build.lib.packages.NoSuchTargetException)11 Nullable (javax.annotation.Nullable)10 BuildFileContainsErrorsException (com.google.devtools.build.lib.packages.BuildFileContainsErrorsException)8 ImmutableMap (com.google.common.collect.ImmutableMap)7 ConfiguredTarget (com.google.devtools.build.lib.analysis.ConfiguredTarget)5 BuildFileNotFoundException (com.google.devtools.build.lib.packages.BuildFileNotFoundException)5 LinkedHashSet (java.util.LinkedHashSet)5 LabelSyntaxException (com.google.devtools.build.lib.cmdline.LabelSyntaxException)4 SkyValue (com.google.devtools.build.skyframe.SkyValue)4 InvalidConfigurationException (com.google.devtools.build.lib.analysis.config.InvalidConfigurationException)3 Attribute (com.google.devtools.build.lib.packages.Attribute)3