Allow setting future api level before REL
At the dev stage, devices may set ro.board.(first_)api_level to the future API level Bug: 276927022 Test: test_post_process_props.py Change-Id: I85c29af74ed8daa780278f64b023480bb6659781
This commit is contained in:
@@ -256,6 +256,7 @@ class PropListTestcase(unittest.TestCase):
|
||||
with contextlib.redirect_stderr(stderr_redirect):
|
||||
props = PropList("hello")
|
||||
props.put("ro.board.first_api_level","25")
|
||||
props.put("ro.build.version.codename", "REL")
|
||||
|
||||
# ro.board.first_api_level must be less than or equal to the sdk version
|
||||
self.assertFalse(validate_grf_props(props, 20))
|
||||
@@ -273,5 +274,10 @@ class PropListTestcase(unittest.TestCase):
|
||||
# ro.board.api_level must be less than or equal to the sdk version
|
||||
self.assertFalse(validate_grf_props(props, 25))
|
||||
|
||||
# allow setting future api_level before release
|
||||
props.get_all_props()[-2].make_as_comment()
|
||||
props.put("ro.build.version.codename", "NonRel")
|
||||
self.assertTrue(validate_grf_props(props, 24))
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main(verbosity=2)
|
||||
|
Reference in New Issue
Block a user