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

Unified Diff: recipe_modules/platform/test_api.py

Issue 2641253005: Add multiprocessing.cpu_count access to platform module. (Closed)
Patch Set: Created 3 years, 11 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 | « recipe_modules/platform/example.expected/win32.json ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: recipe_modules/platform/test_api.py
diff --git a/recipe_modules/platform/test_api.py b/recipe_modules/platform/test_api.py
index becd767c4074dbe9e310b304d99e0a3224eada6e..934b0bbf552b323736185b618d68def25806c3f5 100644
--- a/recipe_modules/platform/test_api.py
+++ b/recipe_modules/platform/test_api.py
@@ -17,6 +17,13 @@ class PlatformTestApi(recipe_test_api.RecipeTestApi):
assert bits in (32, 64)
return bits
+ @recipe_test_api.mod_test_data
+ @staticmethod
+ def cpu_count(cpu_count):
+ assert isinstance(cpu_count, int)
+ assert cpu_count > 0
+ return cpu_count
+
def __call__(self, name, bits):
return self.name(name) + self.bits(bits)
« no previous file with comments | « recipe_modules/platform/example.expected/win32.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698