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

Commit ad1e25da authored by Guang Zhu's avatar Guang Zhu
Browse files

Fix the bogus crashes in layout and reliability tests (the device actually went offline).

parent 1fa72447
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -197,7 +197,17 @@ def main(options, args):
    logging.error("DumpRenderTree crashed, output:\n" + adb_output)

    shell_cmd_str = adb_cmd + " shell cat /sdcard/android/running_test.txt"
    crashed_test = subprocess.Popen(shell_cmd_str, shell=True, stdout=subprocess.PIPE).communicate()[0]
    crashed_test = ""
    while not crashed_test:
      (crashed_test, err) = subprocess.Popen(
          shell_cmd_str, shell=True, stdout=subprocess.PIPE,
          stderr=subprocess.PIPE).communicate()
      crashed_test = crashed_test.strip()
      if not crashed_test:
        logging.error('Cannot get crashed test name, device offline?')
        logging.error('stderr: ' + err)
        logging.error('retrying in 10s...')
        time.sleep(10)

    logging.info(crashed_test + " CRASHED");
    crashed_tests.append(crashed_test);
+12 −2
Original line number Diff line number Diff line
@@ -195,8 +195,18 @@ def main(options, args):
  while not DumpRenderTreeFinished(adb_cmd):
    logging.error("DumpRenderTree exited before all URLs are visited.")
    shell_cmd_str = adb_cmd + " shell cat " + TEST_STATUS_FILE
    crashed_test = subprocess.Popen(shell_cmd_str, shell=True,
                                    stdout=subprocess.PIPE).communicate()[0]
    crashed_test = ""
    while not crashed_test:
      (crashed_test, err) = subprocess.Popen(
          shell_cmd_str, shell=True, stdout=subprocess.PIPE,
          stderr=subprocess.PIPE).communicate()
      crashed_test = crashed_test.strip()
      if not crashed_test:
        logging.error('Cannot get crashed test name, device offline?')
        logging.error('stderr: ' + err)
        logging.error('retrying in 10s...')
        time.sleep(10)

    logging.info(crashed_test + " CRASHED")
    crashed_tests.append(crashed_test)
    Bugreport(crashed_test, bugreport_dir, adb_cmd)