1e5c31af7Sopenharmony_ci# -*- coding: utf-8 -*- 2e5c31af7Sopenharmony_ci 3e5c31af7Sopenharmony_ci#------------------------------------------------------------------------- 4e5c31af7Sopenharmony_ci# Khronos OpenGL CTS 5e5c31af7Sopenharmony_ci# ------------------ 6e5c31af7Sopenharmony_ci# 7e5c31af7Sopenharmony_ci# Copyright (c) 2016 The Khronos Group Inc. 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 os 24e5c31af7Sopenharmony_ciimport sys 25e5c31af7Sopenharmony_ciimport shutil 26e5c31af7Sopenharmony_ciimport argparse 27e5c31af7Sopenharmony_ciimport subprocess 28e5c31af7Sopenharmony_ci 29e5c31af7Sopenharmony_cifrom fetch_sources import * 30e5c31af7Sopenharmony_ciscriptPath = os.path.join(os.path.dirname(__file__), "..", "scripts") 31e5c31af7Sopenharmony_cisys.path.insert(0, scriptPath) 32e5c31af7Sopenharmony_ci 33e5c31af7Sopenharmony_cifrom ctsbuild.common import * 34e5c31af7Sopenharmony_ci 35e5c31af7Sopenharmony_ciEXTERNAL_DIR = os.path.realpath(os.path.normpath(os.path.dirname(__file__))) 36e5c31af7Sopenharmony_ciSHA1 = "a83863a61ecaa72a38361c6f0ca6291970d1d240" 37e5c31af7Sopenharmony_ci 38e5c31af7Sopenharmony_ciPACKAGES = [ 39e5c31af7Sopenharmony_ci GitRepo( 40e5c31af7Sopenharmony_ci "https://gitlab.khronos.org/opengl/kc-cts.git", 41e5c31af7Sopenharmony_ci "git@gitlab.khronos.org:opengl/kc-cts.git", 42e5c31af7Sopenharmony_ci SHA1, 43e5c31af7Sopenharmony_ci "kc-cts"), 44e5c31af7Sopenharmony_ci] 45e5c31af7Sopenharmony_ci 46e5c31af7Sopenharmony_ciif __name__ == "__main__": 47e5c31af7Sopenharmony_ci args = parseArgs() 48e5c31af7Sopenharmony_ci 49e5c31af7Sopenharmony_ci for pkg in PACKAGES: 50e5c31af7Sopenharmony_ci if args.clean: 51e5c31af7Sopenharmony_ci pkg.clean() 52e5c31af7Sopenharmony_ci else: 53e5c31af7Sopenharmony_ci pkg.update(args.protocol) 54