From 8edeb6372e296629ba11ecaf8bf3517f373c3efe Mon Sep 17 00:00:00 2001 From: Martin Stjernholm Date: Tue, 21 May 2019 12:18:38 +0100 Subject: [PATCH] Add some more visibility test cases. Bug: 112158820 Test: Soong self test Change-Id: Ia359c35c0c124bac2693926ce8f05dd20435f05d --- android/visibility_test.go | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/android/visibility_test.go b/android/visibility_test.go index 680991429..ea5316ced 100644 --- a/android/visibility_test.go +++ b/android/visibility_test.go @@ -1,10 +1,11 @@ package android import ( - "github.com/google/blueprint" "io/ioutil" "os" "testing" + + "github.com/google/blueprint" ) var visibilityTests = []struct { @@ -198,10 +199,17 @@ var visibilityTests = []struct { name: "libnested", deps: ["libexample"], }`), + "other/Blueprints": []byte(` + mock_library { + name: "libother", + deps: ["libexample"], + }`), }, expectedErrors: []string{ `module "libnested" variant "android_common": depends on //top:libexample which is not` + ` visible to this module; //top:libexample is only visible to \[//top:__pkg__\]`, + `module "libother" variant "android_common": depends on //top:libexample which is not` + + ` visible to this module; //top:libexample is only visible to \[//top:__pkg__\]`, }, }, { @@ -223,10 +231,17 @@ var visibilityTests = []struct { name: "libnested", deps: ["libexample"], }`), + "other/Blueprints": []byte(` + mock_library { + name: "libother", + deps: ["libexample"], + }`), }, expectedErrors: []string{ `module "libnested" variant "android_common": depends on //top:libexample which is not` + ` visible to this module; //top:libexample is only visible to \[//top:__pkg__\]`, + `module "libother" variant "android_common": depends on //top:libexample which is not` + + ` visible to this module; //top:libexample is only visible to \[//top:__pkg__\]`, }, }, {