diff options
author | Zhizhou Yang <zhizhouy@google.com> | 2019-11-01 13:57:48 -0700 |
---|---|---|
committer | Zhizhou Yang <zhizhouy@google.com> | 2019-11-04 04:50:33 +0000 |
commit | 70a43c3d7cf927c3c0eab4deb9f63a91b6900b43 (patch) | |
tree | c623b68c767ab314904e096ba8572ada960e4d2f /crosperf | |
parent | 011c5716590ebf0d7871e355286c68b0f8804f83 (diff) | |
download | toolchain-utils-70a43c3d7cf927c3c0eab4deb9f63a91b6900b43.tar.gz |
crosperf: fix a download image bug
This is a fix to a bug introduced by
https://chromium-review.googlesource.com/1865958. GetXbuddyPath()
function is also called in experiment_file and it's for re-writing the
fields to output. So at that time, we don't need to really check whether
downloading debug again.
BUG=chromium:1010294
TEST=tested with kevin locally.
Change-Id: Ic7daf6d1242f012bdef803faca355df0365f2cdf
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1895979
Tested-by: Zhizhou Yang <zhizhouy@google.com>
Auto-Submit: Zhizhou Yang <zhizhouy@google.com>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Denis Nikitin <denik@chromium.org>
Diffstat (limited to 'crosperf')
-rw-r--r-- | crosperf/experiment_file.py | 9 | ||||
-rwxr-xr-x | crosperf/settings_unittest.py | 21 |
2 files changed, 15 insertions, 15 deletions
diff --git a/crosperf/experiment_file.py b/crosperf/experiment_file.py index 41a2b809..33459d11 100644 --- a/crosperf/experiment_file.py +++ b/crosperf/experiment_file.py @@ -170,13 +170,12 @@ class ExperimentFile(object): debug_path = '' if debug_field.assigned: debug_path = autotest_field.GetString() - perf_args_field = self.global_settings.fields['perf_args'] - perf_args = '' - if perf_args_field.assigned: - perf_args = perf_args_field.GetString() + # Do not download the debug symbols since this function is for + # canonicalizing experiment file. + downlad_debug = False image_path, autotest_path, debug_path = settings.GetXbuddyPath( value, autotest_path, debug_path, board, chromeos_root, - 'quiet', perf_args) + 'quiet', downlad_debug) res += '\t#actual_image: %s\n' % image_path if not autotest_field.assigned: res += '\t#actual_autotest_path: %s\n' % autotest_path diff --git a/crosperf/settings_unittest.py b/crosperf/settings_unittest.py index b9d87e9e..8140e9b9 100755 --- a/crosperf/settings_unittest.py +++ b/crosperf/settings_unittest.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -#-*- coding: utf-8 -*- +# -*- coding: utf-8 -*- # Copyright 2019 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. @@ -8,8 +8,8 @@ from __future__ import print_function -import mock import unittest +import mock import settings import settings_factory @@ -201,33 +201,34 @@ class TestSettings(unittest.TestCase): xbuddy_str = 'latest-dev' autotest_path = '' debug_path = '' - perf_args = '-a' + download_debug = False self.settings.GetXbuddyPath(trybot_str, autotest_path, debug_path, board, - chromeos_root, log_level, perf_args) + chromeos_root, log_level, download_debug) self.assertEqual(mock_run.call_count, 1) self.assertEqual(mock_run.call_args_list[0][0], ( '/tmp/chromeos', 'remote/trybot-lumpy-paladin/R34-5417.0.0-b1506', '', '', - '-a', + False, )) mock_run.reset_mock() self.settings.GetXbuddyPath(official_str, autotest_path, debug_path, board, - chromeos_root, log_level, perf_args) + chromeos_root, log_level, download_debug) self.assertEqual(mock_run.call_count, 1) self.assertEqual( mock_run.call_args_list[0][0], - ('/tmp/chromeos', 'remote/lumpy-release/R34-5417.0.0', '', '', '-a')) + ('/tmp/chromeos', 'remote/lumpy-release/R34-5417.0.0', '', '', False)) mock_run.reset_mock() self.settings.GetXbuddyPath(xbuddy_str, autotest_path, debug_path, board, - chromeos_root, log_level, perf_args) + chromeos_root, log_level, download_debug) self.assertEqual(mock_run.call_count, 1) - self.assertEqual(mock_run.call_args_list[0][0], - ('/tmp/chromeos', 'remote/lumpy/latest-dev', '', '', '-a')) + self.assertEqual( + mock_run.call_args_list[0][0], + ('/tmp/chromeos', 'remote/lumpy/latest-dev', '', '', False)) if mock_logger: return |