Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(280)

Side by Side Diff: tools/memory_inspector/run_tests

Issue 559023002: [Android] memory_inspector: bug / UI fixes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mi1_heapdump_sigstop
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2014 The Chromium Authors. All rights reserved. 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 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import logging 6 import logging
7 import memory_inspector 7 import memory_inspector
8 import sys 8 import sys
9 import unittest 9 import unittest
10 10
11 11
12 if __name__ == '__main__': 12 if __name__ == '__main__':
13 logging.basicConfig( 13 logging.basicConfig(
14 level=logging.DEBUG if '-v' in sys.argv else logging.WARNING, 14 level=logging.DEBUG if '-v' in sys.argv else logging.WARNING,
15 format='%(levelname)5s %(filename)15s(%(lineno)3d): %(message)s') 15 format='%(levelname)5s %(filename)15s(%(lineno)3d): %(message)s')
16 16
17 suite = unittest.TestSuite() 17 suite = unittest.TestSuite()
18 loader = unittest.TestLoader() 18 loader = unittest.TestLoader()
19 pattern = '*%s*_unittest.py' % ('' if len(sys.argv) < 2 else sys.argv[1])
19 suite.addTests(loader.discover(start_dir=memory_inspector.ROOT_DIR, 20 suite.addTests(loader.discover(start_dir=memory_inspector.ROOT_DIR,
20 pattern='*_unittest.py')) 21 pattern=pattern))
21 res = unittest.TextTestRunner(verbosity=2).run(suite) 22 res = unittest.TextTestRunner(verbosity=2).run(suite)
22 if res.wasSuccessful(): 23 if res.wasSuccessful():
23 sys.exit(0) 24 sys.exit(0)
24 else: 25 else:
25 sys.exit(1) 26 sys.exit(1)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698