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

Unverified Commit c462fb6d authored by Matt Mower's avatar Matt Mower Committed by Michael Bestas
Browse files

Edify: Add AssertSomeBaseband

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

Change-Id: Ic8eb341cef1d777d983be25ba21a3bc545819c29
parent 87e54878
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -148,6 +148,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");')