Merge changes I42cb181f,I6413c9b1 am: 33ee25466f
am: 00c2bbb0e7
Change-Id: Icca90608b256e726a9a1bd79e9cedca1a6b53f84
This commit is contained in:
@@ -143,37 +143,6 @@ var neverallowTests = []struct {
|
||||
expectedError: "java_device_for_host can only be used in whitelisted projects",
|
||||
},
|
||||
// Libcore rule tests
|
||||
{
|
||||
name: "no_standard_libs: true inside core libraries",
|
||||
fs: map[string][]byte{
|
||||
"libcore/Blueprints": []byte(`
|
||||
java_library {
|
||||
name: "inside_core_libraries",
|
||||
no_standard_libs: true,
|
||||
}`),
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "no_standard_libs: true outside core libraries",
|
||||
fs: map[string][]byte{
|
||||
"Blueprints": []byte(`
|
||||
java_library {
|
||||
name: "outside_core_libraries",
|
||||
no_standard_libs: true,
|
||||
}`),
|
||||
},
|
||||
expectedError: "module \"outside_core_libraries\": violates neverallow",
|
||||
},
|
||||
{
|
||||
name: "no_standard_libs: false",
|
||||
fs: map[string][]byte{
|
||||
"Blueprints": []byte(`
|
||||
java_library {
|
||||
name: "outside_core_libraries",
|
||||
no_standard_libs: false,
|
||||
}`),
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "sdk_version: \"none\" inside core libraries",
|
||||
fs: map[string][]byte{
|
||||
@@ -205,18 +174,6 @@ var neverallowTests = []struct {
|
||||
}`),
|
||||
},
|
||||
},
|
||||
// java_library_host rule tests
|
||||
{
|
||||
name: "java_library_host with no_standard_libs: true",
|
||||
fs: map[string][]byte{
|
||||
"libcore/Blueprints": []byte(`
|
||||
java_library_host {
|
||||
name: "inside_core_libraries",
|
||||
no_standard_libs: true,
|
||||
}`),
|
||||
},
|
||||
expectedError: "module \"inside_core_libraries\": violates neverallow",
|
||||
},
|
||||
}
|
||||
|
||||
func TestNeverallow(t *testing.T) {
|
||||
@@ -291,9 +248,8 @@ func (p *mockCcLibraryModule) GenerateAndroidBuildActions(ModuleContext) {
|
||||
}
|
||||
|
||||
type mockJavaLibraryProperties struct {
|
||||
Libs []string
|
||||
No_standard_libs *bool
|
||||
Sdk_version *string
|
||||
Libs []string
|
||||
Sdk_version *string
|
||||
}
|
||||
|
||||
type mockJavaLibraryModule struct {
|
||||
|
Reference in New Issue
Block a user