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

Unified Diff: utils/site_test_importer_attributes.py

Issue 1617004: Add chromeos site-specific test importer wrappers. (Closed)
Patch Set: Tidy up a bit Created 10 years, 9 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 | « utils/site_test_importer.sh ('k') | utils/site_whitelist_tests » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/site_test_importer_attributes.py
diff --git a/utils/site_test_importer_attributes.py b/utils/site_test_importer_attributes.py
new file mode 100755
index 0000000000000000000000000000000000000000..a2a1b509d962deecda1ac1ef8aba6b3cea498a2b
--- /dev/null
+++ b/utils/site_test_importer_attributes.py
@@ -0,0 +1,25 @@
+#!/usr/bin/python
+#
+# Copyright 2010 Google Inc. All Rights Reserved.
+"""
+This allows a site to customize the test creation attributes.
+
+"""
+
+
+import common, re
+
+
+def _set_attributes_custom(test, data):
+ # We set the test name to the dirname of the control file.
+ test_new_name = test.path.split('/')
+ if test_new_name[-1] == 'control' or test_new_name[-1] == 'control.srv':
+ test.name = test_new_name[-2]
+ else:
+ control_name = "%s:%s"
+ control_name %= (test_new_name[-2],
+ test_new_name[-1])
+ test.name = re.sub('control.*\.', '', control_name)
+
+ # We set verify to always False (0).
+ test.run_verify = 0
« no previous file with comments | « utils/site_test_importer.sh ('k') | utils/site_whitelist_tests » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698