1# -*- coding: utf-8 -*- 2 3#------------------------------------------------------------------------- 4# drawElements Quality Program utilities 5# -------------------------------------- 6# 7# Copyright 2015 The Android Open Source Project 8# 9# Licensed under the Apache License, Version 2.0 (the "License"); 10# you may not use this file except in compliance with the License. 11# You may obtain a copy of the License at 12# 13# http://www.apache.org/licenses/LICENSE-2.0 14# 15# Unless required by applicable law or agreed to in writing, software 16# distributed under the License is distributed on an "AS IS" BASIS, 17# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18# See the License for the specific language governing permissions and 19# limitations under the License. 20# 21#------------------------------------------------------------------------- 22 23from build.common import DEQP_DIR 24from build.config import ANY_GENERATOR 25from build_caselists import Module, getModuleByName, getBuildConfig, DEFAULT_BUILD_DIR, DEFAULT_TARGET 26from mustpass import Project, Package, Mustpass, Configuration, include, exclude, genMustpassLists, parseBuildConfigFromCmdLineArgs 27 28import os 29 30COPYRIGHT_DECLARATION = """ 31 Copyright (C) 2016 The Android Open Source Project 32 33 Licensed under the Apache License, Version 2.0 (the "License"); 34 you may not use this file except in compliance with the License. 35 You may obtain a copy of the License at 36 37 http://www.apache.org/licenses/LICENSE-2.0 38 39 Unless required by applicable law or agreed to in writing, software 40 distributed under the License is distributed on an "AS IS" BASIS, 41 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 42 See the License for the specific language governing permissions and 43 limitations under the License. 44 """ 45 46CTS_DATA_DIR = os.path.join(DEQP_DIR, "android", "cts") 47 48CTS_PROJECT = Project(path = CTS_DATA_DIR, copyright = COPYRIGHT_DECLARATION) 49 50EGL_MODULE = getModuleByName("dEQP-EGL") 51GLES2_MODULE = getModuleByName("dEQP-GLES2") 52GLES3_MODULE = getModuleByName("dEQP-GLES3") 53GLES31_MODULE = getModuleByName("dEQP-GLES31") 54VULKAN_MODULE = getModuleByName("dEQP-VK") 55 56# Lollipop 57 58LMP_GLES3_PKG = Package(module = GLES3_MODULE, configurations = [ 59 Configuration(name = "master", 60 glconfig = "rgba8888d24s8ms0", 61 rotation = "unspecified", 62 surfacetype = "window", 63 filters = [include("es30-lmp.txt")]), 64 ]) 65LMP_GLES31_PKG = Package(module = GLES31_MODULE, configurations = [ 66 Configuration(name = "master", 67 glconfig = "rgba8888d24s8ms0", 68 rotation = "unspecified", 69 surfacetype = "window", 70 filters = [include("es31-lmp.txt")]), 71 ]) 72 73# Lollipop MR1 74 75LMP_MR1_GLES3_PKG = Package(module = GLES3_MODULE, configurations = [ 76 Configuration(name = "master", 77 glconfig = "rgba8888d24s8ms0", 78 rotation = "unspecified", 79 surfacetype = "window", 80 filters = [include("es30-lmp-mr1.txt")]), 81 ]) 82LMP_MR1_GLES31_PKG = Package(module = GLES31_MODULE, configurations = [ 83 Configuration(name = "master", 84 glconfig = "rgba8888d24s8ms0", 85 rotation = "unspecified", 86 surfacetype = "window", 87 filters = [include("es31-lmp-mr1.txt")]), 88 ]) 89 90# Marshmallow 91 92MNC_EGL_PKG = Package(module = EGL_MODULE, configurations = [ 93 # Master 94 Configuration(name = "master", 95 glconfig = "rgba8888d24s8ms0", 96 rotation = "unspecified", 97 surfacetype = "window", 98 filters = [include("egl-master.txt")]), 99 ]) 100MNC_GLES2_PKG = Package(module = GLES2_MODULE, configurations = [ 101 # Master 102 Configuration(name = "master", 103 glconfig = "rgba8888d24s8ms0", 104 rotation = "unspecified", 105 surfacetype = "window", 106 filters = [include("gles2-master.txt")]), 107 ]) 108MNC_GLES3_PKG = Package(module = GLES3_MODULE, configurations = [ 109 # Master 110 Configuration(name = "master", 111 glconfig = "rgba8888d24s8ms0", 112 rotation = "unspecified", 113 surfacetype = "window", 114 filters = [include("gles3-master.txt")]), 115 # Rotations 116 Configuration(name = "rotate-portrait", 117 glconfig = "rgba8888d24s8ms0", 118 rotation = "0", 119 surfacetype = "window", 120 filters = [include("gles3-master.txt"), include("gles3-rotation.txt")]), 121 Configuration(name = "rotate-landscape", 122 glconfig = "rgba8888d24s8ms0", 123 rotation = "90", 124 surfacetype = "window", 125 filters = [include("gles3-master.txt"), include("gles3-rotation.txt")]), 126 Configuration(name = "rotate-reverse-portrait", 127 glconfig = "rgba8888d24s8ms0", 128 rotation = "180", 129 surfacetype = "window", 130 filters = [include("gles3-master.txt"), include("gles3-rotation.txt")]), 131 Configuration(name = "rotate-reverse-landscape", 132 glconfig = "rgba8888d24s8ms0", 133 rotation = "270", 134 surfacetype = "window", 135 filters = [include("gles3-master.txt"), include("gles3-rotation.txt")]), 136 137 # MSAA 138 Configuration(name = "multisample", 139 glconfig = "rgba8888d24s8ms4", 140 rotation = "unspecified", 141 surfacetype = "window", 142 filters = [include("gles3-master.txt"), 143 include("gles3-multisample.txt"), 144 exclude("gles3-multisample-issues.txt")]), 145 146 # Pixel format 147 Configuration(name = "565-no-depth-no-stencil", 148 glconfig = "rgb565d0s0ms0", 149 rotation = "unspecified", 150 surfacetype = "window", 151 filters = [include("gles3-master.txt"), 152 include("gles3-pixelformat.txt"), 153 exclude("gles3-pixelformat-issues.txt")]), 154 ]) 155MNC_GLES31_PKG = Package(module = GLES31_MODULE, configurations = [ 156 # Master 157 Configuration(name = "master", 158 glconfig = "rgba8888d24s8ms0", 159 rotation = "unspecified", 160 surfacetype = "window", 161 filters = [include("gles31-master.txt")]), 162 163 # Rotations 164 Configuration(name = "rotate-portrait", 165 glconfig = "rgba8888d24s8ms0", 166 rotation = "0", 167 surfacetype = "window", 168 filters = [include("gles31-master.txt"), include("gles31-rotation.txt")]), 169 Configuration(name = "rotate-landscape", 170 glconfig = "rgba8888d24s8ms0", 171 rotation = "90", 172 surfacetype = "window", 173 filters = [include("gles31-master.txt"), include("gles31-rotation.txt")]), 174 Configuration(name = "rotate-reverse-portrait", 175 glconfig = "rgba8888d24s8ms0", 176 rotation = "180", 177 surfacetype = "window", 178 filters = [include("gles31-master.txt"), include("gles31-rotation.txt")]), 179 Configuration(name = "rotate-reverse-landscape", 180 glconfig = "rgba8888d24s8ms0", 181 rotation = "270", 182 surfacetype = "window", 183 filters = [include("gles31-master.txt"), include("gles31-rotation.txt")]), 184 185 # MSAA 186 Configuration(name = "multisample", 187 glconfig = "rgba8888d24s8ms4", 188 rotation = "unspecified", 189 surfacetype = "window", 190 filters = [include("gles31-master.txt"), include("gles31-multisample.txt")]), 191 192 # Pixel format 193 Configuration(name = "565-no-depth-no-stencil", 194 glconfig = "rgb565d0s0ms0", 195 rotation = "unspecified", 196 surfacetype = "window", 197 filters = [include("gles31-master.txt"), include("gles31-pixelformat.txt")]), 198 ]) 199 200# NYC 201 202NYC_EGL_COMMON_FILTERS = [include("egl-master.txt")] 203NYC_EGL_PKG = Package(module = EGL_MODULE, configurations = [ 204 # Master 205 Configuration(name = "master", 206 glconfig = "rgba8888d24s8ms0", 207 rotation = "unspecified", 208 surfacetype = "window", 209 filters = NYC_EGL_COMMON_FILTERS, 210 runtime = "11m"), 211 ]) 212 213NYC_GLES2_COMMON_FILTERS = [ 214 include("gles2-master.txt") 215 ] 216NYC_GLES2_PKG = Package(module = GLES2_MODULE, configurations = [ 217 # Master 218 Configuration(name = "master", 219 glconfig = "rgba8888d24s8ms0", 220 rotation = "unspecified", 221 surfacetype = "window", 222 filters = NYC_GLES2_COMMON_FILTERS, 223 runtime = "30m"), 224 ]) 225 226NYC_GLES3_COMMON_FILTERS = [ 227 include("gles3-master.txt") 228 ] 229NYC_GLES3_PKG = Package(module = GLES3_MODULE, configurations = [ 230 # Master 231 Configuration(name = "master", 232 glconfig = "rgba8888d24s8ms0", 233 rotation = "unspecified", 234 surfacetype = "window", 235 filters = NYC_GLES3_COMMON_FILTERS, 236 runtime = "1h50min"), 237 # Rotations 238 Configuration(name = "rotate-portrait", 239 glconfig = "rgba8888d24s8ms0", 240 rotation = "0", 241 surfacetype = "window", 242 filters = NYC_GLES3_COMMON_FILTERS + [include("gles3-rotation.txt")], 243 runtime = "5m"), 244 Configuration(name = "rotate-landscape", 245 glconfig = "rgba8888d24s8ms0", 246 rotation = "90", 247 surfacetype = "window", 248 filters = NYC_GLES3_COMMON_FILTERS + [include("gles3-rotation.txt")], 249 runtime = "5m"), 250 Configuration(name = "rotate-reverse-portrait", 251 glconfig = "rgba8888d24s8ms0", 252 rotation = "180", 253 surfacetype = "window", 254 filters = NYC_GLES3_COMMON_FILTERS + [include("gles3-rotation.txt")], 255 runtime = "5m"), 256 Configuration(name = "rotate-reverse-landscape", 257 glconfig = "rgba8888d24s8ms0", 258 rotation = "270", 259 surfacetype = "window", 260 filters = NYC_GLES3_COMMON_FILTERS + [include("gles3-rotation.txt")], 261 runtime = "5m"), 262 263 # MSAA 264 Configuration(name = "multisample", 265 glconfig = "rgba8888d24s8ms4", 266 rotation = "unspecified", 267 surfacetype = "window", 268 filters = NYC_GLES3_COMMON_FILTERS + [include("gles3-multisample.txt")], 269 runtime = "10m"), 270 271 # Pixel format 272 Configuration(name = "565-no-depth-no-stencil", 273 glconfig = "rgb565d0s0ms0", 274 rotation = "unspecified", 275 surfacetype = "window", 276 filters = NYC_GLES3_COMMON_FILTERS + [include("gles3-pixelformat.txt")], 277 runtime = "10m"), 278 ]) 279 280NYC_GLES31_COMMON_FILTERS = [ 281 include("gles31-master.txt") 282 ] 283NYC_GLES31_PKG = Package(module = GLES31_MODULE, configurations = [ 284 # Master 285 Configuration(name = "master", 286 glconfig = "rgba8888d24s8ms0", 287 rotation = "unspecified", 288 surfacetype = "window", 289 filters = NYC_GLES31_COMMON_FILTERS, 290 runtime = "4h40m"), 291 292 # Rotations 293 Configuration(name = "rotate-portrait", 294 glconfig = "rgba8888d24s8ms0", 295 rotation = "0", 296 surfacetype = "window", 297 filters = NYC_GLES31_COMMON_FILTERS + [include("gles31-rotation.txt")], 298 runtime = "1m30s"), 299 Configuration(name = "rotate-landscape", 300 glconfig = "rgba8888d24s8ms0", 301 rotation = "90", 302 surfacetype = "window", 303 filters = NYC_GLES31_COMMON_FILTERS + [include("gles31-rotation.txt")], 304 runtime = "1m30s"), 305 Configuration(name = "rotate-reverse-portrait", 306 glconfig = "rgba8888d24s8ms0", 307 rotation = "180", 308 surfacetype = "window", 309 filters = NYC_GLES31_COMMON_FILTERS + [include("gles31-rotation.txt")], 310 runtime = "1m30s"), 311 Configuration(name = "rotate-reverse-landscape", 312 glconfig = "rgba8888d24s8ms0", 313 rotation = "270", 314 surfacetype = "window", 315 filters = NYC_GLES31_COMMON_FILTERS + [include("gles31-rotation.txt")], 316 runtime = "1m30s"), 317 318 # MSAA 319 Configuration(name = "multisample", 320 glconfig = "rgba8888d24s8ms4", 321 rotation = "unspecified", 322 surfacetype = "window", 323 filters = NYC_GLES31_COMMON_FILTERS + [include("gles31-multisample.txt")], 324 runtime = "2m"), 325 326 # Pixel format 327 Configuration(name = "565-no-depth-no-stencil", 328 glconfig = "rgb565d0s0ms0", 329 rotation = "unspecified", 330 surfacetype = "window", 331 filters = NYC_GLES31_COMMON_FILTERS + [include("gles31-pixelformat.txt")], 332 runtime = "1m"), 333 ]) 334 335NYC_VULKAN_FILTERS = [ 336 include("vk-master.txt") 337 ] 338NYC_VULKAN_PKG = Package(module = VULKAN_MODULE, configurations = [ 339 Configuration(name = "master", 340 filters = NYC_VULKAN_FILTERS, 341 runtime = "1h11m"), 342 ]) 343 344# Master 345 346MASTER_EGL_COMMON_FILTERS = [include("egl-master.txt"), 347 exclude("egl-test-issues.txt"), 348 exclude("egl-internal-api-tests.txt"), 349 exclude("egl-manual-robustness.txt"), 350 exclude("egl-driver-issues.txt"), 351 exclude("egl-temp-excluded.txt")] 352MASTER_EGL_PKG = Package(module = EGL_MODULE, configurations = [ 353 # Master 354 Configuration(name = "master", 355 glconfig = "rgba8888d24s8ms0", 356 rotation = "unspecified", 357 surfacetype = "window", 358 required = True, 359 filters = MASTER_EGL_COMMON_FILTERS, 360 runtime = "23m"), 361 # Risky subset 362 Configuration(name = "master-risky", 363 glconfig = "rgba8888d24s8ms0", 364 rotation = "unspecified", 365 surfacetype = "window", 366 required = True, 367 filters = [include("egl-temp-excluded.txt")], 368 runtime = "2m"), 369 ]) 370 371MASTER_GLES2_COMMON_FILTERS = [ 372 include("gles2-master.txt"), 373 exclude("gles2-test-issues.txt"), 374 exclude("gles2-failures.txt"), 375 exclude("gles2-temp-excluded.txt"), 376 ] 377MASTER_GLES2_PKG = Package(module = GLES2_MODULE, configurations = [ 378 # Master 379 Configuration(name = "master", 380 glconfig = "rgba8888d24s8ms0", 381 rotation = "unspecified", 382 surfacetype = "window", 383 required = True, 384 filters = MASTER_GLES2_COMMON_FILTERS, 385 runtime = "46m"), 386 # Risky subset 387 Configuration(name = "master-risky", 388 glconfig = "rgba8888d24s8ms0", 389 rotation = "unspecified", 390 surfacetype = "window", 391 filters = [include("gles2-temp-excluded.txt")], 392 runtime = "10m"), 393 ]) 394 395MASTER_GLES3_COMMON_FILTERS = [ 396 include("gles3-master.txt"), 397 exclude("gles3-hw-issues.txt"), 398 exclude("gles3-driver-issues.txt"), 399 exclude("gles3-test-issues.txt"), 400 exclude("gles3-spec-issues.txt"), 401 exclude("gles3-temp-excluded.txt"), 402 ] 403MASTER_GLES3_PKG = Package(module = GLES3_MODULE, configurations = [ 404 # Master 405 Configuration(name = "master", 406 glconfig = "rgba8888d24s8ms0", 407 rotation = "unspecified", 408 surfacetype = "window", 409 required = True, 410 filters = MASTER_GLES3_COMMON_FILTERS, 411 runtime = "1h50m"), 412 # Risky subset 413 Configuration(name = "master-risky", 414 glconfig = "rgba8888d24s8ms0", 415 rotation = "unspecified", 416 surfacetype = "window", 417 filters = [include("gles3-temp-excluded.txt")], 418 runtime = "10m"), 419 # Rotations 420 Configuration(name = "rotate-portrait", 421 glconfig = "rgba8888d24s8ms0", 422 rotation = "0", 423 surfacetype = "window", 424 filters = MASTER_GLES3_COMMON_FILTERS + [include("gles3-rotation.txt")], 425 runtime = "1m"), 426 Configuration(name = "rotate-landscape", 427 glconfig = "rgba8888d24s8ms0", 428 rotation = "90", 429 surfacetype = "window", 430 filters = MASTER_GLES3_COMMON_FILTERS + [include("gles3-rotation.txt")], 431 runtime = "1m"), 432 Configuration(name = "rotate-reverse-portrait", 433 glconfig = "rgba8888d24s8ms0", 434 rotation = "180", 435 surfacetype = "window", 436 filters = MASTER_GLES3_COMMON_FILTERS + [include("gles3-rotation.txt")], 437 runtime = "1m"), 438 Configuration(name = "rotate-reverse-landscape", 439 glconfig = "rgba8888d24s8ms0", 440 rotation = "270", 441 surfacetype = "window", 442 filters = MASTER_GLES3_COMMON_FILTERS + [include("gles3-rotation.txt")], 443 runtime = "1m"), 444 445 # MSAA 446 Configuration(name = "multisample", 447 glconfig = "rgba8888d24s8ms4", 448 rotation = "unspecified", 449 surfacetype = "window", 450 filters = MASTER_GLES3_COMMON_FILTERS + [include("gles3-multisample.txt"), 451 exclude("gles3-multisample-issues.txt")], 452 runtime = "1m"), 453 454 # Pixel format 455 Configuration(name = "565-no-depth-no-stencil", 456 glconfig = "rgb565d0s0ms0", 457 rotation = "unspecified", 458 surfacetype = "window", 459 filters = MASTER_GLES3_COMMON_FILTERS + [include("gles3-pixelformat.txt"), 460 exclude("gles3-pixelformat-issues.txt")], 461 runtime = "1m"), 462 ]) 463 464MASTER_GLES31_COMMON_FILTERS = [ 465 include("gles31-master.txt"), 466 exclude("gles31-hw-issues.txt"), 467 exclude("gles31-driver-issues.txt"), 468 exclude("gles31-test-issues.txt"), 469 exclude("gles31-spec-issues.txt"), 470 exclude("gles31-temp-excluded.txt"), 471 ] 472MASTER_GLES31_PKG = Package(module = GLES31_MODULE, configurations = [ 473 # Master 474 Configuration(name = "master", 475 glconfig = "rgba8888d24s8ms0", 476 rotation = "unspecified", 477 surfacetype = "window", 478 required = True, 479 filters = MASTER_GLES31_COMMON_FILTERS, 480 runtime = "1h40m"), 481 # Risky subset 482 Configuration(name = "master-risky", 483 glconfig = "rgba8888d24s8ms0", 484 rotation = "unspecified", 485 surfacetype = "window", 486 filters = [include("gles31-temp-excluded.txt")], 487 runtime = "10m"), 488 489 # Rotations 490 Configuration(name = "rotate-portrait", 491 glconfig = "rgba8888d24s8ms0", 492 rotation = "0", 493 surfacetype = "window", 494 filters = MASTER_GLES31_COMMON_FILTERS + [include("gles31-rotation.txt")], 495 runtime = "1m30s"), 496 Configuration(name = "rotate-landscape", 497 glconfig = "rgba8888d24s8ms0", 498 rotation = "90", 499 surfacetype = "window", 500 filters = MASTER_GLES31_COMMON_FILTERS + [include("gles31-rotation.txt")], 501 runtime = "1m30s"), 502 Configuration(name = "rotate-reverse-portrait", 503 glconfig = "rgba8888d24s8ms0", 504 rotation = "180", 505 surfacetype = "window", 506 filters = MASTER_GLES31_COMMON_FILTERS + [include("gles31-rotation.txt")], 507 runtime = "1m30s"), 508 Configuration(name = "rotate-reverse-landscape", 509 glconfig = "rgba8888d24s8ms0", 510 rotation = "270", 511 surfacetype = "window", 512 filters = MASTER_GLES31_COMMON_FILTERS + [include("gles31-rotation.txt")], 513 runtime = "1m30s"), 514 515 # MSAA 516 Configuration(name = "multisample", 517 glconfig = "rgba8888d24s8ms4", 518 rotation = "unspecified", 519 surfacetype = "window", 520 filters = MASTER_GLES31_COMMON_FILTERS + [include("gles31-multisample.txt")], 521 runtime = "2m"), 522 523 # Pixel format 524 Configuration(name = "565-no-depth-no-stencil", 525 glconfig = "rgb565d0s0ms0", 526 rotation = "unspecified", 527 surfacetype = "window", 528 filters = MASTER_GLES31_COMMON_FILTERS + [include("gles31-pixelformat.txt")], 529 runtime = "1m"), 530 ]) 531 532MASTER_VULKAN_FILTERS = [ 533 include("vk-master.txt"), 534 exclude("vk-not-applicable.txt"), 535 exclude("vk-excluded-tests.txt"), 536 exclude("vk-test-issues.txt"), 537 exclude("vk-waivers.txt"), 538 exclude("vk-temp-excluded.txt"), 539 ] 540MASTER_VULKAN_PKG = Package(module = VULKAN_MODULE, configurations = [ 541 Configuration(name = "master", 542 filters = MASTER_VULKAN_FILTERS, 543 runtime = "2h29m"), 544 Configuration(name = "master-risky", 545 filters = [include("vk-temp-excluded.txt")], 546 runtime = "10m"), 547 ]) 548 549MUSTPASS_LISTS = [ 550 Mustpass(project = CTS_PROJECT, version = "lmp", packages = [LMP_GLES3_PKG, LMP_GLES31_PKG]), 551 Mustpass(project = CTS_PROJECT, version = "lmp-mr1", packages = [LMP_MR1_GLES3_PKG, LMP_MR1_GLES31_PKG]), 552 Mustpass(project = CTS_PROJECT, version = "mnc", packages = [MNC_EGL_PKG, MNC_GLES2_PKG, MNC_GLES3_PKG, MNC_GLES31_PKG]), 553 Mustpass(project = CTS_PROJECT, version = "nyc", packages = [NYC_EGL_PKG, NYC_GLES2_PKG, NYC_GLES3_PKG, NYC_GLES31_PKG, NYC_VULKAN_PKG]), 554 Mustpass(project = CTS_PROJECT, version = "master", packages = [MASTER_EGL_PKG, MASTER_GLES2_PKG, MASTER_GLES3_PKG, MASTER_GLES31_PKG, MASTER_VULKAN_PKG]) 555 ] 556 557if __name__ == "__main__": 558 genMustpassLists(MUSTPASS_LISTS, ANY_GENERATOR, parseBuildConfigFromCmdLineArgs()) 559