| OLD | NEW |
| 1 # Copyright 2017 The LUCI Authors. All rights reserved. | 1 # Copyright 2017 The LUCI Authors. All rights reserved. |
| 2 # Use of this source code is governed under the Apache License, Version 2.0 | 2 # Use of this source code is governed under the Apache License, Version 2.0 |
| 3 # that can be found in the LICENSE file. | 3 # that can be found in the LICENSE file. |
| 4 | 4 |
| 5 from __future__ import print_function | 5 from __future__ import print_function |
| 6 | 6 |
| 7 import argparse | |
| 8 import bdb | 7 import bdb |
| 9 import cStringIO | 8 import cStringIO |
| 10 import contextlib | 9 import contextlib |
| 11 import copy | 10 import copy |
| 12 import coverage | 11 import coverage |
| 13 import datetime | 12 import datetime |
| 14 import difflib | 13 import difflib |
| 15 import fnmatch | 14 import fnmatch |
| 16 import functools | 15 import functools |
| 17 import json | 16 import json |
| (...skipping 11 matching lines...) Expand all Loading... |
| 29 from google.protobuf import json_format | 28 from google.protobuf import json_format |
| 30 | 29 |
| 31 from . import checker | 30 from . import checker |
| 32 from . import config_types | 31 from . import config_types |
| 33 from . import loader | 32 from . import loader |
| 34 from . import run | 33 from . import run |
| 35 from . import step_runner | 34 from . import step_runner |
| 36 from . import stream | 35 from . import stream |
| 37 from . import test_result_pb2 | 36 from . import test_result_pb2 |
| 38 | 37 |
| 38 from . import env |
| 39 |
| 40 import argparse # this is vendored |
| 41 |
| 39 | 42 |
| 40 # These variables must be set in the dynamic scope of the functions in this | 43 # These variables must be set in the dynamic scope of the functions in this |
| 41 # file. We do this instead of passing because they're not picklable, and | 44 # file. We do this instead of passing because they're not picklable, and |
| 42 # that's required by multiprocessing. | 45 # that's required by multiprocessing. |
| 43 _UNIVERSE_VIEW = None | 46 _UNIVERSE_VIEW = None |
| 44 _ENGINE_FLAGS = None | 47 _ENGINE_FLAGS = None |
| 45 | 48 |
| 46 | 49 |
| 47 # An event to signal exit, for example on Ctrl-C. | 50 # An event to signal exit, for example on Ctrl-C. |
| 48 _KILL_SWITCH = multiprocessing.Event() | 51 _KILL_SWITCH = multiprocessing.Event() |
| (...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 903 Returns: | 906 Returns: |
| 904 Exit code | 907 Exit code |
| 905 """ | 908 """ |
| 906 global _UNIVERSE_VIEW | 909 global _UNIVERSE_VIEW |
| 907 _UNIVERSE_VIEW = universe_view | 910 _UNIVERSE_VIEW = universe_view |
| 908 global _ENGINE_FLAGS | 911 global _ENGINE_FLAGS |
| 909 _ENGINE_FLAGS = engine_flags | 912 _ENGINE_FLAGS = engine_flags |
| 910 | 913 |
| 911 args = parse_args(raw_args) | 914 args = parse_args(raw_args) |
| 912 return args.func(args) | 915 return args.func(args) |
| OLD | NEW |