aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaroline Tice <cmtice@google.com>2016-12-02 09:51:56 -0800
committerchrome-bot <chrome-bot@chromium.org>2016-12-02 12:36:52 -0800
commite54c75c2f1b65054ce7562132102f194cf1c7d48 (patch)
treeb84cd6abd1d942bb5d025046ebe21b8fd02dd958
parentc7ee80e420941341fedaf8e620776f5b4a9df9df (diff)
downloadtoolchain-utils-e54c75c2f1b65054ce7562132102f194cf1c7d48.tar.gz
[toolchain-utils] Stop copying files into weekly-reports dir.
Now that we no longer run/use the weekly reports, we should stop copying the data into the weekly reports directories. BUG=chromium:656755 TEST=None Change-Id: I93e371e2c04cd607f47b31ef2eb86be21b5883a1 Reviewed-on: https://chrome-internal-review.googlesource.com/308836 Commit-Ready: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com> Reviewed-by: Yunlian Jiang <yunlian@google.com>
-rwxr-xr-xbuildbot_test_toolchains.py56
-rwxr-xr-xtest_toolchains.py38
2 files changed, 0 insertions, 94 deletions
diff --git a/buildbot_test_toolchains.py b/buildbot_test_toolchains.py
index 34e7c2b7..91d4e3f1 100755
--- a/buildbot_test_toolchains.py
+++ b/buildbot_test_toolchains.py
@@ -30,14 +30,10 @@ USE_NEXT_GCC_PATCH = '230260'
# CL that uses LLVM to build the peppy image.
USE_LLVM_PATCH = '295217'
-# The boards on which we run weekly reports
-WEEKLY_REPORT_BOARDS = ['lumpy']
-
CROSTC_ROOT = '/usr/local/google/crostc'
ROLE_ACCOUNT = 'mobiletc-prebuild'
TOOLCHAIN_DIR = os.path.dirname(os.path.realpath(__file__))
MAIL_PROGRAM = '~/var/bin/mail-sheriff'
-WEEKLY_REPORTS_ROOT = os.path.join(CROSTC_ROOT, 'weekly_test_data')
PENDING_ARCHIVES_DIR = os.path.join(CROSTC_ROOT, 'pending_archives')
NIGHTLY_TESTS_DIR = os.path.join(CROSTC_ROOT, 'nightly_test_reports')
@@ -233,54 +229,6 @@ class ToolchainComparator(object):
ret = self._ce.RunCommand(command)
return
- def _CopyWeeklyReportFiles(self, trybot_image, vanilla_image, nonafdo_image):
- """Put files in place for running seven-day reports.
-
- Create tar files of the custom and official images and copy them
- to the weekly reports directory, so they exist when the weekly report
- gets generated. IMPORTANT NOTE: This function must run *after*
- crosperf has been run; otherwise the vanilla images will not be there.
- """
-
- dry_run = False
- if os.getlogin() != ROLE_ACCOUNT:
- self._l.LogOutput('Running this from non-role account; not copying '
- 'tar files for weekly reports.')
- dry_run = True
-
- images_path = os.path.join(
- os.path.realpath(self._chromeos_root), 'chroot/tmp')
-
- data_dir = os.path.join(WEEKLY_REPORTS_ROOT, self._board)
- dest_dir = os.path.join(data_dir, self._weekday)
- if not os.path.exists(dest_dir):
- os.makedirs(dest_dir)
-
- # Make sure dest_dir is empty (clean out last week's data).
- cmd = 'cd %s; rm -Rf %s_*_image*' % (dest_dir, self._weekday)
- if dry_run:
- print('CMD: %s' % cmd)
- else:
- self._ce.RunCommand(cmd)
-
- # Now create new tar files and copy them over.
- labels = {'test': trybot_image, 'vanilla': vanilla_image}
- if nonafdo_image:
- labels['nonafdo'] = nonafdo_image
- for label_name, test_path in labels.iteritems():
- tar_file_name = '%s_%s_image.tar' % (self._weekday, label_name)
- cmd = ('cd %s; tar -cvf %s %s/chromiumos_test_image.bin; '
- 'cp %s %s/.') % (images_path, tar_file_name, test_path,
- tar_file_name, dest_dir)
- if dry_run:
- print('CMD: %s' % cmd)
- tar_ret = 0
- else:
- tar_ret = self._ce.RunCommand(cmd)
- if tar_ret:
- self._l.LogOutput('Error while creating/copying test tar file(%s).' %
- tar_file_name)
-
def _SendEmail(self):
"""Find email message generated by crosperf and send it."""
filename = os.path.join(self._reports_dir, 'msg_body.html')
@@ -329,10 +277,6 @@ class ToolchainComparator(object):
self._TestImages(trybot_image, vanilla_image, nonafdo_image)
self._SendEmail()
- if (self._patches_string == USE_NEXT_GCC_PATCH and
- self._board in WEEKLY_REPORT_BOARDS):
- # Only try to copy the image files if the test runs ran successfully.
- self._CopyWeeklyReportFiles(trybot_image, vanilla_image, nonafdo_image)
return 0
diff --git a/test_toolchains.py b/test_toolchains.py
index eccf2f55..ecae6f48 100755
--- a/test_toolchains.py
+++ b/test_toolchains.py
@@ -18,7 +18,6 @@ from cros_utils import logger
CROSTC_ROOT = '/usr/local/google/crostc'
MAIL_PROGRAM = '~/var/bin/mail-sheriff'
-WEEKLY_REPORTS_ROOT = os.path.join(CROSTC_ROOT, 'weekly_test_data')
PENDING_ARCHIVES_DIR = os.path.join(CROSTC_ROOT, 'pending_archives')
NIGHTLY_TESTS_DIR = os.path.join(CROSTC_ROOT, 'nightly_test_reports')
@@ -273,41 +272,6 @@ class ToolchainComparator(ChromeOSCheckout):
ret = self._ce.RunCommand(command)
return
- def _CopyWeeklyReportFiles(self, labels):
- """Move files into place for creating 7-day reports.
-
- Create tar files of the custom and official images and copy them
- to the weekly reports directory, so they exist when the weekly report
- gets generated. IMPORTANT NOTE: This function must run *after*
- crosperf has been run; otherwise the vanilla images will not be there.
- """
- images_path = os.path.join(
- os.path.realpath(self._chromeos_root), 'src/build/images', self._board)
- weekday = time.strftime('%a')
- data_dir = os.path.join(WEEKLY_REPORTS_ROOT, self._board)
- dest_dir = os.path.join(data_dir, weekday)
- if not os.path.exists(dest_dir):
- os.makedirs(dest_dir)
- # Make sure dest_dir is empty (clean out last week's data).
- cmd = 'cd %s; rm -Rf %s_*_image*' % (dest_dir, weekday)
- self._ce.RunCommand(cmd)
- # Now create new tar files and copy them over.
- for l in labels:
- test_path = os.path.join(images_path, l)
- if os.path.exists(test_path):
- if l != 'vanilla':
- label_name = 'test'
- else:
- label_name = 'vanilla'
- tar_file_name = '%s_%s_image.tar' % (weekday, label_name)
- cmd = ('cd %s; tar -cvf %s %s/chromiumos_test_image.bin; '
- 'cp %s %s/.') % (images_path, tar_file_name, l, tar_file_name,
- dest_dir)
- tar_ret = self._ce.RunCommand(cmd)
- if tar_ret != 0:
- self._l.LogOutput('Error while creating/copying test tar file(%s).' %
- tar_file_name)
-
def _SendEmail(self):
"""Find email msesage generated by crosperf and send it."""
filename = os.path.join(self._reports_dir, 'msg_body.html')
@@ -330,8 +294,6 @@ class ToolchainComparator(ChromeOSCheckout):
self._FinishSetup()
self._TestLabels(labels)
self._SendEmail()
- # Only try to copy the image files if the test runs ran successfully.
- self._CopyWeeklyReportFiles(labels)
if self._clean:
ret = self._DeleteChroot()
if ret != 0: