Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4e06bdf9 authored by Matt Mower's avatar Matt Mower
Browse files

Edify: Add AssertSomeBaseband

Allow releasetools.py to assert a baseband version. Works just like
AssertSomeBootloader.

Change-Id: Ic8eb341cef1d777d983be25ba21a3bc545819c29
parent f8fc117f
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -108,6 +108,14 @@ class EdifyGenerator(object):
           ");")
    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");')