diff options
author | Yongqin Liu <yongqin.liu@linaro.org> | 2017-11-21 01:34:49 +0800 |
---|---|---|
committer | Yongqin Liu <yongqin.liu@linaro.org> | 2017-11-21 01:34:49 +0800 |
commit | 5fac7f1ca9ab44ed2682928587363bbcbf5bb8a1 (patch) | |
tree | e04c06b5bac00766c898165f46de217b8d0d54c6 | |
parent | 314db8f37a5ddd6560520bdf3988918e0ebf8760 (diff) |
add support for lava user table
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
-rw-r--r-- | db.sqlite3 | bin | 7166976 -> 7687168 bytes | |||
-rw-r--r-- | lcr/settings.py | 35 | ||||
-rw-r--r-- | report/admin.py | 3 | ||||
-rw-r--r-- | report/migrations/0006_auto_20171117_1557.py | 35 | ||||
-rw-r--r-- | report/migrations/0007_auto_20171117_1913.py | 20 | ||||
-rw-r--r-- | report/migrations/0008_lavauser.py | 24 | ||||
-rw-r--r-- | report/models.py | 20 | ||||
-rw-r--r-- | report/templates/test_report.html | 22 | ||||
-rw-r--r-- | report/views.py | 296 |
9 files changed, 329 insertions, 126 deletions
Binary files differ diff --git a/lcr/settings.py b/lcr/settings.py index 4c1c1bd..f7578c0 100644 --- a/lcr/settings.py +++ b/lcr/settings.py @@ -121,3 +121,38 @@ USE_TZ = True # https://docs.djangoproject.com/en/1.11/howto/static-files/ STATIC_URL = '/static/' + +LOGGING = { + 'version': 1, + 'disable_existing_loggers': False, + 'filters': { + 'require_debug_false': { + '()': 'django.utils.log.RequireDebugFalse' + } + }, + + 'handlers': { + 'mail_admins': { + 'level': 'ERROR', + 'filters': ['require_debug_false'], + 'class': 'django.utils.log.AdminEmailHandler' + }, + 'console':{ + 'level': 'DEBUG', + 'class': 'logging.StreamHandler' + }, + }, + + 'loggers': { + 'django.request': { + #'handlers': ['mail_admins'], + 'handlers': ['console'], + 'level': 'INFO', + #'propagate': True, + }, + 'cities': { + 'handlers': ['console'], + 'level': 'INFO' + }, + } +} diff --git a/report/admin.py b/report/admin.py index 67a92ee..dac615f 100644 --- a/report/admin.py +++ b/report/admin.py @@ -8,7 +8,7 @@ from .models import TestCase from .models import JobCache from .models import BaseResults from .models import Bug -from .models import BuildSummary +from .models import BuildSummary, LAVAUser class TestCaseAdmin(admin.ModelAdmin): list_display = ('name', 'result', 'measurement', 'unit', 'suite', 'job_id') @@ -20,3 +20,4 @@ admin.site.register(JobCache) admin.site.register(BaseResults) admin.site.register(Bug) admin.site.register(BuildSummary) +admin.site.register(LAVAUser) diff --git a/report/migrations/0006_auto_20171117_1557.py b/report/migrations/0006_auto_20171117_1557.py new file mode 100644 index 0000000..b44e258 --- /dev/null +++ b/report/migrations/0006_auto_20171117_1557.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.5 on 2017-11-17 15:57 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('report', '0005_buildsummary_images_url'), + ] + + operations = [ + migrations.AddField( + model_name='baseresults', + name='job_id', + field=models.CharField(default='', max_length=16), + ), + migrations.AddField( + model_name='baseresults', + name='job_name', + field=models.CharField(default='', max_length=64), + ), + migrations.AddField( + model_name='baseresults', + name='lava_nick', + field=models.CharField(default='', max_length=16), + ), + migrations.AlterField( + model_name='baseresults', + name='number_passrate', + field=models.DecimalField(decimal_places=2, default=100, max_digits=11), + ), + ] diff --git a/report/migrations/0007_auto_20171117_1913.py b/report/migrations/0007_auto_20171117_1913.py new file mode 100644 index 0000000..dc318f1 --- /dev/null +++ b/report/migrations/0007_auto_20171117_1913.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.5 on 2017-11-17 19:13 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('report', '0006_auto_20171117_1557'), + ] + + operations = [ + migrations.AlterField( + model_name='baseresults', + name='measurement', + field=models.DecimalField(decimal_places=2, default=0, max_digits=20, null=True), + ), + ] diff --git a/report/migrations/0008_lavauser.py b/report/migrations/0008_lavauser.py new file mode 100644 index 0000000..27c8f50 --- /dev/null +++ b/report/migrations/0008_lavauser.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.5 on 2017-11-20 12:43 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('report', '0007_auto_20171117_1913'), + ] + + operations = [ + migrations.CreateModel( + name='LAVAUser', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('lava_nick', models.CharField(max_length=64)), + ('user_name', models.CharField(max_length=32)), + ('token', models.CharField(max_length=128)), + ], + ), + ] diff --git a/report/models.py b/report/models.py index bceae5a..7d8a6c6 100644 --- a/report/models.py +++ b/report/models.py @@ -21,10 +21,13 @@ class TestCase(models.Model): class JobCache(models.Model): +# build_name = models.CharField(max_length=64) +# build_no = models.CharField(max_length=8) lava_nick = models.CharField(max_length=16) job_id = models.CharField(max_length=16) #job_name = models.CharField(max_length=64) cached = models.BooleanField(default=False) + #duration def __str__(self): return "%s_%s %s" % (self.lava_nick, self.job_id, self.cached) @@ -80,10 +83,15 @@ class BaseResults(models.Model): number_fail = models.IntegerField(default=0) number_total = models.IntegerField(default=0) # for basic, caculate as well, but not used - number_passrate = models.DecimalField( max_digits=11, decimal_places=2, null=True) + number_passrate = models.DecimalField( max_digits=11, decimal_places=2, default=100) unit = models.CharField(max_length=16, default='points') - measurement = models.DecimalField(max_digits=11, decimal_places=2, null=True, default=0) + measurement = models.DecimalField(max_digits=20, decimal_places=2, null=True, default=0) + + + lava_nick = models.CharField(max_length=16, default='') + job_id = models.CharField(max_length=16, default='') + job_name = models.CharField(max_length=64, default='' ) 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) @@ -103,3 +111,11 @@ class BuildSummary(models.Model): 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) + +class LAVAUser(models.Model): + lava_nick = models.CharField(max_length=64) + user_name = models.CharField(max_length=32) + token = models.CharField(max_length=128) + + def __str__(self): + return "%s %s" % (self.lava_nick, self.user_name) diff --git a/report/templates/test_report.html b/report/templates/test_report.html index 9c21dc4..867ed77 100644 --- a/report/templates/test_report.html +++ b/report/templates/test_report.html @@ -56,6 +56,20 @@ <th align="left">Images</th> <td align="left"><a href="{{ build_info.images_url }}">{{ build_info.images_url }}</a></td> <tr/> + <tr> + <th align="left">Cached In Base</th> + <td align="left"> + {% if build_info.cached_in_base %} + <button name="cache_to_base" onclick="this.disabled=true; window.location='/report/test-report/?build_name={{ build_info.build_name }}&build_no={{ build_info.build_no }}&cache_to_base=false'"> + Remove From Base + </button> + {% else %} + <button name="cache_to_base" onclick="this.disabled=true; window.location='/report/test-report/?build_name={{ build_info.build_name }}&build_no={{ build_info.build_no }}&cache_to_base=true'"> + Cache Into Base + </button> + {% endif %} + </td> + <tr/> </table> <hr/> <h2>Basic Weekly</h2> @@ -250,8 +264,14 @@ No result for benchmark test jobs. <td align='right'> -- </td> <td align='right'> -- </td> {% endif %} - {% endwith %} + {% if test_info.number_pass|add:0 > base.number_pass|add:0 %} + <td align='right' style="background-color:green" > {{ test_info.number_pass }}</td> + {% elif test_info.number_pass|add:0 < base.number_pass|add:0 %} + <td align='right' style="background-color:yellow" > {{ test_info.number_pass }}</td> + {% else %} <td align='right'> {{ test_info.number_pass }}</td> + {% endif %} + {% endwith %} <td align='right'> {{ test_info.number_fail }}</td> <td align='right'> {{ test_info.number_total }}</td> {% if test_info.number_passrate == 0 %} diff --git a/report/views.py b/report/views.py index 3ac1de0..ee08318 100644 --- a/report/views.py +++ b/report/views.py @@ -11,11 +11,12 @@ import sys import urllib2 import xmlrpclib import yaml +import logging from lava_tool.authtoken import AuthenticatingServerProxy, KeyringAuthBackend # Create your views here. -from models import TestCase, JobCache, BaseResults, Bug, BuildSummary +from models import TestCase, JobCache, BaseResults, Bug, BuildSummary, LAVAUser android_snapshot_url_base = "https://snapshots.linaro.org/android" ci_job_url_base = 'https://ci.linaro.org/job' @@ -48,46 +49,40 @@ job_status_dict = {0: "Submitted", 4: "Canceled", } - job_priority_list = ['high', 'medium', 'low'] -user = "yongqin.liu" -token = {'staging': 'ty1dprzx7wysqrqmzuytccufwbyyl9xthwowgim0p0z5hm00t6mzwebyp4dgagmyg2f1kag9ln0s9dh212s3wdaxhasm0df7bqnumrwz1m5mbmf4xg780xgeo9x1348k', - 'production': 'n2ab47pbfbu4um0sw5r3zd22q1zdorj7nlnj3qaaaqwdfigahkn6j1kp0ze49jjir84cud7dq4kezhms0jrwy14k1m609e8q50kxmgn9je3zlum0yrlr0njxc87bpss9', - 'lkft': 'gdr5ww4npc7y7fby703hcz1b62bxrbpdt2ug1169wce02r2y2jiz96dy83n5xsm96uhnidxxotxj92uefy4degk3bwgiqgz1gq09h02yjipuon6wacfmkxnoocx4mdwg' - } +NICK_LAVA_STAGING = 'staging' +NICK_LAVA_PRODUCTION = 'production' +NICK_LAVA_LKFT = 'lkft' +LAVA_NICK_DOMAIN = { + NICK_LAVA_STAGING: 'staging.validation.linaro.org', + NICK_LAVA_PRODUCTION: 'validation.linaro.org', + NICK_LAVA_LKFT: 'lkft.linaro.org', + } + class LavaInstance(object): - def __init__(self, nick=None, domain=None, user=None, token=None): + def __init__(self, nick=None, user=None): self.nick = nick - self.domain = domain + self.domain = LAVA_NICK_DOMAIN[self.nick] self.user = user - self.token = token - self.url = "https://%s:%s@%s/RPC2/" % (user, token, domain) - self.job_url_prefix = "https://%s/scheduler/job" % domain + self.token = LAVAUser.objects.get(lava_nick=self.nick, user_name=self.user).token + self.url = "https://%s:%s@%s/RPC2/" % (self.user, self.token, self.domain) + self.job_url_prefix = "https://%s/scheduler/job" % self.domain self.server = AuthenticatingServerProxy(self.url, auth_backend=KeyringAuthBackend()) -NICK_LAVA_STAGING = 'staging' -NICK_LAVA_PRODUCTION = 'production' -NICK_LAVA_LKFT = 'lkft' +DEFAULT_USER = "yongqin.liu" LAVAS = { NICK_LAVA_STAGING: LavaInstance(nick=NICK_LAVA_STAGING, - domain="staging.validation.linaro.org", - user=user, - token=token[NICK_LAVA_STAGING] + user=DEFAULT_USER, ), NICK_LAVA_PRODUCTION: LavaInstance(nick=NICK_LAVA_PRODUCTION, - domain="validation.linaro.org", - user=user, - token=token[NICK_LAVA_PRODUCTION] + user=DEFAULT_USER, ), NICK_LAVA_LKFT: LavaInstance(nick=NICK_LAVA_LKFT, - domain="lkft.validation.linaro.org", - user=user, - token=token[NICK_LAVA_LKFT] + user=DEFAULT_USER, ), } - build_configs = { 'android-lcr-reference-hikey-o': { 'lava_server': LAVAS[NICK_LAVA_PRODUCTION], @@ -95,7 +90,8 @@ build_configs = { 'template_dir': "hikey-v2", 'base_build': { 'build_name':'android-lcr-reference-hikey-o', - 'build_no': 'N-M-1705', + #'build_no': 'N-M-1705', + 'build_no': '20', }, 'bugzilla': { 'new_bug_url': 'https://bugs.linaro.org/enter_bug.cgi', @@ -114,7 +110,7 @@ build_configs = { 'template_dir': "hikey-v2", 'base_build': { 'build_name':'android-lcr-reference-hikey-o', - 'build_no': 'N-M-1705', + 'build_no': '20', }, 'bugzilla': { 'new_bug_url': 'https://bugs.linaro.org/enter_bug.cgi', @@ -775,31 +771,136 @@ def index(request): }) +basic_weekly = { # job_name: ['test_suite', ], + #"basic": [ "meminfo", 'meminfo-first', 'meminfo-second', "busybox", "ping", "linaro-android-kernel-tests", "tjbench"], + "basic": [ 'meminfo-first', 'meminfo-second', "busybox", "ping", "linaro-android-kernel-tests", "tjbench"], + "weekly": [ 'media-codecs', 'piglit-gles2', 'piglit-gles3', 'piglit-glslparser', 'piglit-shader-runner', 'stringbench', 'libc-bench'], + } + +optee = { # job_name: ['test_suite', ], + "optee": [ "optee-xtest"], + } + +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' ], + 'boottime-second-analyze': ['KERNEL_BOOT_TIME_avg', 'ANDROID_BOOT_TIME_avg', 'TOTAL_BOOT_TIME_avg' ], + }, + "basic": { + "meminfo-first": [ 'MemTotal', 'MemFree', 'MemAvailable'], + #"meminfo": [ 'MemTotal', 'MemFree', 'MemAvailable'], + "meminfo-second": [ 'MemTotal', 'MemFree', 'MemAvailable'], + }, + + #'andebenchpro2015': {'andebenchpro2015':[] }, + 'antutu6': { 'antutu6': ['antutu6-sum-mean'] }, + #'applications': {}, + 'benchmarkpi': {'benchmarkpi': ['benchmarkpi-mean',]}, + 'caffeinemark': {'caffeinemark': ['Caffeinemark-Collect-score-mean', 'Caffeinemark-Float-score-mean', 'Caffeinemark-Loop-score-mean', + 'Caffeinemark-Method-score-mean', 'Caffeinemark-score-mean', 'Caffeinemark-Sieve-score-mean', 'Caffeinemark-String-score-mean']}, + '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']}, + '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',]}, + 'linpack': {'linpack': ['Linpack-MFLOPSSingleScore-mean', 'Linpack-MFLOPSMultiScore-mean', 'Linpack-TimeSingleScore-mean', 'Linpack-TimeMultiScore-mean']}, + 'quadrantpro': {'quadrantpro': ['quadrandpro-benchmark-memory-mean', 'quadrandpro-benchmark-mean', 'quadrandpro-benchmark-g2d-mean', 'quadrandpro-benchmark-io-mean', + 'quadrandpro-benchmark-cpu-mean', 'quadrandpro-benchmark-g3d-mean',]}, + 'rl-sqlite': {'rl-sqlite': ['RL-sqlite-Overall-mean',]}, + 'scimark': {'scimark': ['scimark-FFT-1024-mean', 'scimark-LU-100x100-mean', 'scimark-SOR-100x100-mean', 'scimark-Monte-Carlo-mean', 'scimark-Composite-Score-mean',]}, + 'vellamo3': {'vellamo3': ['vellamo3-Browser-total-mean', 'vellamo3-Metal-total-mean', 'vellamo3-Multi-total-mean', 'vellamo3-total-score-mean',]}, + } +less_is_better_measurement = [ + 'KERNEL_BOOT_TIME_avg', 'ANDROID_BOOT_TIME_avg', 'TOTAL_BOOT_TIME_avg', + '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', + ],}, + } + +# test_suite is "vts-test" +vts = [ + 'vts-hal', + 'vts-kernel-kselftest', + 'vts-kernel-ltp', + 'vts-kernel-part1', + 'vts-library', + 'vts-performance', + ] + +# test_suite is the same as job name +cts_v7a = [ 'cts-focused1-v7a', + 'cts-focused2-v7a', + 'cts-media-v7a', + 'cts-media2-v7a', + 'cts-opengl-v7a', + 'cts-part1-v7a', + 'cts-part2-v7a', + 'cts-part3-v7a', + 'cts-part4-v7a', + 'cts-part5-v7a', + ] + +# test_suite is the same as job name +cts_v8a = [ 'cts-focused1-v8a', + 'cts-focused2-v8a', + 'cts-media-v8a', + 'cts-media2-v8a', + 'cts-opengl-v8a', + 'cts-part1-v8a', + 'cts-part2-v8a', + 'cts-part3-v8a', + 'cts-part4-v8a', + 'cts-part5-v8a', + ] + def test_report(request): build_name = request.GET.get("build_name", DEFAULT_BUILD_NAME) + all_build_numbers = get_possible_builds(build_name) + build_no = request.GET.get("build_no", get_default_build_no(all_build_numbers)) + + cache_to_base_request = request.GET.get("cache_to_base", None) + count_in_base = BaseResults.objects.filter(build_name=build_name, build_no=build_no).count() + if count_in_base > 0: + ## already cached in base + if cache_to_base_request == 'false': + ## request from client that to delete the cache from base + count_in_base = BaseResults.objects.filter(build_name=build_name, build_no=build_no).delete() + else: + ## no need to cache it again + pass + ## set to false to not cache it again in the following lines + cache_to_base = False + else: + ## not cached in base yet + if cache_to_base_request == 'true': + ## cache will be done in the following lines + cache_to_base = True + else: + ## no need to clean cache from base since there is no cache yet + cache_to_base = False 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_lava_nick = NICK_LAVA_STAGING - all_build_numbers = get_possible_builds(build_name) - build_no = request.GET.get("build_no", get_default_build_no(all_build_numbers)) (jobs_failed, total_tests_res) = get_test_results_for_build(build_name, build_no) lava_nick = build_configs[build_name]['lava_server'].nick - basic_weekly = { # job_name: ['test_suite', ], - #"basic": [ "meminfo", 'meminfo-first', 'meminfo-second', "busybox", "ping", "linaro-android-kernel-tests", "tjbench"], - "basic": [ 'meminfo-first', 'meminfo-second', "busybox", "ping", "linaro-android-kernel-tests", "tjbench"], - "weekly": [ 'media-codecs', 'piglit-gles2', 'piglit-gles3', 'piglit-glslparser', 'piglit-shader-runner', 'stringbench', 'libc-bench'], - } - - optee = { # job_name: ['test_suite', ], - "optee": [ "optee-xtest"], - } + ####################################################### + ## Get result for basic/optee/weekly tests + ####################################################### basic_optee_weekly = basic_weekly.copy() if build_name.find("hikey") >= 0: basic_optee_weekly.update(optee) @@ -843,53 +944,15 @@ def test_report(request): 'bugs': bugs, }) - 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' ], - 'boottime-second-analyze': ['KERNEL_BOOT_TIME_avg', 'ANDROID_BOOT_TIME_avg', 'TOTAL_BOOT_TIME_avg' ], - }, - "basic": { - "meminfo-first": [ 'MemTotal', 'MemFree', 'MemAvailable'], - #"meminfo": [ 'MemTotal', 'MemFree', 'MemAvailable'], - "meminfo-second": [ 'MemTotal', 'MemFree', 'MemAvailable'], - }, - - #'andebenchpro2015': {'andebenchpro2015':[] }, - 'antutu6': { 'antutu6': ['antutu6-sum-mean'] }, - #'applications': {}, - 'benchmarkpi': {'benchmarkpi': ['benchmarkpi-mean',]}, - 'caffeinemark': {'caffeinemark': ['Caffeinemark-Collect-score-mean', 'Caffeinemark-Float-score-mean', 'Caffeinemark-Loop-score-mean', - 'Caffeinemark-Method-score-mean', 'Caffeinemark-score-mean', 'Caffeinemark-Sieve-score-mean', 'Caffeinemark-String-score-mean']}, - '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']}, - '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',]}, - 'linpack': {'linpack': ['Linpack-MFLOPSSingleScore-mean', 'Linpack-MFLOPSMultiScore-mean', 'Linpack-TimeSingleScore-mean', 'Linpack-TimeMultiScore-mean']}, - 'quadrantpro': {'quadrantpro': ['quadrandpro-benchmark-memory-mean', 'quadrandpro-benchmark-mean', 'quadrandpro-benchmark-g2d-mean', 'quadrandpro-benchmark-io-mean', - 'quadrandpro-benchmark-cpu-mean', 'quadrandpro-benchmark-g3d-mean',]}, - 'rl-sqlite': {'rl-sqlite': ['RL-sqlite-Overall-mean',]}, - 'scimark': {'scimark': ['scimark-FFT-1024-mean', 'scimark-LU-100x100-mean', 'scimark-SOR-100x100-mean', 'scimark-Monte-Carlo-mean', 'scimark-Composite-Score-mean',]}, - 'vellamo3': {'vellamo3': ['vellamo3-Browser-total-mean', 'vellamo3-Metal-total-mean', 'vellamo3-Multi-total-mean', 'vellamo3-total-score-mean',]}, - } - less_is_better_measurement = [ - 'KERNEL_BOOT_TIME_avg', 'ANDROID_BOOT_TIME_avg', 'TOTAL_BOOT_TIME_avg', - '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', - ],}, - } + if cache_to_base and ( job_id is not None): + BaseResults.objects.create(build_name=build_name, build_no=build_no, job_name=job_name, job_id=job_id, lava_nick=lava_nick, + number_pass=number_pass, number_fail=number_fail, number_total=number_total, number_passrate=number_passrate, + plan_suite=test_suite, module_testcase=test_suite) + + + ####################################################### + ## Get result for benchmark tests + ####################################################### benchmarks = benchmarks_common.copy() if build_name.find("x15") >= 0: benchmarks.update(glbenchmark25) @@ -942,20 +1005,15 @@ def test_report(request): 'bugs': bugs, 'difference': difference, }) + if cache_to_base and job_id is not None: + BaseResults.objects.create(build_name=build_name, build_no=build_no, job_name=job_name, job_id=job_id, lava_nick=lava_nick, + unit=unit, measurement=measurement, + plan_suite=test_suite, module_testcase=test_case) ######################################################### ########### result for vts ############################## ######################################################### - # test_suite is "vts-test" - vts = [ - 'vts-hal', - 'vts-kernel-kselftest', - 'vts-kernel-ltp', - 'vts-kernel-part1', - 'vts-library', - 'vts-performance', - ] vts_res = [] summary = { 'pass': 0, @@ -999,6 +1057,11 @@ def test_report(request): 'base': base, 'bugs': bugs, }) + if cache_to_base and job_id is not None: + BaseResults.objects.create(build_name=build_name, build_no=build_no, job_name=job_name, job_id=job_id, lava_nick=lava_nick, + number_pass=number_pass, number_fail=number_fail, number_total=number_total, number_passrate=number_passrate, + plan_suite=job_name, module_testcase=job_name) + summary['pass'] = summary['pass'] + number_pass summary['fail'] = summary['fail'] + number_fail summary['total'] = summary['total'] + number_total @@ -1017,29 +1080,6 @@ def test_report(request): ######################################################### ########### result for cts ############################## ######################################################### - # test_suite is the same as job name - cts_v7a = [ 'cts-focused1-v7a', - 'cts-focused2-v7a', - 'cts-media-v7a', - 'cts-media2-v7a', - 'cts-opengl-v7a', - 'cts-part1-v7a', - 'cts-part2-v7a', - 'cts-part3-v7a', - 'cts-part4-v7a', - 'cts-part5-v7a', - ] - cts_v8a = [ 'cts-focused1-v8a', - 'cts-focused2-v8a', - 'cts-media-v8a', - 'cts-media2-v8a', - 'cts-opengl-v8a', - 'cts-part1-v8a', - 'cts-part2-v8a', - 'cts-part3-v8a', - 'cts-part4-v8a', - 'cts-part5-v8a', - ] cts = cts_v7a + [] if build_name.find("hikey") >= 0: cts = cts_v7a + cts_v8a @@ -1113,6 +1153,11 @@ def test_report(request): 'base': base, 'bugs': bugs, }) + if cache_to_base: + BaseResults.objects.create(build_name=build_name, build_no=build_no, job_name=job_name, job_id=job_id, lava_nick=lava_nick, + number_pass=number_pass, number_fail=number_fail, number_total=number_total, number_passrate=number_passrate, + plan_suite=job_name, module_testcase=module_name) + summary['pass'] = summary['pass'] + number_pass summary['fail'] = summary['fail'] + number_fail summary['total'] = summary['total'] + number_total @@ -1130,7 +1175,7 @@ def test_report(request): 'number_passrate': pass_rate, }) ############################################################## - build_bugs = Bug.objects.filter(build_name=build_name, ) + build_bugs = Bug.objects.filter(build_name=build_name) ############################################################## try: build_summary = BuildSummary.objects.get(build_name=build_name, build_no=build_no) @@ -1171,6 +1216,12 @@ def test_report(request): build_bugzilla['short_desc_prefix'], ) + count_in_base = BaseResults.objects.filter(build_name=build_name, build_no=build_no).count() + if count_in_base > 0: + cached_in_base = True + else: + cached_in_base = False + build_info = { 'build_name': build_name, 'build_no': build_no, @@ -1187,6 +1238,7 @@ def test_report(request): 'firmware_version': firmware_version, 'toolchain_info': toolchain_info, 'images_url': images_url, + 'cached_in_base': cached_in_base, } return render(request, 'test_report.html', |