Merge "Handle the case when a symbol is annotated with "# apex vndk"" am: 3415780021
am: 11e6e5c76c
am: afdb54813e
Change-Id: Ic63b1ee87e9f3d958ea67945a517a2aba64a2b60
This commit is contained in:
commit
b32e622293
|
@ -119,9 +119,12 @@ def should_omit_version(version, arch, api, vndk, apex):
|
||||||
return True
|
return True
|
||||||
if 'platform-only' in version.tags:
|
if 'platform-only' in version.tags:
|
||||||
return True
|
return True
|
||||||
if 'vndk' in version.tags and not vndk:
|
|
||||||
return True
|
no_vndk_no_apex = 'vndk' not in version.tags and 'apex' not in version.tags
|
||||||
if 'apex' in version.tags and not apex:
|
keep = no_vndk_no_apex or \
|
||||||
|
('vndk' in version.tags and vndk) or \
|
||||||
|
('apex' in version.tags and apex)
|
||||||
|
if not keep:
|
||||||
return True
|
return True
|
||||||
if not symbol_in_arch(version.tags, arch):
|
if not symbol_in_arch(version.tags, arch):
|
||||||
return True
|
return True
|
||||||
|
@ -132,9 +135,11 @@ def should_omit_version(version, arch, api, vndk, apex):
|
||||||
|
|
||||||
def should_omit_symbol(symbol, arch, api, vndk, apex):
|
def should_omit_symbol(symbol, arch, api, vndk, apex):
|
||||||
"""Returns True if the symbol should be omitted."""
|
"""Returns True if the symbol should be omitted."""
|
||||||
if not vndk and 'vndk' in symbol.tags:
|
no_vndk_no_apex = 'vndk' not in symbol.tags and 'apex' not in symbol.tags
|
||||||
return True
|
keep = no_vndk_no_apex or \
|
||||||
if not apex and 'apex' in symbol.tags:
|
('vndk' in symbol.tags and vndk) or \
|
||||||
|
('apex' in symbol.tags and apex)
|
||||||
|
if not keep:
|
||||||
return True
|
return True
|
||||||
if not symbol_in_arch(symbol.tags, arch):
|
if not symbol_in_arch(symbol.tags, arch):
|
||||||
return True
|
return True
|
||||||
|
|
|
@ -751,6 +751,8 @@ class IntegrationTest(unittest.TestCase):
|
||||||
wibble;
|
wibble;
|
||||||
wizzes; # vndk
|
wizzes; # vndk
|
||||||
waggle; # apex
|
waggle; # apex
|
||||||
|
bubble; # apex vndk
|
||||||
|
duddle; # vndk apex
|
||||||
} VERSION_2;
|
} VERSION_2;
|
||||||
|
|
||||||
VERSION_5 { # versioned=14
|
VERSION_5 { # versioned=14
|
||||||
|
@ -771,6 +773,8 @@ class IntegrationTest(unittest.TestCase):
|
||||||
void qux() {}
|
void qux() {}
|
||||||
void wibble() {}
|
void wibble() {}
|
||||||
void waggle() {}
|
void waggle() {}
|
||||||
|
void bubble() {}
|
||||||
|
void duddle() {}
|
||||||
void wobble() {}
|
void wobble() {}
|
||||||
""")
|
""")
|
||||||
self.assertEqual(expected_src, src_file.getvalue())
|
self.assertEqual(expected_src, src_file.getvalue())
|
||||||
|
@ -788,6 +792,8 @@ class IntegrationTest(unittest.TestCase):
|
||||||
global:
|
global:
|
||||||
wibble;
|
wibble;
|
||||||
waggle;
|
waggle;
|
||||||
|
bubble;
|
||||||
|
duddle;
|
||||||
} VERSION_2;
|
} VERSION_2;
|
||||||
""")
|
""")
|
||||||
self.assertEqual(expected_version, version_file.getvalue())
|
self.assertEqual(expected_version, version_file.getvalue())
|
||||||
|
|
Loading…
Reference in New Issue