blob: 0d3b670a882a84bab9046d3900fec89dd98fb20a [file] [log] [blame]
Junji Watanabe79d1c7c2019-10-21 04:46:49 +00001#!/usr/bin/env vpython
2# Copyright 2019 The LUCI Authors. All rights reserved.
3# Use of this source code is governed under the Apache License, Version 2.0
4# that can be found in the LICENSE file.
5
6import os
7import sys
8
9import six
10
11from test_support import parallel_test_runner
12
13THIS_DIR = os.path.dirname(os.path.abspath(__file__))
14TESTS_DIR = os.path.join(THIS_DIR, 'tests')
15
16def main():
17 sys.path.insert(0, TESTS_DIR)
18 import test_env
19 test_env.setup()
20
21 # Need to specify config path explicitly
22 # because test_env.setup() changes directory
23 cfg = os.path.join(THIS_DIR, 'unittest.cfg')
24 sys.argv.extend(['-c', cfg])
25
26 # execute test runner
27 return parallel_test_runner.run_tests(python3=six.PY3)
28
29
30if __name__ == '__main__':
31 main()