perf: fix bot names for wifi tests
Revert an old change to (http://crrev.com/c/246310) to fix bot names for
wifi tests.
BUG=chromium:950639
TEST=Presubmit
Change-Id: I034e07d2ed1ca1ac11eb91f341ce9e26f4b582e6
Reviewed-on: https://chromium-review.googlesource.com/1703222
Tested-by: Harpreet Grewal <harpreet@chromium.org>
Commit-Ready: Harpreet Grewal <harpreet@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Xixuan Wu <xixuan@chromium.org>
diff --git a/client/cros/constants.py b/client/cros/constants.py
index bafd8fd..89b0b37 100644
--- a/client/cros/constants.py
+++ b/client/cros/constants.py
@@ -201,6 +201,3 @@
# Moblab Environment Constants.
MOBLAB_USER = 'moblab'
-
-# Variant test keyval
-VARIANT_KEY = 'variant_key'
diff --git a/server/cros/network/wifi_cell_test_base.py b/server/cros/network/wifi_cell_test_base.py
index 5d66ccb..5f3b9b9 100644
--- a/server/cros/network/wifi_cell_test_base.py
+++ b/server/cros/network/wifi_cell_test_base.py
@@ -4,10 +4,8 @@
import logging
-from autotest_lib.client.common_lib import error
from autotest_lib.client.common_lib import utils
from autotest_lib.client.common_lib.cros.network import xmlrpc_datatypes
-from autotest_lib.client.cros import constants
from autotest_lib.server import test
from autotest_lib.server.cros.network import wifi_test_context_manager
@@ -29,16 +27,6 @@
"""
- def initialize(self, host):
- # There are some DUTs that have different types of wifi modules.
- # In order to generate separate performance graphs, a variant
- # name is needed. Writing this key will generate results with
- # the name of <board>-<variant>.
- info = host.host_info_store.get()
- variant_name = info.get_label_value('variant')
- if variant_name:
- self.write_test_keyval({constants.VARIANT_KEY: variant_name})
-
@property
def context(self):
"""@return the WiFi context for this test."""
diff --git a/tko/perf_upload/perf_uploader.py b/tko/perf_upload/perf_uploader.py
index deee96b..31aa4eb 100644
--- a/tko/perf_upload/perf_uploader.py
+++ b/tko/perf_upload/perf_uploader.py
@@ -21,7 +21,6 @@
import urllib2
import common
-from autotest_lib.client.cros import constants
from autotest_lib.tko import utils as tko_utils
_ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
@@ -106,8 +105,8 @@
def _format_for_upload(platform_name, cros_version, chrome_version,
- hardware_id, variant_name, hardware_hostname,
- perf_data, presentation_info, jobname):
+ hardware_id, hardware_hostname, perf_data,
+ presentation_info, jobname):
"""Formats perf data suitable to upload to the perf dashboard.
The perf dashboard expects perf data to be uploaded as a
@@ -122,7 +121,6 @@
@param chrome_version: The string chrome version number.
@param hardware_id: String that identifies the type of hardware the test was
executed on.
- @param variant_name: String that identifies the variant name of the board.
@param hardware_hostname: String that identifies the name of the device the
test was executed on.
@param perf_data: A dictionary of measured perf data as computed by
@@ -136,9 +134,6 @@
to the performance dashboard.
"""
- if variant_name:
- platform_name += '-' + variant_name
-
perf_values = perf_data
# Client side case - server side comes with its own charts data section.
if 'charts' not in perf_values:
@@ -160,7 +155,6 @@
'default_rev': 'r_cros_version',
'hardware_identifier': hardware_id,
'hardware_hostname': hardware_hostname,
- 'variant_name': variant_name,
'jobname': jobname,
},
'chart_data': perf_values,
@@ -306,7 +300,6 @@
platform_name += '.arc'
hardware_id = test.attributes.get('hwid', '')
hardware_hostname = test.machine
- variant_name = test.attributes.get(constants.VARIANT_KEY, None)
config_data = _parse_config_file(_PRESENTATION_CONFIG_FILE)
try:
shadow_config_data = _parse_config_file(_PRESENTATION_SHADOW_CONFIG_FILE)
@@ -319,8 +312,7 @@
presentation_info = _gather_presentation_info(config_data, test_name)
formatted_data = _format_for_upload(
platform_name, cros_version, chrome_version, hardware_id,
- variant_name, hardware_hostname, test.perf_values,
- presentation_info, jobname)
+ hardware_hostname, test.perf_values, presentation_info, jobname)
_send_to_dashboard(formatted_data)
except PerfUploadingError as e:
tko_utils.dprint('Error when uploading perf data to the perf '
diff --git a/tko/perf_upload/perf_uploader_unittest.py b/tko/perf_upload/perf_uploader_unittest.py
index 96b8fb8..3565d53 100644
--- a/tko/perf_upload/perf_uploader_unittest.py
+++ b/tko/perf_upload/perf_uploader_unittest.py
@@ -441,7 +441,7 @@
"""Verifies format_for_upload generates correct json data."""
result = perf_uploader._format_for_upload(
'platform', '25.1200.0.0', '25.10.1000.0', 'WINKY E2A-F2K-Q35',
- 'i7', 'test_machine', self._perf_data, self._PRESENT_INFO,
+ 'test_machine', self._perf_data, self._PRESENT_INFO,
'52926644-username/hostname')
expected_result_string = (
'{"versions": {'
@@ -449,7 +449,7 @@
'"chrome_version": "25.10.1000.0"'
'},'
'"point_id": 10000000120000000,'
- '"bot": "cros-platform-i7",'
+ '"bot": "cros-platform",'
'"chart_data": {'
'"charts": {'
'"metric2": {'
@@ -474,8 +474,7 @@
'"hardware_identifier": "WINKY E2A-F2K-Q35",'
'"jobname": "52926644-username/hostname",'
'"hardware_hostname": "test_machine",'
- '"default_rev": "r_cros_version",'
- '"variant_name": "i7"}'
+ '"default_rev": "r_cros_version"}'
'}')
self._verify_result_string(result['data'], expected_result_string)