diff options
author | Yongqin Liu <yongqin.liu@linaro.org> | 2017-11-17 10:39:25 +0800 |
---|---|---|
committer | Yongqin Liu <yongqin.liu@linaro.org> | 2017-11-17 10:39:25 +0800 |
commit | 314db8f37a5ddd6560520bdf3988918e0ebf8760 (patch) | |
tree | 469e0f541c668051af802ac7cc50c9537b5eb5a8 | |
parent | ae37a7bace20898a75bb49505ebdded4847f1dd3 (diff) |
add support of BuildSummary
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
-rw-r--r-- | db.sqlite3 | bin | 6097920 -> 7166976 bytes | |||
-rw-r--r-- | report/admin.py | 2 | ||||
-rw-r--r-- | report/migrations/0004_auto_20171116_1341.py | 36 | ||||
-rw-r--r-- | report/migrations/0005_buildsummary_images_url.py | 21 | ||||
-rw-r--r-- | report/models.py | 16 | ||||
-rw-r--r-- | report/templates/test_report.html | 26 | ||||
-rw-r--r-- | report/views.py | 93 |
7 files changed, 163 insertions, 31 deletions
Binary files differ diff --git a/report/admin.py b/report/admin.py index 7c1e69d..67a92ee 100644 --- a/report/admin.py +++ b/report/admin.py @@ -8,6 +8,7 @@ from .models import TestCase from .models import JobCache from .models import BaseResults from .models import Bug +from .models import BuildSummary class TestCaseAdmin(admin.ModelAdmin): list_display = ('name', 'result', 'measurement', 'unit', 'suite', 'job_id') @@ -18,3 +19,4 @@ admin.site.register(TestCase, TestCaseAdmin) admin.site.register(JobCache) admin.site.register(BaseResults) admin.site.register(Bug) +admin.site.register(BuildSummary) diff --git a/report/migrations/0004_auto_20171116_1341.py b/report/migrations/0004_auto_20171116_1341.py new file mode 100644 index 0000000..1d266c3 --- /dev/null +++ b/report/migrations/0004_auto_20171116_1341.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.5 on 2017-11-16 13:41 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('report', '0003_auto_20171113_1544'), + ] + + operations = [ + migrations.CreateModel( + name='BuildSummary', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('build_name', models.CharField(max_length=64)), + ('build_no', models.CharField(max_length=8)), + ('build_config', models.CharField(max_length=64)), + ('build_commit', models.CharField(max_length=64)), + ('android_version', models.CharField(max_length=32)), + ('kernel_version', models.CharField(max_length=16)), + ('kernel_url', models.CharField(max_length=256)), + ('firmware_url', models.CharField(max_length=256)), + ('firmware_version', models.CharField(max_length=64)), + ('toolchain_info', models.CharField(max_length=256)), + ], + ), + migrations.AlterField( + model_name='bug', + name='status', + field=models.CharField(choices=[('unconfirmed', 'Unconfirmed'), ('confirmed', 'Confirmed'), ('inprogress', 'InProgress'), ('resolved', 'Resolved')], max_length=64), + ), + ] diff --git a/report/migrations/0005_buildsummary_images_url.py b/report/migrations/0005_buildsummary_images_url.py new file mode 100644 index 0000000..6d126db --- /dev/null +++ b/report/migrations/0005_buildsummary_images_url.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.5 on 2017-11-16 14:47 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('report', '0004_auto_20171116_1341'), + ] + + operations = [ + migrations.AddField( + model_name='buildsummary', + name='images_url', + field=models.CharField(default='', max_length=256), + preserve_default=False, + ), + ] diff --git a/report/models.py b/report/models.py index 44c51a2..bceae5a 100644 --- a/report/models.py +++ b/report/models.py @@ -87,3 +87,19 @@ class BaseResults(models.Model): def __str__(self): return "%s %d %d %f %s %s-%s" % (self.module_testcase, self.number_pass, self.number_fail, self.measurement, self.unit, self.build_name, self.build_no) + + +class BuildSummary(models.Model): + build_name = models.CharField(max_length=64) + build_no = models.CharField(max_length=8) + build_config = models.CharField(max_length=64) + build_commit = models.CharField(max_length=64) + android_version = models.CharField(max_length=32) + kernel_version = models.CharField(max_length=16) + kernel_url = models.CharField(max_length=256) + firmware_url = models.CharField(max_length=256) + firmware_version = models.CharField(max_length=64) + toolchain_info = models.CharField(max_length=256) + images_url = models.CharField(max_length=256) + def __str__(self): + return "%s %s %s %s" % (self.build_name, self.build_no, self.android_version, self.kernel_version) diff --git a/report/templates/test_report.html b/report/templates/test_report.html index 3e5c17a..9c21dc4 100644 --- a/report/templates/test_report.html +++ b/report/templates/test_report.html @@ -40,6 +40,22 @@ <td> <a href="{{ build_info.kernel_url }}">{{ build_info.kernel_version }}</a></td> {% endifequal %} <tr/> + <tr> + <th align="left">Toolchain</th> + <td align="left">{{ build_info.toolchain_info}}</td> + <tr/> + <tr> + <th align="left">Firmware Info</th> + {% ifequal build_info.firmware_url '--' %} + <td>{{ build_info.firmware_version }}</td> + {% else %} + <td> <a href="{{ build_info.firmware_url }}">{{ build_info.firmware_version }}</a></td> + {% endifequal %} + <tr/> + <tr> + <th align="left">Images</th> + <td align="left"><a href="{{ build_info.images_url }}">{{ build_info.images_url }}</a></td> + <tr/> </table> <hr/> <h2>Basic Weekly</h2> @@ -341,8 +357,8 @@ No result for benchmark test jobs. {% endwith%} </td> <td align='left'> - <a target='_blank' href="/report/add-bug/?build_name={{ build_info.build_name }}&plan_suite={{ test_info.job_name }}&&module_testcase={{ test_info.job_name }}">Add Bug</a><br/> {% ifequal test_info.number_passrate 0 %} + <a target='_blank' href="/report/add-bug/?build_name={{ build_info.build_name }}&plan_suite={{ test_info.job_name }}&&module_testcase={{ test_info.job_name }}">Add Bug</a><br/> <a target='_blank' href="{{ build_info.new_bug_url_prefix }}{{ test_info.job_name }}">Report Android Bug</a> <!-- <a target='_blank' href="https://bugs.linaro.org/enter_bug.cgi?product=LAVA%20Framework">Report LAVA Bug</a> @@ -363,6 +379,7 @@ No result for benchmark test jobs. <tr> <th>Index</th> <th>Bug Id</th> + <th>Plan/TestSuite</th> <th>Module/TestCase</th> <th>Subject</th> <th>Status</th> @@ -372,11 +389,8 @@ No result for benchmark test jobs. <tr> <td>{{ forloop.counter }}</a></td> <td><a href="{{ bug.link }}">{{ bug.bug_id }}</a></td> - {% ifequal bug.module_testcase '--' %} - <td>{{ bug.module_testcase }}</a></td> - {% else %} - <td>{{ bug.plan_suite }}</a></td> - {% endifequal %} + <td>{{ bug.plan_suite }}</a></td> + <td>{{ bug.module_testcase }}</a></td> <td>{{ bug.subject }}</a></td> <td>{{ bug.status }}</a></td> <td> -- </a></td> diff --git a/report/views.py b/report/views.py index 60fda1c..3ac1de0 100644 --- a/report/views.py +++ b/report/views.py @@ -15,7 +15,7 @@ import yaml from lava_tool.authtoken import AuthenticatingServerProxy, KeyringAuthBackend # Create your views here. -from models import TestCase, JobCache, BaseResults, Bug +from models import TestCase, JobCache, BaseResults, Bug, BuildSummary android_snapshot_url_base = "https://snapshots.linaro.org/android" ci_job_url_base = 'https://ci.linaro.org/job' @@ -93,6 +93,10 @@ build_configs = { 'lava_server': LAVAS[NICK_LAVA_PRODUCTION], 'img_ext': ".img.xz", 'template_dir': "hikey-v2", + 'base_build': { + 'build_name':'android-lcr-reference-hikey-o', + 'build_no': 'N-M-1705', + }, 'bugzilla': { 'new_bug_url': 'https://bugs.linaro.org/enter_bug.cgi', 'product': 'Linaro Android', @@ -108,12 +112,17 @@ build_configs = { 'lava_server': LAVAS[NICK_LAVA_PRODUCTION], 'img_ext': ".img.xz", 'template_dir': "hikey-v2", + 'base_build': { + 'build_name':'android-lcr-reference-hikey-o', + 'build_no': 'N-M-1705', + }, 'bugzilla': { 'new_bug_url': 'https://bugs.linaro.org/enter_bug.cgi', 'product': 'Linaro Android', 'op_sys': 'Android', 'bug_severity': 'normal', 'component': 'AOSP master builds', + 'keywords': '', 'rep_platform': 'HiKey', 'short_desc_prefix': "HiKey", }, @@ -122,6 +131,10 @@ build_configs = { 'lava_server': LAVAS[NICK_LAVA_STAGING], 'img_ext': ".img", 'template_dir': "x15-v2", + 'base_build': { + 'build_name':'android-lcr-reference-x15-o', + 'build_no': 'N-M-1705', + }, 'bugzilla': { 'new_bug_url': 'https://bugs.linaro.org/enter_bug.cgi', 'product': 'Linaro Android', @@ -760,13 +773,16 @@ def index(request): { "builds": builds, }) + + def test_report(request): build_name = request.GET.get("build_name", DEFAULT_BUILD_NAME) - base_build_name = build_name + base_build_name = build_configs[build_name]['base_build']['build_name'] + base_build_no = build_configs[build_name]['base_build']['build_no'] # 0 for old version, might be input manually into db #base_build_no = 'nogat-mlcr-17.05' - base_build_no = 'N-M-1705' + #base_build_no = 'N-M-1705' #base_lava_nick = NICK_LAVA_STAGING all_build_numbers = get_possible_builds(build_name) @@ -827,7 +843,7 @@ def test_report(request): 'bugs': bugs, }) - benchmarks = { # job_name: {'test_suite':['test_case',]}, + benchmarks_common = { # job_name: {'test_suite':['test_case',]}, "boottime": { #'boottime-analyze': ['KERNEL_BOOT_TIME_avg', 'ANDROID_BOOT_TIME_avg', 'TOTAL_BOOT_TIME_avg' ], 'boottime-first-analyze': ['KERNEL_BOOT_TIME_avg', 'ANDROID_BOOT_TIME_avg', 'TOTAL_BOOT_TIME_avg' ], @@ -848,14 +864,6 @@ def test_report(request): 'cf-bench': {'cf-bench': ['cfbench-Overall-Score-mean', 'cfbench-Java-Score-mean', 'cfbench-Native-Score-mean']}, 'gearses2eclair': {'gearses2eclair': ['gearses2eclair',]}, 'geekbench3': {'geekbench3': ['geekbench-multi-core-mean', 'geekbench-single-core-mean']}, - 'glbenchmark25': {'glbenchmark25': ['Fill-rate-C24Z16-mean', 'Fill-rate-C24Z16-Offscreen-mean', - 'GLBenchmark-2.1-Egypt-Classic-C16Z16-mean', 'GLBenchmark-2.1-Egypt-Classic-C16Z16-Offscreen-mean', - 'GLBenchmark-2.5-Egypt-HD-C24Z16-Fixed-timestep-mean', 'GLBenchmark-2.5-Egypt-HD-C24Z16-Fixed-timestep-Offscreen-mean', - 'GLBenchmark-2.5-Egypt-HD-C24Z16-mean', 'GLBenchmark-2.5-Egypt-HD-C24Z16-Offscreen-mean', - 'Triangle-throughput-Textured-C24Z16-Fragment-lit-mean', 'Triangle-throughput-Textured-C24Z16-Offscreen-Fragment-lit-mean', - 'Triangle-throughput-Textured-C24Z16-mean', 'Triangle-throughput-Textured-C24Z16-Offscreen-mean', - 'Triangle-throughput-Textured-C24Z16-Vertex-lit-mean', 'Triangle-throughput-Textured-C24Z16-Offscreen-Vertex-lit-mean', - ],}, 'javawhetstone': {'javawhetstone': ['javawhetstone-MWIPS-mean', 'javawhetstone-N1-float-mean', 'javawhetstone-N2-float-mean', 'javawhetstone-N3-if-mean', 'javawhetstone-N4-fixpt-mean', 'javawhetstone-N5-cos-mean', 'javawhetstone-N6-float-mean', 'javawhetstone-N7-equal-mean', 'javawhetstone-N8-exp-mean',]}, 'jbench': {'jbench': ['jbench-mean',]}, @@ -871,6 +879,21 @@ def test_report(request): 'benchmarkpi-mean', 'Linpack-TimeSingleScore-mean', 'Linpack-TimeMultiScore-mean', 'RL-sqlite-Overall-mean' ] + + glbenchmark25 = { + 'glbenchmark25': {'glbenchmark25': ['Fill-rate-C24Z16-mean', 'Fill-rate-C24Z16-Offscreen-mean', + 'GLBenchmark-2.1-Egypt-Classic-C16Z16-mean', 'GLBenchmark-2.1-Egypt-Classic-C16Z16-Offscreen-mean', + 'GLBenchmark-2.5-Egypt-HD-C24Z16-Fixed-timestep-mean', 'GLBenchmark-2.5-Egypt-HD-C24Z16-Fixed-timestep-Offscreen-mean', + 'GLBenchmark-2.5-Egypt-HD-C24Z16-mean', 'GLBenchmark-2.5-Egypt-HD-C24Z16-Offscreen-mean', + 'Triangle-throughput-Textured-C24Z16-Fragment-lit-mean', 'Triangle-throughput-Textured-C24Z16-Offscreen-Fragment-lit-mean', + 'Triangle-throughput-Textured-C24Z16-mean', 'Triangle-throughput-Textured-C24Z16-Offscreen-mean', + 'Triangle-throughput-Textured-C24Z16-Vertex-lit-mean', 'Triangle-throughput-Textured-C24Z16-Offscreen-Vertex-lit-mean', + ],}, + } + benchmarks = benchmarks_common.copy() + if build_name.find("x15") >= 0: + benchmarks.update(glbenchmark25) + benchmarks_res = [] for job_name in sorted(benchmarks.keys()): job_res = total_tests_res.get(job_name) @@ -1109,17 +1132,34 @@ def test_report(request): ############################################################## build_bugs = Bug.objects.filter(build_name=build_name, ) ############################################################## - snapshot_url = '%s/%s/%s' % (android_snapshot_url_base, build_name, build_no) - pinned_manifest_url = '%s/pinned-manifest.xml' % snapshot_url - if build_name.find('x15') >= 0: - kernel_commit = get_commit_from_pinned_manifest(pinned_manifest_url, 'kernel/ti/x15') - kernel_url = 'http://git.ti.com/android/kernel/commit/%s' % kernel_commit - kernel_version = '4.4.91' - else: - kernel_url = '--' - kernel_version = '--' - build_config_url = "%s/%s" % (android_build_config_url_base, build_name.replace("android-", "")) - build_android_tag = get_build_config_value(build_config_url, key="MANIFEST_BRANCH") + try: + build_summary = BuildSummary.objects.get(build_name=build_name, build_no=build_no) + build_config_url = "%s/%s?id=%s" % (android_build_config_url_base, build_summary.build_config, build_summary.build_commit) + kernel_version = build_summary.kernel_version + kernel_url = build_summary.kernel_url + build_android_tag = build_summary.android_version + firmware_url = build_summary.firmware_url + firmware_version = build_summary.firmware_version + images_url = build_summary.images_url + toolchain_info = build_summary.toolchain_info + except BuildSummary.DoesNotExist: + images_url = '%s/%s/%s' % (android_snapshot_url_base, build_name, build_no) + pinned_manifest_url = '%s/pinned-manifest.xml' % images_url + if build_name.find('x15') >= 0: + kernel_commit = get_commit_from_pinned_manifest(pinned_manifest_url, 'kernel/ti/x15') + kernel_url = 'http://git.ti.com/android/kernel/commit/%s' % kernel_commit + kernel_version = '4.4.91' + else: + kernel_url = '--' + kernel_version = '4.9.60' + + build_config_url = "%s/%s" % (android_build_config_url_base, build_name.replace("android-", "")) + build_android_tag = get_build_config_value(build_config_url, key="MANIFEST_BRANCH") + toolchain_info = '--' + firmware_version = '--' + firmware_url = '--' + + ## bugzilla related information build_bugzilla = build_configs[build_name]['bugzilla'] build_new_bug_url_prefix = '%s?product=%s&op_sys=%s&bug_severity=%s&component=%s&keywords=%s&rep_platform=%s&short_desc=%s: ' % ( build_bugzilla['new_bug_url'], build_bugzilla['product'], @@ -1130,6 +1170,7 @@ def test_report(request): build_bugzilla['rep_platform'], build_bugzilla['short_desc_prefix'], ) + build_info = { 'build_name': build_name, 'build_no': build_no, @@ -1140,12 +1181,14 @@ def test_report(request): 'kernel_version': kernel_version, 'kernel_url': kernel_url, 'ci_link': '%s/%s/%s' % (ci_job_url_base, build_name, build_no), - 'snapshot_url': snapshot_url, 'base_build_no': base_build_no, 'new_bug_url_prefix': build_new_bug_url_prefix, + 'firmware_url': firmware_url, + 'firmware_version': firmware_version, + 'toolchain_info': toolchain_info, + 'images_url': images_url, } - return render(request, 'test_report.html', { 'lava_server_job_prefix': build_configs[build_name]['lava_server'].job_url_prefix, |