OLD | NEW |
(Empty) | |
| 1 #!/usr/bin/env python |
| 2 # Copyright 2017 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. |
| 5 |
| 6 """ |
| 7 The symbolizer tests take a long time to run [potentially 5+ minutes each], so |
| 8 they are invoked directly from separately from run_py_tests. |
| 9 """ |
| 10 |
| 11 import os |
| 12 import sys |
| 13 |
| 14 _CATAPULT_PATH = os.path.abspath( |
| 15 os.path.join( |
| 16 os.path.dirname(os.path.realpath(__file__)), |
| 17 os.path.pardir, |
| 18 os.path.pardir)) |
| 19 _TRACING_PATH = os.path.join(_CATAPULT_PATH, 'tracing') |
| 20 |
| 21 |
| 22 def _RunTestsOrDie(top_level_dir): |
| 23 exit_code = run_with_typ.Run(top_level_dir, path=[_TRACING_PATH], |
| 24 suffixes=['*_test_slow.py']) |
| 25 if exit_code: |
| 26 sys.exit(exit_code) |
| 27 |
| 28 |
| 29 def _AddToPathIfNeeded(path): |
| 30 if path not in sys.path: |
| 31 sys.path.insert(0, path) |
| 32 |
| 33 |
| 34 if __name__ == '__main__': |
| 35 _AddToPathIfNeeded(_CATAPULT_PATH) |
| 36 |
| 37 from catapult_build import run_with_typ |
| 38 _RunTestsOrDie(os.path.join(_TRACING_PATH, 'tracing', 'extras', 'symbolizer')) |
| 39 sys.exit(0) |
OLD | NEW |