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

Unified Diff: Tools/GardeningServer/tests.py

Issue 465233002: Store alerts in sheriff-o-matic's memcache. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Simplify testing environment. 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
Index: Tools/GardeningServer/tests.py
diff --git a/Tools/GardeningServer/tests.py b/Tools/GardeningServer/tests.py
new file mode 100755
index 0000000000000000000000000000000000000000..91ecccb2390545c450871faccce935243ebaf079
--- /dev/null
+++ b/Tools/GardeningServer/tests.py
@@ -0,0 +1,45 @@
+#!/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.
+
+import os
+import sys
+import unittest
+
+
+_gae_sdk_not_on_python_path_message = '''
+ You must include the google_appengine SDK directory on PYTHONPATH.
+'''
+
+
+_webtest_not_installed_message = '''
+ Could not load webtest python module. You may need to:
+ sudo apt-get python-webtest
+'''
+
+
+def main():
+ try:
+ import dev_appserver
+ except ImportError:
+ print >> sys.stderr, _gae_sdk_not_on_python_path_message
+ raise
+
+ dev_appserver.fix_sys_path()
+
+ try:
+ import webtest
+ except ImportError:
+ print >> sys.stderr, _webtest_not_installed_message
+ raise
+
+ tests_path = os.path.dirname(sys.modules[__name__].__file__)
+ suite = unittest.loader.TestLoader().discover(tests_path,
+ pattern='*_test.py')
+ unittest.TextTestRunner(verbosity=2).run(suite)
+
+
+if __name__ == '__main__':
+ main()

Powered by Google App Engine
This is Rietveld 408576698