1e5c31af7Sopenharmony_ci# -*- coding: utf-8 -*- 2e5c31af7Sopenharmony_ci 3e5c31af7Sopenharmony_ci#------------------------------------------------------------------------- 4e5c31af7Sopenharmony_ci# drawElements Quality Program utilities 5e5c31af7Sopenharmony_ci# -------------------------------------- 6e5c31af7Sopenharmony_ci# 7e5c31af7Sopenharmony_ci# Copyright 2015 The Android Open Source Project 8e5c31af7Sopenharmony_ci# 9e5c31af7Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 10e5c31af7Sopenharmony_ci# you may not use this file except in compliance with the License. 11e5c31af7Sopenharmony_ci# You may obtain a copy of the License at 12e5c31af7Sopenharmony_ci# 13e5c31af7Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 14e5c31af7Sopenharmony_ci# 15e5c31af7Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 16e5c31af7Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 17e5c31af7Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18e5c31af7Sopenharmony_ci# See the License for the specific language governing permissions and 19e5c31af7Sopenharmony_ci# limitations under the License. 20e5c31af7Sopenharmony_ci# 21e5c31af7Sopenharmony_ci#------------------------------------------------------------------------- 22e5c31af7Sopenharmony_ci 23e5c31af7Sopenharmony_ciimport sys 24e5c31af7Sopenharmony_ci 25e5c31af7Sopenharmony_ciRENAME_LIST_2011_1_2011_2 = [ 26e5c31af7Sopenharmony_ci ("dEQP-GLES2.functional.shaders.random.basic_expressions.*", "dEQP-GLES2.functional.shaders.random.basic_expression."), 27e5c31af7Sopenharmony_ci ("dEQP-GLES2.functional.shaders.random.scalar_conversions.*", "dEQP-GLES2.functional.shaders.random.scalar_conversion."), 28e5c31af7Sopenharmony_ci ("dEQP-GLES2.functional.fbo.render.color_clears_*", "dEQP-GLES2.functional.fbo.render.color_clear."), 29e5c31af7Sopenharmony_ci ("dEQP-GLES2.functional.fbo.render.intersecting_quads_*", "dEQP-GLES2.functional.fbo.render.depth."), 30e5c31af7Sopenharmony_ci ("dEQP-GLES2.functional.fbo.render.mix_*", "dEQP-GLES2.functional.fbo.render.color.mix_"), 31e5c31af7Sopenharmony_ci ("dEQP-GLES2.functional.fbo.render.blend_*", "dEQP-GLES2.functional.fbo.render.color.blend_"), 32e5c31af7Sopenharmony_ci ("dEQP-GLES2.functional.fbo.render.shared_colorbuffer_clears_*", "dEQP-GLES2.functional.fbo.render.shared_colorbuffer_clear."), 33e5c31af7Sopenharmony_ci ("dEQP-GLES2.functional.fbo.render.shared_colorbuffer_*", "dEQP-GLES2.functional.fbo.render.shared_colorbuffer."), 34e5c31af7Sopenharmony_ci ("dEQP-GLES2.functional.fbo.render.shared_depthbuffer_*", "dEQP-GLES2.functional.fbo.render.shared_depthbuffer."), 35e5c31af7Sopenharmony_ci ("dEQP-GLES2.functional.fbo.render.texsubimage_*", "dEQP-GLES2.functional.fbo.render.texsubimage."), 36e5c31af7Sopenharmony_ci ("dEQP-GLES2.functional.fbo.render.recreate_colorbuffer_*", "dEQP-GLES2.functional.fbo.render.recreate_colorbuffer.no_rebind_"), 37e5c31af7Sopenharmony_ci ("dEQP-GLES2.functional.fbo.render.recreate_depthbuffer_*", "dEQP-GLES2.functional.fbo.render.recreate_depthbuffer.no_rebind_"), 38e5c31af7Sopenharmony_ci ("dEQP-GLES2.functional.fbo.render.resize_*", "dEQP-GLES2.functional.fbo.render.resize.") 39e5c31af7Sopenharmony_ci] 40e5c31af7Sopenharmony_ci 41e5c31af7Sopenharmony_ciRENAME_LIST_2011_2_2011_3 = [ 42e5c31af7Sopenharmony_ci ("dEQP-GLES2.usecases.ui.src_over_linear_1_batched", "dEQP-GLES2.usecases.ui.src_over_linear_batched_1"), 43e5c31af7Sopenharmony_ci ("dEQP-GLES2.usecases.ui.src_over_linear_2_batched", "dEQP-GLES2.usecases.ui.src_over_linear_batched_2"), 44e5c31af7Sopenharmony_ci ("dEQP-GLES2.usecases.ui.src_over_linear_4_batched", "dEQP-GLES2.usecases.ui.src_over_linear_batched_4"), 45e5c31af7Sopenharmony_ci ("dEQP-GLES2.usecases.ui.src_over_nearest_1_batched", "dEQP-GLES2.usecases.ui.src_over_nearest_batched_1"), 46e5c31af7Sopenharmony_ci ("dEQP-GLES2.usecases.ui.src_over_nearest_2_batched", "dEQP-GLES2.usecases.ui.src_over_nearest_batched_2"), 47e5c31af7Sopenharmony_ci ("dEQP-GLES2.usecases.ui.src_over_nearest_4_batched", "dEQP-GLES2.usecases.ui.src_over_nearest_batched_4"), 48e5c31af7Sopenharmony_ci ("dEQP-GLES2.usecases.ui.premultiplied_src_over_linear_1_batched", "dEQP-GLES2.usecases.ui.premultiplied_src_over_linear_batched_1"), 49e5c31af7Sopenharmony_ci ("dEQP-GLES2.usecases.ui.premultiplied_src_over_linear_2_batched", "dEQP-GLES2.usecases.ui.premultiplied_src_over_linear_batched_2"), 50e5c31af7Sopenharmony_ci ("dEQP-GLES2.usecases.ui.premultiplied_src_over_linear_4_batched", "dEQP-GLES2.usecases.ui.premultiplied_src_over_linear_batched_4"), 51e5c31af7Sopenharmony_ci ("dEQP-GLES2.usecases.ui.premultiplied_src_over_nearest_1_batched", "dEQP-GLES2.usecases.ui.premultiplied_src_over_nearest_batched_1"), 52e5c31af7Sopenharmony_ci ("dEQP-GLES2.usecases.ui.premultiplied_src_over_nearest_2_batched", "dEQP-GLES2.usecases.ui.premultiplied_src_over_nearest_batched_2"), 53e5c31af7Sopenharmony_ci ("dEQP-GLES2.usecases.ui.premultiplied_src_over_nearest_4_batched", "dEQP-GLES2.usecases.ui.premultiplied_src_over_nearest_batched_4"), 54e5c31af7Sopenharmony_ci ("dEQP-GLES2.usecases.ui.no_blend_linear_1_batched", "dEQP-GLES2.usecases.ui.no_blend_linear_batched_1"), 55e5c31af7Sopenharmony_ci ("dEQP-GLES2.usecases.ui.no_blend_linear_2_batched", "dEQP-GLES2.usecases.ui.no_blend_linear_batched_2"), 56e5c31af7Sopenharmony_ci ("dEQP-GLES2.usecases.ui.no_blend_linear_4_batched", "dEQP-GLES2.usecases.ui.no_blend_linear_batched_4"), 57e5c31af7Sopenharmony_ci ("dEQP-GLES2.usecases.ui.no_blend_nearest_1_batched", "dEQP-GLES2.usecases.ui.no_blend_nearest_batched_1"), 58e5c31af7Sopenharmony_ci ("dEQP-GLES2.usecases.ui.no_blend_nearest_2_batched", "dEQP-GLES2.usecases.ui.no_blend_nearest_batched_2"), 59e5c31af7Sopenharmony_ci ("dEQP-GLES2.usecases.ui.no_blend_nearest_4_batched", "dEQP-GLES2.usecases.ui.no_blend_nearest_batched_4") 60e5c31af7Sopenharmony_ci] 61e5c31af7Sopenharmony_ci 62e5c31af7Sopenharmony_ciRENAME_LIST_2011_3_2011_4 = [] 63e5c31af7Sopenharmony_ci 64e5c31af7Sopenharmony_ciRENAME_LIST_2011_4_2012_1 = [ 65e5c31af7Sopenharmony_ci ("dEQP-GLES2.functional.vertex_arrays.multiple_attributes.output_types.*", "dEQP-GLES2.functional.vertex_arrays.multiple_attributes.input_types."), 66e5c31af7Sopenharmony_ci] 67e5c31af7Sopenharmony_ci 68e5c31af7Sopenharmony_ciRENAME_LIST_2012_2_2012_3 = [ 69e5c31af7Sopenharmony_ci ("dEQP-GLES2.functional.shaders.operator.geometric.refract.mediump_float_vertex", "dEQP-GLES2.functional.shaders.operator.geometric.refract.mediump_float_float_vertex"), 70e5c31af7Sopenharmony_ci ("dEQP-GLES2.functional.shaders.operator.geometric.refract.mediump_float_fragment", "dEQP-GLES2.functional.shaders.operator.geometric.refract.mediump_float_float_fragment"), 71e5c31af7Sopenharmony_ci ("dEQP-GLES2.functional.shaders.operator.geometric.refract.highp_float_vertex", "dEQP-GLES2.functional.shaders.operator.geometric.refract.highp_float_float_vertex"), 72e5c31af7Sopenharmony_ci ("dEQP-GLES2.functional.shaders.operator.geometric.refract.highp_float_fragment", "dEQP-GLES2.functional.shaders.operator.geometric.refract.highp_float_float_fragment"), 73e5c31af7Sopenharmony_ci ("dEQP-GLES2.functional.shaders.operator.geometric.refract.mediump_vec2_vertex", "dEQP-GLES2.functional.shaders.operator.geometric.refract.mediump_vec2_float_vertex"), 74e5c31af7Sopenharmony_ci ("dEQP-GLES2.functional.shaders.operator.geometric.refract.mediump_vec2_fragment", "dEQP-GLES2.functional.shaders.operator.geometric.refract.mediump_vec2_float_fragment"), 75e5c31af7Sopenharmony_ci ("dEQP-GLES2.functional.shaders.operator.geometric.refract.highp_vec2_vertex", "dEQP-GLES2.functional.shaders.operator.geometric.refract.highp_vec2_float_vertex"), 76e5c31af7Sopenharmony_ci ("dEQP-GLES2.functional.shaders.operator.geometric.refract.highp_vec2_fragment", "dEQP-GLES2.functional.shaders.operator.geometric.refract.highp_vec2_float_fragment"), 77e5c31af7Sopenharmony_ci ("dEQP-GLES2.functional.shaders.operator.geometric.refract.mediump_vec3_vertex", "dEQP-GLES2.functional.shaders.operator.geometric.refract.mediump_vec3_float_vertex"), 78e5c31af7Sopenharmony_ci ("dEQP-GLES2.functional.shaders.operator.geometric.refract.mediump_vec3_fragment", "dEQP-GLES2.functional.shaders.operator.geometric.refract.mediump_vec3_float_fragment"), 79e5c31af7Sopenharmony_ci ("dEQP-GLES2.functional.shaders.operator.geometric.refract.highp_vec3_vertex", "dEQP-GLES2.functional.shaders.operator.geometric.refract.highp_vec3_float_vertex"), 80e5c31af7Sopenharmony_ci ("dEQP-GLES2.functional.shaders.operator.geometric.refract.highp_vec3_fragment", "dEQP-GLES2.functional.shaders.operator.geometric.refract.highp_vec3_float_fragment"), 81e5c31af7Sopenharmony_ci ("dEQP-GLES2.functional.shaders.operator.geometric.refract.mediump_vec4_vertex", "dEQP-GLES2.functional.shaders.operator.geometric.refract.mediump_vec4_float_vertex"), 82e5c31af7Sopenharmony_ci ("dEQP-GLES2.functional.shaders.operator.geometric.refract.mediump_vec4_fragment", "dEQP-GLES2.functional.shaders.operator.geometric.refract.mediump_vec4_float_fragment"), 83e5c31af7Sopenharmony_ci ("dEQP-GLES2.functional.shaders.operator.geometric.refract.highp_vec4_vertex", "dEQP-GLES2.functional.shaders.operator.geometric.refract.highp_vec4_float_vertex"), 84e5c31af7Sopenharmony_ci ("dEQP-GLES2.functional.shaders.operator.geometric.refract.highp_vec4_fragment", "dEQP-GLES2.functional.shaders.operator.geometric.refract.highp_vec4_float_fragment"), 85e5c31af7Sopenharmony_ci ("dEQP-GLES2.functional.negative_api.texture.copyteximage2d_unequal_width_height_cube", "dEQP-GLES2.functional.negative_api.texture.copyteximage2d_inequal_width_height_cube"), 86e5c31af7Sopenharmony_ci ("dEQP-GLES2.functional.negative_api.texture.teximage2d_unequal_width_height_cube", "dEQP-GLES2.functional.negative_api.texture.teximage2d_inequal_width_height_cube"), 87e5c31af7Sopenharmony_ci ("dEQP-GLES2.functional.negative_api.vertex_array.draw_arrays", "dEQP-GLES2.functional.negative_api.vertex_array.draw_arrays_invalid_program"), 88e5c31af7Sopenharmony_ci ("dEQP-GLES2.functional.negative_api.vertex_array.draw_elemens", "dEQP-GLES2.functional.negative_api.vertex_array.draw_elements_invalid_program"), 89e5c31af7Sopenharmony_ci ("dEQP-GLES2.functional.negative_api.shader.attach_shader_invalid_object", "dEQP-GLES2.functional.negative_api.shader.attach_shader"), 90e5c31af7Sopenharmony_ci ("dEQP-GLES2.functional.negative_api.shader.detach_shader_invalid_object", "dEQP-GLES2.functional.negative_api.shader.detach_shader"), 91e5c31af7Sopenharmony_ci ("dEQP-GLES2.usecases.shadow.shadowmap.1sample.1_vertex_lights_no_texture", "dEQP-GLES2.usecases.shadow.shadowmaps.basic_1sample.1_vertex_lights_no_texture"), 92e5c31af7Sopenharmony_ci ("dEQP-GLES2.usecases.shadow.shadowmap.1sample.2_vertex_lights_no_texture", "dEQP-GLES2.usecases.shadow.shadowmaps.basic_1sample.2_vertex_lights_no_texture"), 93e5c31af7Sopenharmony_ci ("dEQP-GLES2.usecases.shadow.shadowmap.1sample.4_vertex_lights_no_texture", "dEQP-GLES2.usecases.shadow.shadowmaps.basic_1sample.4_vertex_lights_no_texture"), 94e5c31af7Sopenharmony_ci ("dEQP-GLES2.usecases.shadow.shadowmap.1sample.1_vertex_lights", "dEQP-GLES2.usecases.shadow.shadowmaps.basic_1sample.1_vertex_lights"), 95e5c31af7Sopenharmony_ci ("dEQP-GLES2.usecases.shadow.shadowmap.1sample.2_vertex_lights", "dEQP-GLES2.usecases.shadow.shadowmaps.basic_1sample.2_vertex_lights"), 96e5c31af7Sopenharmony_ci ("dEQP-GLES2.usecases.shadow.shadowmap.1sample.4_vertex_lights", "dEQP-GLES2.usecases.shadow.shadowmaps.basic_1sample.4_vertex_lights"), 97e5c31af7Sopenharmony_ci ("dEQP-GLES2.usecases.shadow.shadowmap.1sample.1_fragment_lights", "dEQP-GLES2.usecases.shadow.shadowmaps.basic_1sample.1_fragment_lights"), 98e5c31af7Sopenharmony_ci ("dEQP-GLES2.usecases.shadow.shadowmap.1sample.2_fragment_lights", "dEQP-GLES2.usecases.shadow.shadowmaps.basic_1sample.2_fragment_lights"), 99e5c31af7Sopenharmony_ci ("dEQP-GLES2.usecases.shadow.shadowmap.1sample.4_fragment_lights", "dEQP-GLES2.usecases.shadow.shadowmaps.basic_1sample.4_fragment_lights"), 100e5c31af7Sopenharmony_ci ("dEQP-GLES2.usecases.shadow.shadowmap.4sample.1_vertex_lights_no_texture", "dEQP-GLES2.usecases.shadow.shadowmaps.basic_4sample.1_vertex_lights_no_texture"), 101e5c31af7Sopenharmony_ci ("dEQP-GLES2.usecases.shadow.shadowmap.4sample.2_vertex_lights_no_texture", "dEQP-GLES2.usecases.shadow.shadowmaps.basic_4sample.2_vertex_lights_no_texture"), 102e5c31af7Sopenharmony_ci ("dEQP-GLES2.usecases.shadow.shadowmap.4sample.4_vertex_lights_no_texture", "dEQP-GLES2.usecases.shadow.shadowmaps.basic_4sample.4_vertex_lights_no_texture"), 103e5c31af7Sopenharmony_ci ("dEQP-GLES2.usecases.shadow.shadowmap.4sample.1_vertex_lights", "dEQP-GLES2.usecases.shadow.shadowmaps.basic_4sample.1_vertex_lights"), 104e5c31af7Sopenharmony_ci ("dEQP-GLES2.usecases.shadow.shadowmap.4sample.2_vertex_lights", "dEQP-GLES2.usecases.shadow.shadowmaps.basic_4sample.2_vertex_lights"), 105e5c31af7Sopenharmony_ci ("dEQP-GLES2.usecases.shadow.shadowmap.4sample.4_vertex_lights", "dEQP-GLES2.usecases.shadow.shadowmaps.basic_4sample.4_vertex_lights"), 106e5c31af7Sopenharmony_ci ("dEQP-GLES2.usecases.shadow.shadowmap.4sample.1_fragment_lights", "dEQP-GLES2.usecases.shadow.shadowmaps.basic_4sample.1_fragment_lights"), 107e5c31af7Sopenharmony_ci ("dEQP-GLES2.usecases.shadow.shadowmap.4sample.2_fragment_lights", "dEQP-GLES2.usecases.shadow.shadowmaps.basic_4sample.2_fragment_lights"), 108e5c31af7Sopenharmony_ci ("dEQP-GLES2.usecases.shadow.shadowmap.4sample.4_fragment_lights", "dEQP-GLES2.usecases.shadow.shadowmaps.basic_4sample.4_fragment_lights"), 109e5c31af7Sopenharmony_ci ("dEQP-GLES2.usecases.shadow.shadowmap.16sample.1_vertex_lights_no_texture", "dEQP-GLES2.usecases.shadow.shadowmaps.basic_16sample.1_vertex_lights_no_texture"), 110e5c31af7Sopenharmony_ci ("dEQP-GLES2.usecases.shadow.shadowmap.16sample.2_vertex_lights_no_texture", "dEQP-GLES2.usecases.shadow.shadowmaps.basic_16sample.2_vertex_lights_no_texture"), 111e5c31af7Sopenharmony_ci ("dEQP-GLES2.usecases.shadow.shadowmap.16sample.4_vertex_lights_no_texture", "dEQP-GLES2.usecases.shadow.shadowmaps.basic_16sample.4_vertex_lights_no_texture"), 112e5c31af7Sopenharmony_ci ("dEQP-GLES2.usecases.shadow.shadowmap.16sample.1_vertex_lights", "dEQP-GLES2.usecases.shadow.shadowmaps.basic_16sample.1_vertex_lights"), 113e5c31af7Sopenharmony_ci ("dEQP-GLES2.usecases.shadow.shadowmap.16sample.2_vertex_lights", "dEQP-GLES2.usecases.shadow.shadowmaps.basic_16sample.2_vertex_lights"), 114e5c31af7Sopenharmony_ci ("dEQP-GLES2.usecases.shadow.shadowmap.16sample.4_vertex_lights", "dEQP-GLES2.usecases.shadow.shadowmaps.basic_16sample.4_vertex_lights"), 115e5c31af7Sopenharmony_ci ("dEQP-GLES2.usecases.shadow.shadowmap.16sample.1_fragment_lights", "dEQP-GLES2.usecases.shadow.shadowmaps.basic_16sample.1_fragment_lights"), 116e5c31af7Sopenharmony_ci ("dEQP-GLES2.usecases.shadow.shadowmap.16sample.2_fragment_lights", "dEQP-GLES2.usecases.shadow.shadowmaps.basic_16sample.2_fragment_lights"), 117e5c31af7Sopenharmony_ci ("dEQP-GLES2.usecases.shadow.shadowmap.16sample.4_fragment_lights", "dEQP-GLES2.usecases.shadow.shadowmaps.basic_16sample.4_fragment_lights") 118e5c31af7Sopenharmony_ci] 119e5c31af7Sopenharmony_ci 120e5c31af7Sopenharmony_ciRENAME_LIST_2012_3_2012_4 = [ 121e5c31af7Sopenharmony_ci ("dEQP-GLES2.functional.depth.*", "dEQP-GLES2.functional.fragment_ops.depth."), 122e5c31af7Sopenharmony_ci ("dEQP-GLES2.functional.stencil.*", "dEQP-GLES2.functional.fragment_ops.stencil.") 123e5c31af7Sopenharmony_ci] 124e5c31af7Sopenharmony_ci 125e5c31af7Sopenharmony_cidef readCaseList (filename): 126e5c31af7Sopenharmony_ci f = open(filename, 'r') 127e5c31af7Sopenharmony_ci cases = [] 128e5c31af7Sopenharmony_ci for line in f: 129e5c31af7Sopenharmony_ci if line[0:5] == "TEST:": 130e5c31af7Sopenharmony_ci cases.append(line[6:].strip()) 131e5c31af7Sopenharmony_ci f.close() 132e5c31af7Sopenharmony_ci return cases 133e5c31af7Sopenharmony_ci 134e5c31af7Sopenharmony_cidef isWildcardPattern (pattern): 135e5c31af7Sopenharmony_ci return pattern[-1:] == '*' 136e5c31af7Sopenharmony_ci 137e5c31af7Sopenharmony_ci# returns (cases, renames) 138e5c31af7Sopenharmony_cidef renameCases (cases, rename): 139e5c31af7Sopenharmony_ci renamedCases = [] 140e5c31af7Sopenharmony_ci renamedSet = set() 141e5c31af7Sopenharmony_ci renames = [] 142e5c31af7Sopenharmony_ci for case in cases: 143e5c31af7Sopenharmony_ci renamed = None 144e5c31af7Sopenharmony_ci 145e5c31af7Sopenharmony_ci for src, dst in rename: 146e5c31af7Sopenharmony_ci if isWildcardPattern(src) and case[:len(src)-1] == src[:-1]: 147e5c31af7Sopenharmony_ci renamed = dst + case[len(src)-1:] 148e5c31af7Sopenharmony_ci break 149e5c31af7Sopenharmony_ci elif case == src: 150e5c31af7Sopenharmony_ci renamed = dst 151e5c31af7Sopenharmony_ci break 152e5c31af7Sopenharmony_ci 153e5c31af7Sopenharmony_ci if renamed != None: 154e5c31af7Sopenharmony_ci renames.append((case, renamed)) 155e5c31af7Sopenharmony_ci case = renamed 156e5c31af7Sopenharmony_ci 157e5c31af7Sopenharmony_ci # It is possible that some later case is renamed to case already seen in the list 158e5c31af7Sopenharmony_ci assert not case in renamedSet or renamed != None 159e5c31af7Sopenharmony_ci if case not in renamedSet: 160e5c31af7Sopenharmony_ci renamedCases.append(case) 161e5c31af7Sopenharmony_ci renamedSet.add(case) 162e5c31af7Sopenharmony_ci 163e5c31af7Sopenharmony_ci return (renamedCases, renames) 164e5c31af7Sopenharmony_ci 165e5c31af7Sopenharmony_ci# returns (added, removed) lists 166e5c31af7Sopenharmony_cidef diffCaseLists (old, new): 167e5c31af7Sopenharmony_ci added = [] 168e5c31af7Sopenharmony_ci removed = [] 169e5c31af7Sopenharmony_ci 170e5c31af7Sopenharmony_ci oldSet = set(old) 171e5c31af7Sopenharmony_ci newSet = set(new) 172e5c31af7Sopenharmony_ci 173e5c31af7Sopenharmony_ci # build added list 174e5c31af7Sopenharmony_ci for case in new: 175e5c31af7Sopenharmony_ci if not case in oldSet: 176e5c31af7Sopenharmony_ci added.append(case) 177e5c31af7Sopenharmony_ci 178e5c31af7Sopenharmony_ci # build removed set 179e5c31af7Sopenharmony_ci for case in old: 180e5c31af7Sopenharmony_ci if not case in newSet: 181e5c31af7Sopenharmony_ci removed.append(case) 182e5c31af7Sopenharmony_ci 183e5c31af7Sopenharmony_ci return (added, removed) 184e5c31af7Sopenharmony_ci 185e5c31af7Sopenharmony_ciif __name__ == "__main__": 186e5c31af7Sopenharmony_ci if len(sys.argv) != 3: 187e5c31af7Sopenharmony_ci print("%s [old caselist] [new caselist]" % sys.argv[0]) 188e5c31af7Sopenharmony_ci sys.exit(-1) 189e5c31af7Sopenharmony_ci 190e5c31af7Sopenharmony_ci oldCases = readCaseList(sys.argv[1]) 191e5c31af7Sopenharmony_ci newCases = readCaseList(sys.argv[2]) 192e5c31af7Sopenharmony_ci rename = RENAME_LIST_2012_3_2012_4 193e5c31af7Sopenharmony_ci 194e5c31af7Sopenharmony_ci renamedCases, renameList = renameCases(oldCases, rename) 195e5c31af7Sopenharmony_ci added, removed = diffCaseLists(renamedCases, newCases) 196e5c31af7Sopenharmony_ci 197e5c31af7Sopenharmony_ci# for src, dst in rename: 198e5c31af7Sopenharmony_ci# print("RENAME: %s -> %s" % (src, dst)) 199e5c31af7Sopenharmony_ci 200e5c31af7Sopenharmony_ci for case in added: 201e5c31af7Sopenharmony_ci print("ADD: %s" % case) 202e5c31af7Sopenharmony_ci 203e5c31af7Sopenharmony_ci for src, dst in renameList: 204e5c31af7Sopenharmony_ci print("RENAME: %s -> %s" % (src, dst)) 205e5c31af7Sopenharmony_ci 206e5c31af7Sopenharmony_ci for case in removed: 207e5c31af7Sopenharmony_ci print("REMOVE: %s" % case) 208