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

Unified Diff: tools/auto_bisect/run_tests

Issue 529593002: In the presubmit for auto-bisect, run pylint and unit tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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
« no previous file with comments | « tools/auto_bisect/builder.py ('k') | tools/auto_bisect/source_control.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/auto_bisect/run_tests
diff --git a/tools/auto_bisect/run_tests b/tools/auto_bisect/run_tests
new file mode 100755
index 0000000000000000000000000000000000000000..0ee241e388ac51662f4883b1f2c8ae4c3d996ee3
--- /dev/null
+++ b/tools/auto_bisect/run_tests
@@ -0,0 +1,27 @@
+#!/usr/bin/env 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.
+
+"""Runs all tests in all unit test modules in this directory."""
+
+import os
+import sys
+import unittest
+
+
+def main():
+ suite = unittest.TestSuite()
+ loader = unittest.TestLoader()
+
+ # Add all tests in the directory.
+ script_dir = os.path.dirname(__file__)
+ suite.addTests(loader.discover(start_dir=script_dir, pattern='*_test.py'))
+
+ print 'Running unit tests in %s...' % os.path.abspath(script_dir)
+ result = unittest.TextTestRunner(verbosity=1).run(suite)
+ return 0 if result.wasSuccessful() else 1
+
+
+if __name__ == '__main__':
+ sys.exit(main())
« no previous file with comments | « tools/auto_bisect/builder.py ('k') | tools/auto_bisect/source_control.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698