#!/usr/bin/env python
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import sys
import unittest

from . import symbolize_trace_macho_reader


class AtosRegexTest(unittest.TestCase):
  def testRegex(self):
    if sys.platform != "darwin":
      return
    file_name = "/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit"
    result = symbolize_trace_macho_reader.ReadMachOTextLoadAddress(file_name)
    self.assertNotEqual(None, result)

    file_name = "/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa"
    result = symbolize_trace_macho_reader.ReadMachOTextLoadAddress(file_name)
    self.assertNotEqual(None, result)


if __name__ == '__main__':
  unittest.main()

#!/usr/bin/env python
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import os
import sys
import unittest

from . import symbolize_trace_macho_reader


class AtosRegexTest(unittest.TestCase):
  def testRegex(self):
    if sys.platform != "darwin":
      return
    file_name = "/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit"
    # TODO(crbug.com/1275181)
    if os.path.exists(file_name):
      result = symbolize_trace_macho_reader.ReadMachOTextLoadAddress(file_name)
      self.assertNotEqual(None, result)

    file_name = "/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa"
    # TODO(crbug.com/1275181)
    if os.path.exists(file_name):
      result = symbolize_trace_macho_reader.ReadMachOTextLoadAddress(file_name)
      self.assertNotEqual(None, result)


if __name__ == '__main__':
  unittest.main()

Work around test failure on Catapult CQ
[Catapult] Work around test failure on Catapult CQ

Bug: chromium:1275181
Change-Id: I78e2f62371ebc872706366bb897336c8e5c7f02f
Reviewed-on: https://chromium-review.googlesource.com/c/catapult/+/3309287
Commit-Queue: John Chen <334fbfbb4df7c78f091ea1b77c69ca6ac731a3f3@chromium.org>
Commit-Queue: Ryan Heise <50ee0a56d43e9e15503d071e9ceb1a6059353025@google.com>
Auto-Submit: John Chen <334fbfbb4df7c78f091ea1b77c69ca6ac731a3f3@chromium.org>
Reviewed-by: Ryan Heise <50ee0a56d43e9e15503d071e9ceb1a6059353025@google.com>
