Skip to content

Commit

Permalink
Edify: Add AssertSomeBaseband
Browse files Browse the repository at this point in the history
Allow releasetools.py to assert a baseband version. Works just like
AssertSomeBootloader.

Change-Id: Ic8eb341cef1d777d983be25ba21a3bc545819c29
  • Loading branch information
mdmower authored and Flinny committed Sep 8, 2016
1 parent b43f965 commit e7e7046
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tools/releasetools/edify_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,14 @@ def AssertSomeBootloader(self, *bootloaders):
");")
self.script.append(self.WordWrap(cmd))

def AssertSomeBaseband(self, *basebands):
"""Assert that the baseband version is one of *basebands."""
cmd = ("assert(" +
" ||\0".join(['getprop("ro.baseband") == "%s"' % (b,)
for b in basebands]) +
");")
self.script.append(self._WordWrap(cmd))

def RunBackup(self, command):
self.script.append('package_extract_file("system/bin/backuptool.sh", "/tmp/backuptool.sh");')
self.script.append('package_extract_file("system/bin/backuptool.functions", "/tmp/backuptool.functions");')
Expand Down

0 comments on commit e7e7046

Please sign in to comment.