aboutsummaryrefslogtreecommitdiff
path: root/buildbot_test_llvm.py
diff options
context:
space:
mode:
Diffstat (limited to 'buildbot_test_llvm.py')
-rwxr-xr-xbuildbot_test_llvm.py107
1 files changed, 73 insertions, 34 deletions
diff --git a/buildbot_test_llvm.py b/buildbot_test_llvm.py
index 5d686891..111068c6 100755
--- a/buildbot_test_llvm.py
+++ b/buildbot_test_llvm.py
@@ -1,4 +1,8 @@
#!/usr/bin/env python2
+#
+# Copyright 2017 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.
"""Script for running llvm validation tests on ChromeOS.
This script launches a buildbot to build ChromeOS with the llvm on
@@ -29,23 +33,59 @@ TOOLCHAIN_DIR = os.path.dirname(os.path.realpath(__file__))
MAIL_PROGRAM = '~/var/bin/mail-sheriff'
VALIDATION_RESULT_DIR = os.path.join(CROSTC_ROOT, 'validation_result')
START_DATE = datetime.date(2016, 1, 1)
-TEST_PER_DAY = 3
+TEST_PER_DAY = 4
+DATA_DIR = '/google/data/rw/users/mo/mobiletc-prebuild/waterfall-report-data/'
+
+# Information about Rotating Boards
+# Board Arch Reference Platform Kernel
+# Board Version
+# ------------ ------- ------------ ------------- -------
+# cave x86_64 glados skylake-y 3.18
+# daisy armv7 daisy exynos-5250 3.8.11
+# elm aarch64 oak mediatek-8173 3.18
+# fizz x86_64 fizz kabylake-u/r 4.4.*
+# gale armv7 3.18
+# grunt x86_64 grunt stoney ridge 4.14.*
+# guado_moblab x86_64 3.14
+# kevin aarch64 gru rockchip-3399 4.4.*
+# lakitu x86_64 4.4.*
+# lars x86_64 kunimitsu skylake-u 3.18
+# link x86_64 ivybridge ivybridge 3.8.11
+# nautilus x86_64 poppy kabylake-y 4.4.*
+# nyan_big armv7 nyan tegra 3.10.18
+# peach_pit armv7 peach exynos-5420 3.8.11
+# peppy x86_64 slippy haswell 3.8.11
+# samus x86_64 auron broadwell 3.14
+# snappy x86_64 reef apollo lake 4.4.*
+# swanky x86_64 rambi baytrail 4.4.*
+# terra x86_64 strago braswell 3.18
+# veyron_jaq armv7 veyron-pinky rockchip-3288 3.14
+# whirlwind armv7 3.14
+# zoombini x86_64 zoombini cannonlake-y 4.14.*
+
TEST_BOARD = [
- 'squawks', # x86_64, rambi (baytrail)
- 'terra', # x86_64, strago (braswell)
- 'lulu', # x86_64, auron (broadwell)
- 'peach_pit', # arm, peach (exynos-5420)
- 'peppy', # x86_64, slippy (haswell celeron)
- 'link', # x86_64, ivybridge (ivybridge)
- 'nyan_big', # arm, nyan (tegra)
- 'sentry', # x86_64, kunimitsu (skylake-u)
- 'chell', # x86_64, glados (skylake-y)
- 'daisy', # arm, daisy (exynos)
- 'caroline', # x86_64, glados (skylake-y)
- 'kevin', # arm, gru (Rockchip)
- 'reef', # x86_64, reef (Apollo Lake)
+ 'cave',
+ 'daisy',
+ # 'elm', tested by arm64-llvm-next-toolchain builder.
+ 'fizz',
+ 'gale',
+ 'grunt',
+ 'guado_moblab',
+ 'kevin',
'lakitu',
+ 'lars',
+ 'link',
+ 'nautilus',
+ 'nyan_big',
+ 'peach_pit',
+ 'peppy',
+ # 'samus', tested by amd64-llvm-next-toolchain builder.
+ 'snappy',
+ 'swanky',
+ 'terra',
+ # 'veyron_jaq', tested by arm-llvm-next-toolchain builder.
'whirlwind',
+ 'zoombini',
]
@@ -59,7 +99,7 @@ class ToolchainVerifier(object):
self._ce = command_executer.GetCommandExecuter()
self._l = logger.GetLogger()
self._compiler = compiler
- self._build = '%s-%s-toolchain' % (board, compiler)
+ self._build = '%s-%s-toolchain-tryjob' % (board, compiler)
self._patches = patches.split(',') if patches else []
self._patches_string = '_'.join(str(p) for p in self._patches)
@@ -69,35 +109,30 @@ class ToolchainVerifier(object):
self._weekday = weekday
self._reports = os.path.join(VALIDATION_RESULT_DIR, compiler, board)
- def _FinishSetup(self):
- """Make sure testing_rsa file is properly set up."""
- # Fix protections on ssh key
- command = ('chmod 600 /var/cache/chromeos-cache/distfiles/target'
- '/chrome-src-internal/src/third_party/chromite/ssh_keys'
- '/testing_rsa')
- ret_val = self._ce.ChrootRunCommand(self._chromeos_root, command)
- if ret_val != 0:
- raise RuntimeError('chmod for testing_rsa failed')
-
def DoAll(self):
"""Main function inside ToolchainComparator class.
Launch trybot, get image names, create crosperf experiment file, run
crosperf, and copy images into seven-day report directories.
"""
- flags = ['--hwtest']
- date_str = datetime.date.today()
- description = 'master_%s_%s_%s' % (self._patches_string, self._build,
- date_str)
- _ = buildbot_utils.GetTrybotImage(
+ buildbucket_id, _ = buildbot_utils.GetTrybotImage(
self._chromeos_root,
self._build,
self._patches,
- description,
- other_flags=flags,
+ tryjob_flags=['--hwtest'],
async=True)
- return 0
+ return buildbucket_id
+
+
+def WriteRotatingReportsData(results_dict, date):
+ """Write data for waterfall report."""
+ fname = '%d-%02d-%02d.builds' % (date.year, date.month, date.day)
+ filename = os.path.join(DATA_DIR, 'rotating-builders', fname)
+ with open(filename, 'w') as out_file:
+ for board in results_dict.keys():
+ buildbucket_id = results_dict[board]
+ out_file.write('%s,%s\n' % (buildbucket_id, board))
def Main(argv):
@@ -148,16 +183,20 @@ def Main(argv):
days = delta.days
start_board = (days * TEST_PER_DAY) % len(TEST_BOARD)
+ results_dict = dict()
for i in range(TEST_PER_DAY):
try:
board = TEST_BOARD[(start_board + i) % len(TEST_BOARD)]
fv = ToolchainVerifier(board, options.chromeos_root, options.weekday,
options.patches, options.compiler)
- fv.DoAll()
+ buildbucket_id = fv.DoAll()
+ if buildbucket_id:
+ results_dict[board] = buildbucket_id
except SystemExit:
logfile = os.path.join(VALIDATION_RESULT_DIR, options.compiler, board)
with open(logfile, 'w') as f:
f.write('Verifier got an exception, please check the log.\n')
+ WriteRotatingReportsData(results_dict, today)
if __name__ == '__main__':