diff options
author | 2021-07-16 11:01:46 -0400 | |
---|---|---|
committer | 2021-08-02 11:50:34 -0700 | |
commit | 067b88976206266082762a3ba757088b7db83ab6 (patch) | |
tree | aefbeee54bcf42b910b3247f3d1eaf5759b1a87c /cc/compiler_test.go | |
parent | 93f51a3cff77664652fd68181304368da8e4b44c (diff) |
Correct isThirdParty check
Previously, isThirdParty check was over-selecting for third-party-ness,
the only non-third-party paths were those explicitly excluded from
typically third party directories, results in ~all code being considered
third party.
Updated test to ensure bionic is not considered third party, which fails
without this change.
Test: go soong tests
Change-Id: Id371aaad2ceef2b3163384fa84712397877cbe90
Diffstat (limited to 'cc/compiler_test.go')
-rw-r--r-- | cc/compiler_test.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/cc/compiler_test.go b/cc/compiler_test.go index c301388ae..a3ee4a616 100644 --- a/cc/compiler_test.go +++ b/cc/compiler_test.go @@ -19,23 +19,24 @@ import ( ) func TestIsThirdParty(t *testing.T) { - shouldFail := []string{ + thirdPartyPaths := []string{ "external/foo/", "vendor/bar/", "hardware/underwater_jaguar/", } - shouldPass := []string{ + nonThirdPartyPaths := []string{ "vendor/google/cts/", "hardware/google/pixel", "hardware/interfaces/camera", "hardware/ril/supa_ril", + "bionic/libc", } - for _, path := range shouldFail { + for _, path := range thirdPartyPaths { if !isThirdParty(path) { t.Errorf("Expected %s to be considered third party", path) } } - for _, path := range shouldPass { + for _, path := range nonThirdPartyPaths { if isThirdParty(path) { t.Errorf("Expected %s to *not* be considered third party", path) } |