13c827367444ee418f129b2c238299f49d3264554Jarkko Poyry# -*- coding: utf-8 -*- 23c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 33c77ed4e119083afaec64a173bfdcf024c271635Jarkko Pöyry#------------------------------------------------------------------------- 43c77ed4e119083afaec64a173bfdcf024c271635Jarkko Pöyry# drawElements Quality Program utilities 53c77ed4e119083afaec64a173bfdcf024c271635Jarkko Pöyry# -------------------------------------- 63c77ed4e119083afaec64a173bfdcf024c271635Jarkko Pöyry# 73c77ed4e119083afaec64a173bfdcf024c271635Jarkko Pöyry# Copyright 2015 The Android Open Source Project 83c77ed4e119083afaec64a173bfdcf024c271635Jarkko Pöyry# 93c77ed4e119083afaec64a173bfdcf024c271635Jarkko Pöyry# Licensed under the Apache License, Version 2.0 (the "License"); 103c77ed4e119083afaec64a173bfdcf024c271635Jarkko Pöyry# you may not use this file except in compliance with the License. 113c77ed4e119083afaec64a173bfdcf024c271635Jarkko Pöyry# You may obtain a copy of the License at 123c77ed4e119083afaec64a173bfdcf024c271635Jarkko Pöyry# 133c77ed4e119083afaec64a173bfdcf024c271635Jarkko Pöyry# http://www.apache.org/licenses/LICENSE-2.0 143c77ed4e119083afaec64a173bfdcf024c271635Jarkko Pöyry# 153c77ed4e119083afaec64a173bfdcf024c271635Jarkko Pöyry# Unless required by applicable law or agreed to in writing, software 163c77ed4e119083afaec64a173bfdcf024c271635Jarkko Pöyry# distributed under the License is distributed on an "AS IS" BASIS, 173c77ed4e119083afaec64a173bfdcf024c271635Jarkko Pöyry# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 183c77ed4e119083afaec64a173bfdcf024c271635Jarkko Pöyry# See the License for the specific language governing permissions and 193c77ed4e119083afaec64a173bfdcf024c271635Jarkko Pöyry# limitations under the License. 203c77ed4e119083afaec64a173bfdcf024c271635Jarkko Pöyry# 213c77ed4e119083afaec64a173bfdcf024c271635Jarkko Pöyry#------------------------------------------------------------------------- 223c77ed4e119083afaec64a173bfdcf024c271635Jarkko Pöyry 233c827367444ee418f129b2c238299f49d3264554Jarkko Poyryfrom build.common import * 243c827367444ee418f129b2c238299f49d3264554Jarkko Poyryfrom build.config import * 253c827367444ee418f129b2c238299f49d3264554Jarkko Poyryfrom build.build import * 263c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 273c827367444ee418f129b2c238299f49d3264554Jarkko Poyryimport os 283c827367444ee418f129b2c238299f49d3264554Jarkko Poyryimport sys 293c827367444ee418f129b2c238299f49d3264554Jarkko Poyryimport string 303c827367444ee418f129b2c238299f49d3264554Jarkko Poyryimport socket 313c827367444ee418f129b2c238299f49d3264554Jarkko Poyryimport fnmatch 323c827367444ee418f129b2c238299f49d3264554Jarkko Poyryfrom datetime import datetime 333c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 343c827367444ee418f129b2c238299f49d3264554Jarkko PoyryBASE_NIGHTLY_DIR = os.path.normpath(os.path.join(DEQP_DIR, "..", "deqp-nightly")) 353c827367444ee418f129b2c238299f49d3264554Jarkko PoyryBASE_BUILD_DIR = os.path.join(BASE_NIGHTLY_DIR, "build") 363c827367444ee418f129b2c238299f49d3264554Jarkko PoyryBASE_LOGS_DIR = os.path.join(BASE_NIGHTLY_DIR, "logs") 373c827367444ee418f129b2c238299f49d3264554Jarkko PoyryBASE_REFS_DIR = os.path.join(BASE_NIGHTLY_DIR, "refs") 383c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 393c827367444ee418f129b2c238299f49d3264554Jarkko PoyryEXECUTOR_PATH = "executor/executor" 403c827367444ee418f129b2c238299f49d3264554Jarkko PoyryLOG_TO_CSV_PATH = "executor/testlog-to-csv" 413c827367444ee418f129b2c238299f49d3264554Jarkko PoyryEXECSERVER_PATH = "execserver/execserver" 423c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 433c827367444ee418f129b2c238299f49d3264554Jarkko PoyryCASELIST_PATH = os.path.join(DEQP_DIR, "Candy", "Data") 443c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 453c827367444ee418f129b2c238299f49d3264554Jarkko PoyryCOMPARE_NUM_RESULTS = 4 463c827367444ee418f129b2c238299f49d3264554Jarkko PoyryCOMPARE_REPORT_NAME = "nightly-report.html" 473c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 483c827367444ee418f129b2c238299f49d3264554Jarkko PoyryCOMPARE_REPORT_TMPL = ''' 493c827367444ee418f129b2c238299f49d3264554Jarkko Poyry<html> 503c827367444ee418f129b2c238299f49d3264554Jarkko Poyry<head> 513c827367444ee418f129b2c238299f49d3264554Jarkko Poyry<title>${TITLE}</title> 523c827367444ee418f129b2c238299f49d3264554Jarkko Poyry<style type="text/css"> 533c827367444ee418f129b2c238299f49d3264554Jarkko Poyry<!-- 543c827367444ee418f129b2c238299f49d3264554Jarkko Poyrybody { font: serif; font-size: 1em; } 553c827367444ee418f129b2c238299f49d3264554Jarkko Poyrytable { border-spacing: 0; border-collapse: collapse; } 563c827367444ee418f129b2c238299f49d3264554Jarkko Poyrytd { border-width: 1px; border-style: solid; border-color: #808080; } 573c827367444ee418f129b2c238299f49d3264554Jarkko Poyry.Header { font-weight: bold; font-size: 1em; border-style: none; } 583c827367444ee418f129b2c238299f49d3264554Jarkko Poyry.CasePath { } 593c827367444ee418f129b2c238299f49d3264554Jarkko Poyry.Pass { background: #80ff80; } 603c827367444ee418f129b2c238299f49d3264554Jarkko Poyry.Fail { background: #ff4040; } 613c827367444ee418f129b2c238299f49d3264554Jarkko Poyry.QualityWarning { background: #ffff00; } 623c827367444ee418f129b2c238299f49d3264554Jarkko Poyry.CompabilityWarning { background: #ffff00; } 633c827367444ee418f129b2c238299f49d3264554Jarkko Poyry.Pending { background: #808080; } 643c827367444ee418f129b2c238299f49d3264554Jarkko Poyry.Running { background: #d3d3d3; } 653c827367444ee418f129b2c238299f49d3264554Jarkko Poyry.NotSupported { background: #ff69b4; } 663c827367444ee418f129b2c238299f49d3264554Jarkko Poyry.ResourceError { background: #ff4040; } 673c827367444ee418f129b2c238299f49d3264554Jarkko Poyry.InternalError { background: #ff1493; } 683c827367444ee418f129b2c238299f49d3264554Jarkko Poyry.Canceled { background: #808080; } 693c827367444ee418f129b2c238299f49d3264554Jarkko Poyry.Crash { background: #ffa500; } 703c827367444ee418f129b2c238299f49d3264554Jarkko Poyry.Timeout { background: #ffa500; } 713c827367444ee418f129b2c238299f49d3264554Jarkko Poyry.Disabled { background: #808080; } 723c827367444ee418f129b2c238299f49d3264554Jarkko Poyry.Missing { background: #808080; } 733c827367444ee418f129b2c238299f49d3264554Jarkko Poyry.Ignored { opacity: 0.5; } 743c827367444ee418f129b2c238299f49d3264554Jarkko Poyry--> 753c827367444ee418f129b2c238299f49d3264554Jarkko Poyry</style> 763c827367444ee418f129b2c238299f49d3264554Jarkko Poyry</head> 773c827367444ee418f129b2c238299f49d3264554Jarkko Poyry<body> 783c827367444ee418f129b2c238299f49d3264554Jarkko Poyry<h1>${TITLE}</h1> 793c827367444ee418f129b2c238299f49d3264554Jarkko Poyry<table> 803c827367444ee418f129b2c238299f49d3264554Jarkko Poyry${RESULTS} 813c827367444ee418f129b2c238299f49d3264554Jarkko Poyry</table> 823c827367444ee418f129b2c238299f49d3264554Jarkko Poyry</body> 833c827367444ee418f129b2c238299f49d3264554Jarkko Poyry</html> 843c827367444ee418f129b2c238299f49d3264554Jarkko Poyry''' 853c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 863c827367444ee418f129b2c238299f49d3264554Jarkko Poyryclass NightlyRunConfig: 873c827367444ee418f129b2c238299f49d3264554Jarkko Poyry def __init__(self, name, buildConfig, generator, binaryName, testset, args = [], exclude = [], ignore = []): 883c827367444ee418f129b2c238299f49d3264554Jarkko Poyry self.name = name 893c827367444ee418f129b2c238299f49d3264554Jarkko Poyry self.buildConfig = buildConfig 903c827367444ee418f129b2c238299f49d3264554Jarkko Poyry self.generator = generator 913c827367444ee418f129b2c238299f49d3264554Jarkko Poyry self.binaryName = binaryName 923c827367444ee418f129b2c238299f49d3264554Jarkko Poyry self.testset = testset 933c827367444ee418f129b2c238299f49d3264554Jarkko Poyry self.args = args 943c827367444ee418f129b2c238299f49d3264554Jarkko Poyry self.exclude = exclude 953c827367444ee418f129b2c238299f49d3264554Jarkko Poyry self.ignore = ignore 963c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 973c827367444ee418f129b2c238299f49d3264554Jarkko Poyry def getBinaryPath(self, basePath): 983c827367444ee418f129b2c238299f49d3264554Jarkko Poyry return os.path.join(self.buildConfig.getBuildDir(), self.generator.getBinaryPath(self.buildConfig.getBuildType(), basePath)) 993c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1003c827367444ee418f129b2c238299f49d3264554Jarkko Poyryclass NightlyBuildConfig(BuildConfig): 1013c827367444ee418f129b2c238299f49d3264554Jarkko Poyry def __init__(self, name, buildType, args): 1023c827367444ee418f129b2c238299f49d3264554Jarkko Poyry BuildConfig.__init__(self, os.path.join(BASE_BUILD_DIR, name), buildType, args) 1033c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1043c827367444ee418f129b2c238299f49d3264554Jarkko Poyryclass TestCaseResult: 1053c827367444ee418f129b2c238299f49d3264554Jarkko Poyry def __init__ (self, name, statusCode): 1063c827367444ee418f129b2c238299f49d3264554Jarkko Poyry self.name = name 1073c827367444ee418f129b2c238299f49d3264554Jarkko Poyry self.statusCode = statusCode 1083c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1093c827367444ee418f129b2c238299f49d3264554Jarkko Poyryclass MultiResult: 1103c827367444ee418f129b2c238299f49d3264554Jarkko Poyry def __init__ (self, name, statusCodes): 1113c827367444ee418f129b2c238299f49d3264554Jarkko Poyry self.name = name 1123c827367444ee418f129b2c238299f49d3264554Jarkko Poyry self.statusCodes = statusCodes 1133c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1143c827367444ee418f129b2c238299f49d3264554Jarkko Poyryclass BatchResult: 1153c827367444ee418f129b2c238299f49d3264554Jarkko Poyry def __init__ (self, name): 1163c827367444ee418f129b2c238299f49d3264554Jarkko Poyry self.name = name 1173c827367444ee418f129b2c238299f49d3264554Jarkko Poyry self.results = [] 1183c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1193c827367444ee418f129b2c238299f49d3264554Jarkko Poyrydef parseResultCsv (data): 1203c827367444ee418f129b2c238299f49d3264554Jarkko Poyry lines = data.splitlines()[1:] 1213c827367444ee418f129b2c238299f49d3264554Jarkko Poyry results = [] 1223c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1233c827367444ee418f129b2c238299f49d3264554Jarkko Poyry for line in lines: 1243c827367444ee418f129b2c238299f49d3264554Jarkko Poyry items = line.split(",") 1253c827367444ee418f129b2c238299f49d3264554Jarkko Poyry results.append(TestCaseResult(items[0], items[1])) 1263c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1273c827367444ee418f129b2c238299f49d3264554Jarkko Poyry return results 1283c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1293c827367444ee418f129b2c238299f49d3264554Jarkko Poyrydef readTestCaseResultsFromCSV (filename): 1303c827367444ee418f129b2c238299f49d3264554Jarkko Poyry return parseResultCsv(readFile(filename)) 1313c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1323c827367444ee418f129b2c238299f49d3264554Jarkko Poyrydef readBatchResultFromCSV (filename, batchResultName = None): 1333c827367444ee418f129b2c238299f49d3264554Jarkko Poyry batchResult = BatchResult(batchResultName if batchResultName != None else os.path.basename(filename)) 1343c827367444ee418f129b2c238299f49d3264554Jarkko Poyry batchResult.results = readTestCaseResultsFromCSV(filename) 1353c827367444ee418f129b2c238299f49d3264554Jarkko Poyry return batchResult 1363c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1373c827367444ee418f129b2c238299f49d3264554Jarkko Poyrydef getResultTimestamp (): 1383c827367444ee418f129b2c238299f49d3264554Jarkko Poyry return datetime.now().strftime("%Y-%m-%d-%H-%M") 1393c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1403c827367444ee418f129b2c238299f49d3264554Jarkko Poyrydef getCompareFilenames (logsDir): 1413c827367444ee418f129b2c238299f49d3264554Jarkko Poyry files = [] 1423c827367444ee418f129b2c238299f49d3264554Jarkko Poyry for file in os.listdir(logsDir): 1433c827367444ee418f129b2c238299f49d3264554Jarkko Poyry fullPath = os.path.join(logsDir, file) 1443c827367444ee418f129b2c238299f49d3264554Jarkko Poyry if os.path.isfile(fullPath) and fnmatch.fnmatch(file, "*.csv"): 1453c827367444ee418f129b2c238299f49d3264554Jarkko Poyry files.append(fullPath) 1463c827367444ee418f129b2c238299f49d3264554Jarkko Poyry files.sort() 1473c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1483c827367444ee418f129b2c238299f49d3264554Jarkko Poyry return files[-COMPARE_NUM_RESULTS:] 1493c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1503c827367444ee418f129b2c238299f49d3264554Jarkko Poyrydef parseAsCSV (logPath, config): 1513c827367444ee418f129b2c238299f49d3264554Jarkko Poyry args = [config.getBinaryPath(LOG_TO_CSV_PATH), "--mode=all", "--format=csv", logPath] 1523c827367444ee418f129b2c238299f49d3264554Jarkko Poyry proc = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) 1533c827367444ee418f129b2c238299f49d3264554Jarkko Poyry out, err = proc.communicate() 1543c827367444ee418f129b2c238299f49d3264554Jarkko Poyry return out 1553c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1563c827367444ee418f129b2c238299f49d3264554Jarkko Poyrydef computeUnifiedTestCaseList (batchResults): 1573c827367444ee418f129b2c238299f49d3264554Jarkko Poyry caseList = [] 1583c827367444ee418f129b2c238299f49d3264554Jarkko Poyry caseSet = set() 1593c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1603c827367444ee418f129b2c238299f49d3264554Jarkko Poyry for batchResult in batchResults: 1613c827367444ee418f129b2c238299f49d3264554Jarkko Poyry for result in batchResult.results: 1623c827367444ee418f129b2c238299f49d3264554Jarkko Poyry if not result.name in caseSet: 1633c827367444ee418f129b2c238299f49d3264554Jarkko Poyry caseList.append(result.name) 1643c827367444ee418f129b2c238299f49d3264554Jarkko Poyry caseSet.add(result.name) 1653c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1663c827367444ee418f129b2c238299f49d3264554Jarkko Poyry return caseList 1673c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1683c827367444ee418f129b2c238299f49d3264554Jarkko Poyrydef computeUnifiedResults (batchResults): 1693c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1703c827367444ee418f129b2c238299f49d3264554Jarkko Poyry def genResultMap (batchResult): 1713c827367444ee418f129b2c238299f49d3264554Jarkko Poyry resMap = {} 1723c827367444ee418f129b2c238299f49d3264554Jarkko Poyry for result in batchResult.results: 1733c827367444ee418f129b2c238299f49d3264554Jarkko Poyry resMap[result.name] = result 1743c827367444ee418f129b2c238299f49d3264554Jarkko Poyry return resMap 1753c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1763c827367444ee418f129b2c238299f49d3264554Jarkko Poyry resultMap = [genResultMap(r) for r in batchResults] 1773c827367444ee418f129b2c238299f49d3264554Jarkko Poyry caseList = computeUnifiedTestCaseList(batchResults) 1783c827367444ee418f129b2c238299f49d3264554Jarkko Poyry results = [] 1793c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1803c827367444ee418f129b2c238299f49d3264554Jarkko Poyry for caseName in caseList: 1813c827367444ee418f129b2c238299f49d3264554Jarkko Poyry statusCodes = [] 1823c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1833c827367444ee418f129b2c238299f49d3264554Jarkko Poyry for i in range(0, len(batchResults)): 1843c827367444ee418f129b2c238299f49d3264554Jarkko Poyry result = resultMap[i][caseName] if caseName in resultMap[i] else None 1853c827367444ee418f129b2c238299f49d3264554Jarkko Poyry statusCode = result.statusCode if result != None else 'Missing' 1863c827367444ee418f129b2c238299f49d3264554Jarkko Poyry statusCodes.append(statusCode) 1873c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1883c827367444ee418f129b2c238299f49d3264554Jarkko Poyry results.append(MultiResult(caseName, statusCodes)) 1893c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1903c827367444ee418f129b2c238299f49d3264554Jarkko Poyry return results 1913c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1923c827367444ee418f129b2c238299f49d3264554Jarkko Poyrydef allStatusCodesEqual (result): 1933c827367444ee418f129b2c238299f49d3264554Jarkko Poyry firstCode = result.statusCodes[0] 1943c827367444ee418f129b2c238299f49d3264554Jarkko Poyry for i in range(1, len(result.statusCodes)): 1953c827367444ee418f129b2c238299f49d3264554Jarkko Poyry if result.statusCodes[i] != firstCode: 1963c827367444ee418f129b2c238299f49d3264554Jarkko Poyry return False 1973c827367444ee418f129b2c238299f49d3264554Jarkko Poyry return True 1983c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1993c827367444ee418f129b2c238299f49d3264554Jarkko Poyrydef computeDiffResults (unifiedResults): 2003c827367444ee418f129b2c238299f49d3264554Jarkko Poyry diff = [] 2013c827367444ee418f129b2c238299f49d3264554Jarkko Poyry for result in unifiedResults: 2023c827367444ee418f129b2c238299f49d3264554Jarkko Poyry if not allStatusCodesEqual(result): 2033c827367444ee418f129b2c238299f49d3264554Jarkko Poyry diff.append(result) 2043c827367444ee418f129b2c238299f49d3264554Jarkko Poyry return diff 2053c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 2063c827367444ee418f129b2c238299f49d3264554Jarkko Poyrydef genCompareReport (batchResults, title, ignoreCases): 2073c827367444ee418f129b2c238299f49d3264554Jarkko Poyry class TableRow: 2083c827367444ee418f129b2c238299f49d3264554Jarkko Poyry def __init__ (self, testCaseName, innerHTML): 2093c827367444ee418f129b2c238299f49d3264554Jarkko Poyry self.testCaseName = testCaseName 2103c827367444ee418f129b2c238299f49d3264554Jarkko Poyry self.innerHTML = innerHTML 2113c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 2123c827367444ee418f129b2c238299f49d3264554Jarkko Poyry unifiedResults = computeUnifiedResults(batchResults) 2133c827367444ee418f129b2c238299f49d3264554Jarkko Poyry diffResults = computeDiffResults(unifiedResults) 2143c827367444ee418f129b2c238299f49d3264554Jarkko Poyry rows = [] 2153c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 2163c827367444ee418f129b2c238299f49d3264554Jarkko Poyry # header 2173c827367444ee418f129b2c238299f49d3264554Jarkko Poyry headerCol = '<td class="Header">Test case</td>\n' 2183c827367444ee418f129b2c238299f49d3264554Jarkko Poyry for batchResult in batchResults: 2193c827367444ee418f129b2c238299f49d3264554Jarkko Poyry headerCol += '<td class="Header">%s</td>\n' % batchResult.name 2203c827367444ee418f129b2c238299f49d3264554Jarkko Poyry rows.append(TableRow(None, headerCol)) 2213c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 2223c827367444ee418f129b2c238299f49d3264554Jarkko Poyry # results 2233c827367444ee418f129b2c238299f49d3264554Jarkko Poyry for result in diffResults: 2243c827367444ee418f129b2c238299f49d3264554Jarkko Poyry col = '<td class="CasePath">%s</td>\n' % result.name 2253c827367444ee418f129b2c238299f49d3264554Jarkko Poyry for statusCode in result.statusCodes: 2263c827367444ee418f129b2c238299f49d3264554Jarkko Poyry col += '<td class="%s">%s</td>\n' % (statusCode, statusCode) 2273c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 2283c827367444ee418f129b2c238299f49d3264554Jarkko Poyry rows.append(TableRow(result.name, col)) 2293c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 2303c827367444ee418f129b2c238299f49d3264554Jarkko Poyry tableStr = "" 2313c827367444ee418f129b2c238299f49d3264554Jarkko Poyry for row in rows: 2323c827367444ee418f129b2c238299f49d3264554Jarkko Poyry if row.testCaseName is not None and matchesAnyPattern(row.testCaseName, ignoreCases): 2333c827367444ee418f129b2c238299f49d3264554Jarkko Poyry tableStr += '<tr class="Ignored">\n%s</tr>\n' % row.innerHTML 2343c827367444ee418f129b2c238299f49d3264554Jarkko Poyry else: 2353c827367444ee418f129b2c238299f49d3264554Jarkko Poyry tableStr += '<tr>\n%s</tr>\n' % row.innerHTML 2363c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 2373c827367444ee418f129b2c238299f49d3264554Jarkko Poyry html = COMPARE_REPORT_TMPL 2383c827367444ee418f129b2c238299f49d3264554Jarkko Poyry html = html.replace("${TITLE}", title) 2393c827367444ee418f129b2c238299f49d3264554Jarkko Poyry html = html.replace("${RESULTS}", tableStr) 2403c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 2413c827367444ee418f129b2c238299f49d3264554Jarkko Poyry return html 2423c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 2433c827367444ee418f129b2c238299f49d3264554Jarkko Poyrydef matchesAnyPattern (name, patterns): 2443c827367444ee418f129b2c238299f49d3264554Jarkko Poyry for pattern in patterns: 2453c827367444ee418f129b2c238299f49d3264554Jarkko Poyry if fnmatch.fnmatch(name, pattern): 2463c827367444ee418f129b2c238299f49d3264554Jarkko Poyry return True 2473c827367444ee418f129b2c238299f49d3264554Jarkko Poyry return False 2483c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 2493c827367444ee418f129b2c238299f49d3264554Jarkko Poyrydef statusCodesMatch (refResult, resResult): 2503c827367444ee418f129b2c238299f49d3264554Jarkko Poyry return refResult == 'Missing' or resResult == 'Missing' or refResult == resResult 2513c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 2523c827367444ee418f129b2c238299f49d3264554Jarkko Poyrydef compareBatchResults (referenceBatch, resultBatch, ignoreCases): 2533c827367444ee418f129b2c238299f49d3264554Jarkko Poyry unifiedResults = computeUnifiedResults([referenceBatch, resultBatch]) 2543c827367444ee418f129b2c238299f49d3264554Jarkko Poyry failedCases = [] 2553c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 2563c827367444ee418f129b2c238299f49d3264554Jarkko Poyry for result in unifiedResults: 2573c827367444ee418f129b2c238299f49d3264554Jarkko Poyry if not matchesAnyPattern(result.name, ignoreCases): 2583c827367444ee418f129b2c238299f49d3264554Jarkko Poyry refResult = result.statusCodes[0] 2593c827367444ee418f129b2c238299f49d3264554Jarkko Poyry resResult = result.statusCodes[1] 2603c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 2613c827367444ee418f129b2c238299f49d3264554Jarkko Poyry if not statusCodesMatch(refResult, resResult): 2623c827367444ee418f129b2c238299f49d3264554Jarkko Poyry failedCases.append(result) 2633c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 2643c827367444ee418f129b2c238299f49d3264554Jarkko Poyry return failedCases 2653c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 2663c827367444ee418f129b2c238299f49d3264554Jarkko Poyrydef getUnusedPort (): 2673c827367444ee418f129b2c238299f49d3264554Jarkko Poyry # \note Not 100%-proof method as other apps may grab this port before we launch execserver 2683c827367444ee418f129b2c238299f49d3264554Jarkko Poyry s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 2693c827367444ee418f129b2c238299f49d3264554Jarkko Poyry s.bind(('localhost', 0)) 2703c827367444ee418f129b2c238299f49d3264554Jarkko Poyry addr, port = s.getsockname() 2713c827367444ee418f129b2c238299f49d3264554Jarkko Poyry s.close() 2723c827367444ee418f129b2c238299f49d3264554Jarkko Poyry return port 2733c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 2743c827367444ee418f129b2c238299f49d3264554Jarkko Poyrydef runNightly (config): 2753c827367444ee418f129b2c238299f49d3264554Jarkko Poyry build(config.buildConfig, config.generator) 2763c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 2773c827367444ee418f129b2c238299f49d3264554Jarkko Poyry # Run parameters 2783c827367444ee418f129b2c238299f49d3264554Jarkko Poyry timestamp = getResultTimestamp() 2793c827367444ee418f129b2c238299f49d3264554Jarkko Poyry logDir = os.path.join(BASE_LOGS_DIR, config.name) 2803c827367444ee418f129b2c238299f49d3264554Jarkko Poyry testLogPath = os.path.join(logDir, timestamp + ".qpa") 2813c827367444ee418f129b2c238299f49d3264554Jarkko Poyry infoLogPath = os.path.join(logDir, timestamp + ".txt") 2823c827367444ee418f129b2c238299f49d3264554Jarkko Poyry csvLogPath = os.path.join(logDir, timestamp + ".csv") 2833c827367444ee418f129b2c238299f49d3264554Jarkko Poyry compareLogPath = os.path.join(BASE_REFS_DIR, config.name + ".csv") 2843c827367444ee418f129b2c238299f49d3264554Jarkko Poyry port = getUnusedPort() 2853c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 2863c827367444ee418f129b2c238299f49d3264554Jarkko Poyry if not os.path.exists(logDir): 2873c827367444ee418f129b2c238299f49d3264554Jarkko Poyry os.makedirs(logDir) 2883c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 2893c827367444ee418f129b2c238299f49d3264554Jarkko Poyry if os.path.exists(testLogPath) or os.path.exists(infoLogPath): 2903c827367444ee418f129b2c238299f49d3264554Jarkko Poyry raise Exception("Result '%s' already exists", timestamp) 2913c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 2923c827367444ee418f129b2c238299f49d3264554Jarkko Poyry # Paths, etc. 2933c827367444ee418f129b2c238299f49d3264554Jarkko Poyry binaryName = config.generator.getBinaryPath(config.buildConfig.getBuildType(), os.path.basename(config.binaryName)) 2943c827367444ee418f129b2c238299f49d3264554Jarkko Poyry workingDir = os.path.join(config.buildConfig.getBuildDir(), os.path.dirname(config.binaryName)) 2953c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 2963c827367444ee418f129b2c238299f49d3264554Jarkko Poyry execArgs = [ 2973c827367444ee418f129b2c238299f49d3264554Jarkko Poyry config.getBinaryPath(EXECUTOR_PATH), 2983c827367444ee418f129b2c238299f49d3264554Jarkko Poyry '--start-server=%s' % config.getBinaryPath(EXECSERVER_PATH), 2993c827367444ee418f129b2c238299f49d3264554Jarkko Poyry '--port=%d' % port, 3003c827367444ee418f129b2c238299f49d3264554Jarkko Poyry '--binaryname=%s' % binaryName, 3013c827367444ee418f129b2c238299f49d3264554Jarkko Poyry '--cmdline=%s' % string.join([shellquote(arg) for arg in config.args], " "), 3023c827367444ee418f129b2c238299f49d3264554Jarkko Poyry '--workdir=%s' % workingDir, 3033c827367444ee418f129b2c238299f49d3264554Jarkko Poyry '--caselistdir=%s' % CASELIST_PATH, 3043c827367444ee418f129b2c238299f49d3264554Jarkko Poyry '--testset=%s' % string.join(config.testset, ","), 3053c827367444ee418f129b2c238299f49d3264554Jarkko Poyry '--out=%s' % testLogPath, 3063c827367444ee418f129b2c238299f49d3264554Jarkko Poyry '--info=%s' % infoLogPath, 3073c827367444ee418f129b2c238299f49d3264554Jarkko Poyry '--summary=no' 3083c827367444ee418f129b2c238299f49d3264554Jarkko Poyry ] 3093c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 3103c827367444ee418f129b2c238299f49d3264554Jarkko Poyry if len(config.exclude) > 0: 3113c827367444ee418f129b2c238299f49d3264554Jarkko Poyry execArgs += ['--exclude=%s' % string.join(config.exclude, ",")] 3123c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 3133c827367444ee418f129b2c238299f49d3264554Jarkko Poyry execute(execArgs) 3143c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 3153c827367444ee418f129b2c238299f49d3264554Jarkko Poyry # Translate to CSV for comparison purposes 3163c827367444ee418f129b2c238299f49d3264554Jarkko Poyry lastResultCsv = parseAsCSV(testLogPath, config) 3173c827367444ee418f129b2c238299f49d3264554Jarkko Poyry writeFile(csvLogPath, lastResultCsv) 3183c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 3193c827367444ee418f129b2c238299f49d3264554Jarkko Poyry if os.path.exists(compareLogPath): 3203c827367444ee418f129b2c238299f49d3264554Jarkko Poyry refBatchResult = readBatchResultFromCSV(compareLogPath, "reference") 3213c827367444ee418f129b2c238299f49d3264554Jarkko Poyry else: 3223c827367444ee418f129b2c238299f49d3264554Jarkko Poyry refBatchResult = None 3233c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 3243c827367444ee418f129b2c238299f49d3264554Jarkko Poyry # Generate comparison report 3253c827367444ee418f129b2c238299f49d3264554Jarkko Poyry compareFilenames = getCompareFilenames(logDir) 3263c827367444ee418f129b2c238299f49d3264554Jarkko Poyry batchResults = [readBatchResultFromCSV(filename) for filename in compareFilenames] 3273c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 3283c827367444ee418f129b2c238299f49d3264554Jarkko Poyry if refBatchResult != None: 3293c827367444ee418f129b2c238299f49d3264554Jarkko Poyry batchResults = [refBatchResult] + batchResults 3303c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 3313c827367444ee418f129b2c238299f49d3264554Jarkko Poyry writeFile(COMPARE_REPORT_NAME, genCompareReport(batchResults, config.name, config.ignore)) 3323c827367444ee418f129b2c238299f49d3264554Jarkko Poyry print "Comparison report written to %s" % COMPARE_REPORT_NAME 3333c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 3343c827367444ee418f129b2c238299f49d3264554Jarkko Poyry # Compare to reference 3353c827367444ee418f129b2c238299f49d3264554Jarkko Poyry if refBatchResult != None: 3363c827367444ee418f129b2c238299f49d3264554Jarkko Poyry curBatchResult = BatchResult("current") 3373c827367444ee418f129b2c238299f49d3264554Jarkko Poyry curBatchResult.results = parseResultCsv(lastResultCsv) 3383c827367444ee418f129b2c238299f49d3264554Jarkko Poyry failedCases = compareBatchResults(refBatchResult, curBatchResult, config.ignore) 3393c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 3403c827367444ee418f129b2c238299f49d3264554Jarkko Poyry print "" 3413c827367444ee418f129b2c238299f49d3264554Jarkko Poyry for result in failedCases: 3423c827367444ee418f129b2c238299f49d3264554Jarkko Poyry print "MISMATCH: %s: expected %s, got %s" % (result.name, result.statusCodes[0], result.statusCodes[1]) 3433c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 3443c827367444ee418f129b2c238299f49d3264554Jarkko Poyry print "" 3453c827367444ee418f129b2c238299f49d3264554Jarkko Poyry print "%d / %d cases passed, run %s" % (len(curBatchResult.results)-len(failedCases), len(curBatchResult.results), "FAILED" if len(failedCases) > 0 else "passed") 3463c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 3473c827367444ee418f129b2c238299f49d3264554Jarkko Poyry if len(failedCases) > 0: 3483c827367444ee418f129b2c238299f49d3264554Jarkko Poyry return False 3493c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 3503c827367444ee418f129b2c238299f49d3264554Jarkko Poyry return True 3513c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 3523c827367444ee418f129b2c238299f49d3264554Jarkko Poyry# Configurations 3533c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 3543c827367444ee418f129b2c238299f49d3264554Jarkko PoyryDEFAULT_WIN32_GENERATOR = ANY_VS_X32_GENERATOR 3553c827367444ee418f129b2c238299f49d3264554Jarkko PoyryDEFAULT_WIN64_GENERATOR = ANY_VS_X64_GENERATOR 3563c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 3573c827367444ee418f129b2c238299f49d3264554Jarkko PoyryWGL_X64_RELEASE_BUILD_CFG = NightlyBuildConfig("wgl_x64_release", "Release", ['-DDEQP_TARGET=win32_wgl']) 3583c827367444ee418f129b2c238299f49d3264554Jarkko PoyryARM_GLES3_EMU_X32_RELEASE_BUILD_CFG = NightlyBuildConfig("arm_gles3_emu_release", "Release", ['-DDEQP_TARGET=arm_gles3_emu']) 3593c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 3603c827367444ee418f129b2c238299f49d3264554Jarkko PoyryBASE_ARGS = ['--deqp-visibility=hidden', '--deqp-watchdog=enable', '--deqp-crashhandler=enable'] 3613c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 3623c827367444ee418f129b2c238299f49d3264554Jarkko PoyryCONFIGS = [ 3633c827367444ee418f129b2c238299f49d3264554Jarkko Poyry NightlyRunConfig( 3643c827367444ee418f129b2c238299f49d3264554Jarkko Poyry name = "wgl_x64_release_gles2", 3653c827367444ee418f129b2c238299f49d3264554Jarkko Poyry buildConfig = WGL_X64_RELEASE_BUILD_CFG, 3663c827367444ee418f129b2c238299f49d3264554Jarkko Poyry generator = DEFAULT_WIN64_GENERATOR, 3673c827367444ee418f129b2c238299f49d3264554Jarkko Poyry binaryName = "modules/gles2/deqp-gles2", 3683c827367444ee418f129b2c238299f49d3264554Jarkko Poyry args = ['--deqp-gl-config-name=rgba8888d24s8ms0'] + BASE_ARGS, 3693c827367444ee418f129b2c238299f49d3264554Jarkko Poyry testset = ["dEQP-GLES2.info.*", "dEQP-GLES2.functional.*", "dEQP-GLES2.usecases.*"], 3703c827367444ee418f129b2c238299f49d3264554Jarkko Poyry exclude = [ 3713c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "dEQP-GLES2.functional.shaders.loops.*while*unconditional_continue*", 3723c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "dEQP-GLES2.functional.shaders.loops.*while*only_continue*", 3733c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "dEQP-GLES2.functional.shaders.loops.*while*double_continue*", 3743c827367444ee418f129b2c238299f49d3264554Jarkko Poyry ], 3753c827367444ee418f129b2c238299f49d3264554Jarkko Poyry ignore = [] 3763c827367444ee418f129b2c238299f49d3264554Jarkko Poyry ), 3773c827367444ee418f129b2c238299f49d3264554Jarkko Poyry NightlyRunConfig( 3783c827367444ee418f129b2c238299f49d3264554Jarkko Poyry name = "wgl_x64_release_gles3", 3793c827367444ee418f129b2c238299f49d3264554Jarkko Poyry buildConfig = WGL_X64_RELEASE_BUILD_CFG, 3803c827367444ee418f129b2c238299f49d3264554Jarkko Poyry generator = DEFAULT_WIN64_GENERATOR, 3813c827367444ee418f129b2c238299f49d3264554Jarkko Poyry binaryName = "modules/gles3/deqp-gles3", 3823c827367444ee418f129b2c238299f49d3264554Jarkko Poyry args = ['--deqp-gl-config-name=rgba8888d24s8ms0'] + BASE_ARGS, 3833c827367444ee418f129b2c238299f49d3264554Jarkko Poyry testset = ["dEQP-GLES3.info.*", "dEQP-GLES3.functional.*", "dEQP-GLES3.usecases.*"], 3843c827367444ee418f129b2c238299f49d3264554Jarkko Poyry exclude = [ 3853c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "dEQP-GLES3.functional.shaders.loops.*while*unconditional_continue*", 3863c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "dEQP-GLES3.functional.shaders.loops.*while*only_continue*", 3873c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "dEQP-GLES3.functional.shaders.loops.*while*double_continue*", 3883c827367444ee418f129b2c238299f49d3264554Jarkko Poyry ], 3893c827367444ee418f129b2c238299f49d3264554Jarkko Poyry ignore = [ 3903c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "dEQP-GLES3.functional.transform_feedback.*", 3913c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "dEQP-GLES3.functional.occlusion_query.*", 3923c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "dEQP-GLES3.functional.lifetime.*", 3933c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "dEQP-GLES3.functional.fragment_ops.depth_stencil.stencil_ops", 3943c827367444ee418f129b2c238299f49d3264554Jarkko Poyry ] 3953c827367444ee418f129b2c238299f49d3264554Jarkko Poyry ), 3963c827367444ee418f129b2c238299f49d3264554Jarkko Poyry NightlyRunConfig( 3973c827367444ee418f129b2c238299f49d3264554Jarkko Poyry name = "wgl_x64_release_gles31", 3983c827367444ee418f129b2c238299f49d3264554Jarkko Poyry buildConfig = WGL_X64_RELEASE_BUILD_CFG, 3993c827367444ee418f129b2c238299f49d3264554Jarkko Poyry generator = DEFAULT_WIN64_GENERATOR, 4003c827367444ee418f129b2c238299f49d3264554Jarkko Poyry binaryName = "modules/gles31/deqp-gles31", 4013c827367444ee418f129b2c238299f49d3264554Jarkko Poyry args = ['--deqp-gl-config-name=rgba8888d24s8ms0'] + BASE_ARGS, 4023c827367444ee418f129b2c238299f49d3264554Jarkko Poyry testset = ["dEQP-GLES31.*"], 4033c827367444ee418f129b2c238299f49d3264554Jarkko Poyry exclude = [], 4043c827367444ee418f129b2c238299f49d3264554Jarkko Poyry ignore = [ 4053c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "dEQP-GLES31.functional.draw_indirect.negative.command_bad_alignment_3", 4063c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "dEQP-GLES31.functional.draw_indirect.negative.command_offset_not_in_buffer", 4073c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "dEQP-GLES31.functional.vertex_attribute_binding.negative.bind_vertex_buffer_negative_offset", 4083c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "dEQP-GLES31.functional.ssbo.layout.single_basic_type.packed.mediump_uint", 4093c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "dEQP-GLES31.functional.blend_equation_advanced.basic.*", 4103c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "dEQP-GLES31.functional.blend_equation_advanced.srgb.*", 4113c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "dEQP-GLES31.functional.blend_equation_advanced.barrier.*", 4123c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "dEQP-GLES31.functional.uniform_location.*", 4133c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "dEQP-GLES31.functional.debug.negative_coverage.log.state.get_framebuffer_attachment_parameteriv", 4143c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "dEQP-GLES31.functional.debug.negative_coverage.log.state.get_renderbuffer_parameteriv", 4153c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "dEQP-GLES31.functional.debug.error_filters.case_0", 4163c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "dEQP-GLES31.functional.debug.error_filters.case_2", 4173c827367444ee418f129b2c238299f49d3264554Jarkko Poyry ] 4183c827367444ee418f129b2c238299f49d3264554Jarkko Poyry ), 4193c827367444ee418f129b2c238299f49d3264554Jarkko Poyry NightlyRunConfig( 4203c827367444ee418f129b2c238299f49d3264554Jarkko Poyry name = "wgl_x64_release_gl3", 4213c827367444ee418f129b2c238299f49d3264554Jarkko Poyry buildConfig = WGL_X64_RELEASE_BUILD_CFG, 4223c827367444ee418f129b2c238299f49d3264554Jarkko Poyry generator = DEFAULT_WIN64_GENERATOR, 4233c827367444ee418f129b2c238299f49d3264554Jarkko Poyry binaryName = "modules/gl3/deqp-gl3", 4243c827367444ee418f129b2c238299f49d3264554Jarkko Poyry args = ['--deqp-gl-config-name=rgba8888d24s8ms0'] + BASE_ARGS, 4253c827367444ee418f129b2c238299f49d3264554Jarkko Poyry testset = ["dEQP-GL3.info.*", "dEQP-GL3.functional.*"], 4263c827367444ee418f129b2c238299f49d3264554Jarkko Poyry exclude = [ 4273c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "dEQP-GL3.functional.shaders.loops.*while*unconditional_continue*", 4283c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "dEQP-GL3.functional.shaders.loops.*while*only_continue*", 4293c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "dEQP-GL3.functional.shaders.loops.*while*double_continue*", 4303c827367444ee418f129b2c238299f49d3264554Jarkko Poyry ], 4313c827367444ee418f129b2c238299f49d3264554Jarkko Poyry ignore = [ 4323c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "dEQP-GL3.functional.transform_feedback.*" 4333c827367444ee418f129b2c238299f49d3264554Jarkko Poyry ] 4343c827367444ee418f129b2c238299f49d3264554Jarkko Poyry ), 4353c827367444ee418f129b2c238299f49d3264554Jarkko Poyry NightlyRunConfig( 4363c827367444ee418f129b2c238299f49d3264554Jarkko Poyry name = "arm_gles3_emu_x32_egl", 4373c827367444ee418f129b2c238299f49d3264554Jarkko Poyry buildConfig = ARM_GLES3_EMU_X32_RELEASE_BUILD_CFG, 4383c827367444ee418f129b2c238299f49d3264554Jarkko Poyry generator = DEFAULT_WIN32_GENERATOR, 4393c827367444ee418f129b2c238299f49d3264554Jarkko Poyry binaryName = "modules/egl/deqp-egl", 4403c827367444ee418f129b2c238299f49d3264554Jarkko Poyry args = BASE_ARGS, 4413c827367444ee418f129b2c238299f49d3264554Jarkko Poyry testset = ["dEQP-EGL.info.*", "dEQP-EGL.functional.*"], 4423c827367444ee418f129b2c238299f49d3264554Jarkko Poyry exclude = [ 4433c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "dEQP-EGL.functional.sharing.gles2.multithread.*", 4443c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "dEQP-EGL.functional.multithread.*", 4453c827367444ee418f129b2c238299f49d3264554Jarkko Poyry ], 4463c827367444ee418f129b2c238299f49d3264554Jarkko Poyry ignore = [] 4473c827367444ee418f129b2c238299f49d3264554Jarkko Poyry ), 4483c827367444ee418f129b2c238299f49d3264554Jarkko Poyry NightlyRunConfig( 4493c827367444ee418f129b2c238299f49d3264554Jarkko Poyry name = "opencl_x64_release", 4503c827367444ee418f129b2c238299f49d3264554Jarkko Poyry buildConfig = NightlyBuildConfig("opencl_x64_release", "Release", ['-DDEQP_TARGET=opencl_icd']), 4513c827367444ee418f129b2c238299f49d3264554Jarkko Poyry generator = DEFAULT_WIN64_GENERATOR, 4523c827367444ee418f129b2c238299f49d3264554Jarkko Poyry binaryName = "modules/opencl/deqp-opencl", 4533c827367444ee418f129b2c238299f49d3264554Jarkko Poyry args = ['--deqp-cl-platform-id=2 --deqp-cl-device-ids=1'] + BASE_ARGS, 4543c827367444ee418f129b2c238299f49d3264554Jarkko Poyry testset = ["dEQP-CL.*"], 4553c827367444ee418f129b2c238299f49d3264554Jarkko Poyry exclude = ["dEQP-CL.performance.*", "dEQP-CL.robustness.*", "dEQP-CL.stress.memory.*"], 4563c827367444ee418f129b2c238299f49d3264554Jarkko Poyry ignore = [ 4573c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "dEQP-CL.scheduler.random.*", 4583c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "dEQP-CL.language.set_kernel_arg.random_structs.*", 4593c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "dEQP-CL.language.builtin_function.work_item.invalid_get_global_offset", 4603c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "dEQP-CL.language.call_function.arguments.random_structs.*", 4613c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "dEQP-CL.language.call_kernel.random_structs.*", 4623c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "dEQP-CL.language.inf_nan.nan.frexp.float", 4633c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "dEQP-CL.language.inf_nan.nan.lgamma_r.float", 4643c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "dEQP-CL.language.inf_nan.nan.modf.float", 4653c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "dEQP-CL.language.inf_nan.nan.sqrt.float", 4663c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "dEQP-CL.api.multithread.*", 4673c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "dEQP-CL.api.callback.random.nested.*", 4683c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "dEQP-CL.api.memory_migration.out_of_order_host.image2d.single_device_kernel_migrate_validate_abb", 4693c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "dEQP-CL.api.memory_migration.out_of_order.image2d.single_device_kernel_migrate_kernel_validate_abbb", 4703c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "dEQP-CL.image.addressing_filtering12.1d_array.*", 4713c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "dEQP-CL.image.addressing_filtering12.2d_array.*" 4723c827367444ee418f129b2c238299f49d3264554Jarkko Poyry ] 4733c827367444ee418f129b2c238299f49d3264554Jarkko Poyry ) 4743c827367444ee418f129b2c238299f49d3264554Jarkko Poyry] 4753c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 4763c827367444ee418f129b2c238299f49d3264554Jarkko Poyryif __name__ == "__main__": 4773c827367444ee418f129b2c238299f49d3264554Jarkko Poyry config = None 4783c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 4793c827367444ee418f129b2c238299f49d3264554Jarkko Poyry if len(sys.argv) == 2: 4803c827367444ee418f129b2c238299f49d3264554Jarkko Poyry cfgName = sys.argv[1] 4813c827367444ee418f129b2c238299f49d3264554Jarkko Poyry for curCfg in CONFIGS: 4823c827367444ee418f129b2c238299f49d3264554Jarkko Poyry if curCfg.name == cfgName: 4833c827367444ee418f129b2c238299f49d3264554Jarkko Poyry config = curCfg 4843c827367444ee418f129b2c238299f49d3264554Jarkko Poyry break 4853c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 4863c827367444ee418f129b2c238299f49d3264554Jarkko Poyry if config != None: 4873c827367444ee418f129b2c238299f49d3264554Jarkko Poyry isOk = runNightly(config) 4883c827367444ee418f129b2c238299f49d3264554Jarkko Poyry if not isOk: 4893c827367444ee418f129b2c238299f49d3264554Jarkko Poyry sys.exit(-1) 4903c827367444ee418f129b2c238299f49d3264554Jarkko Poyry else: 4913c827367444ee418f129b2c238299f49d3264554Jarkko Poyry print "%s: [config]" % sys.argv[0] 4923c827367444ee418f129b2c238299f49d3264554Jarkko Poyry print "" 4933c827367444ee418f129b2c238299f49d3264554Jarkko Poyry print " Available configs:" 4943c827367444ee418f129b2c238299f49d3264554Jarkko Poyry for config in CONFIGS: 4953c827367444ee418f129b2c238299f49d3264554Jarkko Poyry print " %s" % config.name 4963c827367444ee418f129b2c238299f49d3264554Jarkko Poyry sys.exit(-1) 497