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

Side by Side Diff: recipe_modules/platform/example.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 unified diff | Download patch
OLDNEW
1 # Copyright 2015 The LUCI Authors. All rights reserved. 1 # Copyright 2015 The LUCI Authors. All rights reserved.
2 # Use of this source code is governed under the Apache License, Version 2.0 2 # Use of this source code is governed under the Apache License, Version 2.0
3 # that can be found in the LICENSE file. 3 # that can be found in the LICENSE file.
4 4
5 DEPS = [ 5 DEPS = [
6 'platform', 6 'platform',
7 'step', 7 'step',
8 ] 8 ]
9 9
10 def RunSteps(api): 10 def RunSteps(api):
11 step_result = api.step('platform things', cmd=None) 11 step_result = api.step('platform things', cmd=None)
12 step_result.presentation.logs['name'] = [api.platform.name] 12 step_result.presentation.logs['name'] = [api.platform.name]
13 step_result.presentation.logs['bits'] = [str(api.platform.bits)] 13 step_result.presentation.logs['bits'] = [str(api.platform.bits)]
14 step_result.presentation.logs['arch'] = [api.platform.arch] 14 step_result.presentation.logs['arch'] = [api.platform.arch]
15 step_result.presentation.logs['cpu_count'] = [str(api.platform.cpu_count)]
15 16
16 17
17 def GenTests(api): 18 def GenTests(api):
18 yield api.test('linux64') + api.platform('linux', 64) 19 yield api.test('linux64') + api.platform('linux', 64)
19 yield api.test('mac64') + api.platform('mac', 64) 20 yield api.test('mac64') + api.platform('mac', 64)
20 yield api.test('win32') + api.platform('win', 32) 21 yield api.test('win32') + api.platform('win', 32)
22 yield api.test('four_cores') + api.platform.cpu_count(4)
OLDNEW
« no previous file with comments | « recipe_modules/platform/api.py ('k') | recipe_modules/platform/example.expected/four_cores.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698