2 # Copyright (c) 2012 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.
8 from telemetry_lib
import telemetry
9 from telemetry
.unittest
import gtest_testrunner
10 from telemetry
.unittest
import run_tests
12 if __name__
== '__main__':
13 top_level_dir
= os
.path
.abspath(os
.path
.dirname(__file__
))
14 runner
= gtest_testrunner
.GTestTestRunner(print_result_after_run
=False)
15 ret
= run_tests
.Main(sys
.argv
[1:], '.', top_level_dir
, runner
)
18 runner
.result
.PrintSummary()
19 sys
.exit(min(ret
+ runner
.result
.num_errors
, 255))