| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 import os | 4 import os |
| 5 | 5 |
| 6 from gpu_tests import gpu_test_base | 6 from gpu_tests import gpu_test_base |
| 7 from gpu_tests import path_util | 7 from gpu_tests import path_util |
| 8 from gpu_tests import webgl_conformance_expectations | 8 from gpu_tests import webgl_conformance_expectations |
| 9 from gpu_tests import webgl2_conformance_expectations | 9 from gpu_tests import webgl2_conformance_expectations |
| 10 | 10 |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 continue | 322 continue |
| 323 | 323 |
| 324 if line.startswith('//') or line.startswith('#'): | 324 if line.startswith('//') or line.startswith('#'): |
| 325 continue | 325 continue |
| 326 | 326 |
| 327 line_tokens = line.split(' ') | 327 line_tokens = line.split(' ') |
| 328 test_name = line_tokens[-1] | 328 test_name = line_tokens[-1] |
| 329 | 329 |
| 330 i = 0 | 330 i = 0 |
| 331 min_version = None | 331 min_version = None |
| 332 max_version = None |
| 332 while i < len(line_tokens): | 333 while i < len(line_tokens): |
| 333 token = line_tokens[i] | 334 token = line_tokens[i] |
| 334 if token == '--min-version': | 335 if token == '--min-version': |
| 335 i += 1 | 336 i += 1 |
| 336 min_version = line_tokens[i] | 337 min_version = line_tokens[i] |
| 338 elif token == '--max-version': |
| 339 i += 1 |
| 340 max_version = line_tokens[i] |
| 337 i += 1 | 341 i += 1 |
| 338 | 342 |
| 339 min_version_to_compare = min_version or folder_min_version | 343 min_version_to_compare = min_version or folder_min_version |
| 340 | 344 |
| 341 if (min_version_to_compare and | 345 if (min_version_to_compare and |
| 342 _CompareVersion(version, min_version_to_compare) < 0): | 346 _CompareVersion(version, min_version_to_compare) < 0): |
| 343 continue | 347 continue |
| 344 | 348 |
| 349 if max_version and _CompareVersion(version, max_version) > 0: |
| 350 continue |
| 351 |
| 345 if (webgl2_only and not '.txt' in test_name and | 352 if (webgl2_only and not '.txt' in test_name and |
| 346 (not min_version_to_compare or | 353 (not min_version_to_compare or |
| 347 not min_version_to_compare.startswith('2'))): | 354 not min_version_to_compare.startswith('2'))): |
| 348 continue | 355 continue |
| 349 | 356 |
| 350 if '.txt' in test_name: | 357 if '.txt' in test_name: |
| 351 include_path = os.path.join(current_dir, test_name) | 358 include_path = os.path.join(current_dir, test_name) |
| 352 # We only check min-version >= 2.0.0 for the top level list. | 359 # We only check min-version >= 2.0.0 for the top level list. |
| 353 test_paths += WebglConformance._ParseTests( | 360 test_paths += WebglConformance._ParseTests( |
| 354 include_path, version, webgl2_only, min_version_to_compare) | 361 include_path, version, webgl2_only, min_version_to_compare) |
| 355 else: | 362 else: |
| 356 test = os.path.join(current_dir, test_name) | 363 test = os.path.join(current_dir, test_name) |
| 357 if webgl_version > 1: | 364 if webgl_version > 1: |
| 358 test += '?webglVersion=' + str(webgl_version) | 365 test += '?webglVersion=' + str(webgl_version) |
| 359 test_paths.append(test) | 366 test_paths.append(test) |
| 360 | 367 |
| 361 return test_paths | 368 return test_paths |
| OLD | NEW |