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

Unified Diff: tools/memory_inspector/run_tests

Issue 167223002: Fix directory layout for tools/memory_inspector tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nit Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: tools/memory_inspector/run_tests
diff --git a/tools/memory_inspector/run_tests b/tools/memory_inspector/run_tests
new file mode 100755
index 0000000000000000000000000000000000000000..acea524e62737208a7dbbcf5a137ec79fce73ec9
--- /dev/null
+++ b/tools/memory_inspector/run_tests
@@ -0,0 +1,35 @@
+#!/usr/bin/python
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import logging
+import os
+import sys
+import unittest
+
+
+if __name__ == '__main__':
+ cur_dir = os.path.abspath(os.path.dirname(__file__))
+ chromium_dir = os.path.abspath(os.path.join(cur_dir, os.pardir, os.pardir))
+
+ sys.path += [
+ cur_dir,
+
+ # Include all dependencies.
+ os.path.join(chromium_dir, 'build', 'android'), # For pylib.
+ ]
+
+ logging.basicConfig(
+ level=logging.DEBUG if '-v' in sys.argv else logging.WARNING,
+ format='%(levelname)5s %(filename)15s(%(lineno)3d): %(message)s')
+
+ suite = unittest.TestSuite()
+ loader = unittest.TestLoader()
+ suite.addTests(loader.discover(start_dir=cur_dir, pattern='*_unittest.py'))
+
+ res = unittest.TextTestRunner(verbosity=2).run(suite)
+ if res.wasSuccessful():
+ sys.exit(0)
+ else:
+ sys.exit(1)
« no previous file with comments | « tools/memory_inspector/memory_inspector/unittest/mock_adb/mock_adb.py ('k') | tools/memory_inspector/tests/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698