13f085823Sopenharmony_ci#!/usr/bin/python
23f085823Sopenharmony_ci#
33f085823Sopenharmony_ci# Copyright (c) 2022 Huawei Device Co., Ltd.
43f085823Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
53f085823Sopenharmony_ci# you may not use this file except in compliance with the License.
63f085823Sopenharmony_ci# You may obtain a copy of the License at
73f085823Sopenharmony_ci#
83f085823Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
93f085823Sopenharmony_ci#
103f085823Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
113f085823Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
123f085823Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
133f085823Sopenharmony_ci# See the License for the specific language governing permissions and
143f085823Sopenharmony_ci# limitations under the License.
153f085823Sopenharmony_ci#
163f085823Sopenharmony_ci
173f085823Sopenharmony_ciimport os
183f085823Sopenharmony_ciimport sys
193f085823Sopenharmony_ci
203f085823Sopenharmony_ciprint(os.getcwd())
213f085823Sopenharmony_ci
223f085823Sopenharmony_ciif "DEVTESTDIR" in os.environ:
233f085823Sopenharmony_ci    homedir = os.environ["DEVTESTDIR"]
243f085823Sopenharmony_ci    os.chdir(homedir)
253f085823Sopenharmony_ci    print(os.getcwd())
263f085823Sopenharmony_ci    cmd = "./start.sh"
273f085823Sopenharmony_ci    for index in range (1, len(sys.argv)):
283f085823Sopenharmony_ci        cmd += " " + sys.argv[index]
293f085823Sopenharmony_ci    print(cmd)
303f085823Sopenharmony_ci    os.system(cmd)
313f085823Sopenharmony_cielse:
323f085823Sopenharmony_ci    print("no DEVTESTDIR!!")