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

Unified Diff: appengine/swarming/swarming_bot/api/os_utilities.py

Issue 2933593002: Promote 'model' from state to dimension for Macs. (Closed)
Patch Set: model -> mac_model Created 3 years, 6 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 | « no previous file | appengine/swarming/swarming_bot/api/os_utilities_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/swarming/swarming_bot/api/os_utilities.py
diff --git a/appengine/swarming/swarming_bot/api/os_utilities.py b/appengine/swarming/swarming_bot/api/os_utilities.py
index ce8f7b275968a13c74c1c3f8fa15745dbef524dd..9bf698cc7a31f9ae10d5ab40ce7fd6b00b4bacd1 100644
--- a/appengine/swarming/swarming_bot/api/os_utilities.py
+++ b/appengine/swarming/swarming_bot/api/os_utilities.py
@@ -938,6 +938,14 @@ def get_dimensions():
dimensions[u'zone'] = [platforms.gce.get_zone()]
if sys.platform == 'darwin':
+ model = platforms.osx.get_hardware_model_string()
+ if model:
+ dimensions[u'mac_model'] = [model]
+ xcode_versions = platforms.osx.get_xcode_versions()
+ if xcode_versions:
+ dimensions[u'xcode_version'] = xcode_versions
+
+ # iOS devices
udids = platforms.osx.get_ios_device_ids()
device_types = set()
for udid in udids:
@@ -950,7 +958,6 @@ def get_dimensions():
device_types.add(device_type)
if device_types:
dimensions[u'device'] = sorted(device_types)
- dimensions[u'xcode_version'] = platforms.osx.get_xcode_versions()
return dimensions
@@ -997,9 +1004,6 @@ def get_state():
if integrity is not None:
state[u'integrity'] = [integrity]
if sys.platform == 'darwin':
- model = platforms.osx.get_hardware_model_string()
- if model:
- state[u'model'] = model
state[u'xcode'] = platforms.osx.get_xcode_state()
if sys.platform == 'linux2':
temp = platforms.linux.get_temperatures()
« no previous file with comments | « no previous file | appengine/swarming/swarming_bot/api/os_utilities_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698