parameters: (self, mbed_module, compatibility_report)
return_statement: return True
docstring: Test if the library mbed_module has remained compatible.
          Append a message regarding compatibility to compatibility_report.
docstring_summary: Test if the library mbed_module has remained compatible.
          Append a message regarding compatibility to compatibility_report.
docstring_tokens: Test if the library mbed_module has remained compatible . Append a message regarding compatibility to compatibility_report .
function: def _is_library_compatible(self, mbed_module, compatibility_report):
          """Test if the library mbed_module has remained compatible.
          Append a message regarding compatibility to compatibility_report."""
          output_path = os.path.join(
              self.report_dir, "{}-{}-{}.html".format(
                  mbed_module, self.old_version.revision,
                  self.new_version.revision
              )
          )
          try:
              subprocess.check_output(
                  self._abi_compliance_command(mbed_module, output_path),
                  stderr=subprocess.STDOUT
              )
          except subprocess.CalledProcessError as err:
              if err.returncode != 1:
                  raise err
              if self.brief:
                  self.log.info(
                      "Compatibility issues found for {}".format(mbed_module)
                  )
                  report_root = ET.fromstring(err.output.decode("utf-8"))
                  self._remove_extra_detail_from_report(report_root)
                  self.log.info(ET.tostring(report_root).decode("utf-8"))
              else:
                  self.can_remove_report_dir = False
                  compatibility_report.append(
                      "Compatibility issues found for {}, "
                      "for details see {}".format(mbed_module, output_path)
                  )
              return False
          compatibility_report.append(
              "No compatibility issues for {}".format(mbed_module)
          )
          if not (self.keep_all_reports or self.brief):
              os.remove(output_path)
          return True
function_tokens: def _is_library_compatible ( self , mbed_module , compatibility_report ) : output_path = os . path . join ( self . report_dir , "{}-{}-{}.html" . format ( mbed_module , self . old_version . revision , self . new_version . revision ) ) try : subprocess . check_output ( self . _abi_compliance_command ( mbed_module , output_path ) , stderr = subprocess . STDOUT ) except subprocess . CalledProcessError as err : if err . returncode != 1 : raise err if self . brief : self . log . info ( "Compatibility issues found for {}" . format ( mbed_module ) ) report_root = ET . fromstring ( err . output . decode ( "utf-8" ) ) self . _remove_extra_detail_from_report ( report_root ) self . log . info ( ET . tostring ( report_root ) . decode ( "utf-8" ) ) else : self . can_remove_report_dir = False compatibility_report . append ( "Compatibility issues found for {}, " "for details see {}" . format ( mbed_module , output_path ) ) return False compatibility_report . append ( "No compatibility issues for {}" . format ( mbed_module ) ) if not ( self . keep_all_reports or self . brief ) : os . remove ( output_path ) return True