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

Commit 8e335df8 authored by Myles Watson's avatar Myles Watson
Browse files

Cert: Suppress expected errors with pulling files

Bug: 190653955
Test: cert/run --device
Tag: #testing
Change-Id: I7eacfd165aeeeff2e95e0d75c9cd416c66656b12
parent 42c67c65
Loading
Loading
Loading
Loading
+21 −6
Original line number Diff line number Diff line
@@ -304,12 +304,27 @@ class GdAndroidDevice(GdDeviceBase):
            logging.error("logcat_process %s_%s stopped with code: %d" % (self.label, self.serial_number, return_code))
        self.logcat_logger.stop()
        self.cleanup_port_forwarding()
        self.adb.pull("/data/misc/bluetooth/logs/btsnoop_hci.log %s" % os.path.join(self.log_path_base,
                                                                                    "%s_btsnoop_hci.log" % self.label))
        try:
            self.adb.pull("/data/misc/bluetooth/logs/btsnoop_hci.log %s" % os.path.join(
                self.log_path_base, "%s_btsnoop_hci.log" % self.label))
        except AdbError as error:
            # Some tests have no snoop logs, and that's OK
            if "No such file or directory" not in str(error):
                logging.error("While trying to pull log files" + str(error))
        try:
            self.adb.pull("/data/misc/bluedroid/bt_config.conf %s" % os.path.join(self.log_path_base,
                                                                                  "%s_bt_config.conf" % self.label))
        self.adb.pull(
            "/data/misc/bluedroid/bt_config.bak %s" % os.path.join(self.log_path_base, "%s_bt_config.bak" % self.label))
        except AdbError as error:
            # Some tests have no config file, and that's OK
            if "No such file or directory" not in str(error):
                logging.error("While trying to pull log files" + str(error))
        try:
            self.adb.pull("/data/misc/bluedroid/bt_config.bak %s" % os.path.join(self.log_path_base,
                                                                                 "%s_bt_config.bak" % self.label))
        except AdbError as error:
            # Some tests have no config.bak file, and that's OK
            if "No such file or directory" not in str(error):
                logging.error("While trying to pull log files" + str(error))

    def cleanup_port_forwarding(self):
        try: