176e6818aSopenharmony_ci#!/usr/bin/env python3 276e6818aSopenharmony_ci# coding=utf-8 376e6818aSopenharmony_ci 476e6818aSopenharmony_ci# 576e6818aSopenharmony_ci# Copyright (c) 2022 Huawei Device Co., Ltd. 676e6818aSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 776e6818aSopenharmony_ci# you may not use this file except in compliance with the License. 876e6818aSopenharmony_ci# You may obtain a copy of the License at 976e6818aSopenharmony_ci# 1076e6818aSopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 1176e6818aSopenharmony_ci# 1276e6818aSopenharmony_ci# Unless required by applicable law or agreed to in writing, software 1376e6818aSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 1476e6818aSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1576e6818aSopenharmony_ci# See the License for the specific language governing permissions and 1676e6818aSopenharmony_ci# limitations under the License. 1776e6818aSopenharmony_ci# 1876e6818aSopenharmony_ci 1976e6818aSopenharmony_ciimport os 2076e6818aSopenharmony_ci 2176e6818aSopenharmony_ci 2276e6818aSopenharmony_ciclass DTConstants(): 2376e6818aSopenharmony_ci FAILED = 'failed' 2476e6818aSopenharmony_ci PASSED = 'passed' 2576e6818aSopenharmony_ci 2676e6818aSopenharmony_ci 2776e6818aSopenharmony_ciclass RunSection(object): 2876e6818aSopenharmony_ci SETUP = "SETUP" 2976e6818aSopenharmony_ci TEST = "TEST" 3076e6818aSopenharmony_ci TEARDOWN = "TEARDOWN" 3176e6818aSopenharmony_ci 3276e6818aSopenharmony_ci 3376e6818aSopenharmony_ciclass RunStatus(object): 3476e6818aSopenharmony_ci INITING = "Initing" 3576e6818aSopenharmony_ci RUNNING = "Running" 3676e6818aSopenharmony_ci STOPPED = "Stopped" 3776e6818aSopenharmony_ci FINISHED = "Finished" 3876e6818aSopenharmony_ci 3976e6818aSopenharmony_ci 4076e6818aSopenharmony_ciclass RunResult(object): 4176e6818aSopenharmony_ci PASSED = "Passed" 4276e6818aSopenharmony_ci FAILED = "Failed" 4376e6818aSopenharmony_ci BLOCKED = "Blocked" 4476e6818aSopenharmony_ci NORUN = "NORUN" 4576e6818aSopenharmony_ci 4676e6818aSopenharmony_ci 4776e6818aSopenharmony_ciclass FileAttribute: 4876e6818aSopenharmony_ci TESTCASE_PREFIX = "TC_" 4976e6818aSopenharmony_ci TESTCASE_POSFIX_PY = ".py" 5076e6818aSopenharmony_ci TESTCASE_POSFIX_PYC = ".pyc" 5176e6818aSopenharmony_ci TESTCASE_POSFIX_PYD = ".pyd" 5276e6818aSopenharmony_ci 5376e6818aSopenharmony_ci 5476e6818aSopenharmony_ciclass DeviceConstants: 5576e6818aSopenharmony_ci RECONNECT_TIMES = 3 # 断链,默认重连次数 5676e6818aSopenharmony_ci HOST = os.environ.get('AP_HOST', "127.0.0.1") 5776e6818aSopenharmony_ci PORT = os.environ.get('AP_PORT', 9999) 5876e6818aSopenharmony_ci OH_DEVICETEST_BUNDLE_NAME = "com.ohos.devicetest." 5976e6818aSopenharmony_ci RES_VERSION = "002" 6076e6818aSopenharmony_ci 6176e6818aSopenharmony_ci 6276e6818aSopenharmony_ciclass DeviceTestMode: 6376e6818aSopenharmony_ci MODE = "device_test_mode" 6476e6818aSopenharmony_ci HYPIUM_PERF_TEST = "hypium_perf_test" 65