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

Unified Diff: scripts/slave/recipe_modules/platform/test_api.py

Issue 23889036: Refactor the way that TestApi works so that it is actually useful. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: rebase Created 7 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 side-by-side diff with in-line comments
Download patch
Index: scripts/slave/recipe_modules/platform/test_api.py
diff --git a/scripts/slave/recipe_modules/platform/test_api.py b/scripts/slave/recipe_modules/platform/test_api.py
new file mode 100644
index 0000000000000000000000000000000000000000..f18832af89c668b05451bba8d69309862a8f977a
--- /dev/null
+++ b/scripts/slave/recipe_modules/platform/test_api.py
@@ -0,0 +1,18 @@
+from slave import recipe_test_api
+
+class PlatformTestApi(recipe_test_api.RecipeTestApi):
+ @recipe_test_api.mod_test_data
+ @staticmethod
+ def name(name):
+ assert name in ('win', 'linux', 'mac')
+ return name
+
+ @recipe_test_api.mod_test_data
+ @staticmethod
+ def bits(bits):
+ assert bits in (32, 64)
+ return bits
+
+ def __call__(self, name, bits):
+ return self.name(name) + self.bits(bits)
+

Powered by Google App Engine
This is Rietveld 408576698