2 # Copyright 2014 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.
7 import memory_inspector
12 if __name__
== '__main__':
14 level
=logging
.DEBUG
if '-v' in sys
.argv
else logging
.WARNING
,
15 format
='%(levelname)5s %(filename)15s(%(lineno)3d): %(message)s')
17 suite
= unittest
.TestSuite()
18 loader
= unittest
.TestLoader()
19 pattern
= '*%s*_unittest.py' % ('' if len(sys
.argv
) < 2 else sys
.argv
[1])
20 suite
.addTests(loader
.discover(start_dir
=memory_inspector
.ROOT_DIR
,
22 res
= unittest
.TextTestRunner(verbosity
=2).run(suite
)
23 if res
.wasSuccessful():