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

Commit 31e446c3 authored by Steve Block's avatar Steve Block
Browse files

Add extra error handling to DRT2 launcher script

Bug: 3291220
Change-Id: I6f8e57458cd4334a998eb256af303ffcd9c50d64
parent bdd8a162
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -44,9 +44,15 @@ def main(path, options):
  logging.info("Running the tests...")
  logging.debug("Command = %s" % cmd)
  (stdoutdata, stderrdata) = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
  if stderrdata != "":
    logging.info("Failed to start tests:\n%s", stderrdata)
    return
  if re.search("^INSTRUMENTATION_STATUS_CODE: -1", stdoutdata, re.MULTILINE) != None:
    logging.info("Failed to run the tests. Is DumpRenderTree2 installed on the device?")
    return
  if re.search("^OK \([0-9]+ tests?\)", stdoutdata, re.MULTILINE) == None:
    logging.info("DumpRenderTree2 failed to run correctly:\n%s", stdoutdata)
    return

  logging.info("Downloading the summaries...")