Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Test Xdevice
提交
3f3bd94d
T
Test Xdevice
项目概览
OpenHarmony
/
Test Xdevice
大约 1 年 前同步成功
通知
6
Star
23
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Test Xdevice
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3f3bd94d
编写于
3月 15, 2021
作者:
H
hwb0703
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
delete debug code for test xdevice
上级
c2c469f6
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
1 addition
and
98 deletion
+1
-98
adapter/LICENSE
adapter/LICENSE
+0
-24
adapter/xdevice_adapter/__init__.py
adapter/xdevice_adapter/__init__.py
+0
-17
adapter/xdevice_adapter/constants.py
adapter/xdevice_adapter/constants.py
+0
-44
setup.py
setup.py
+0
-1
src/xdevice/_core/config/config_manager.py
src/xdevice/_core/config/config_manager.py
+1
-3
src/xdevice/_core/executor/source.py
src/xdevice/_core/executor/source.py
+0
-5
src/xdevice/variables.py
src/xdevice/variables.py
+0
-4
未找到文件。
adapter/LICENSE
已删除
100755 → 0
浏览文件 @
c2c469f6
Copyright (c) 2021 Huawei Device Co., Ltd.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
***************************************************************
Copyright (C) 2011 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
\ No newline at end of file
adapter/xdevice_adapter/__init__.py
已删除
100755 → 0
浏览文件 @
c2c469f6
#!/usr/bin/env python3
# coding=utf-8
#
# Copyright (c) 2021 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
adapter/xdevice_adapter/constants.py
已删除
100755 → 0
浏览文件 @
c2c469f6
#!/usr/bin/env python3
# coding=utf-8
#
# Copyright (c) 2021 Huawei Device Co., Ltd.
# Copyright (c) 2013 The Android Open Source Project
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
from
dataclasses
import
dataclass
__all__
=
[
"UsbConst"
,
"AppConst"
]
@
dataclass
class
UsbConst
:
connector
=
"adb"
connector_type
=
"usb-adb"
push
=
"adb push"
pull
=
"adb pull"
shell
=
"adb shell"
server_port
=
"ANDROID_ADB_SERVER_PORT"
kill_server
=
"adb kill-server"
start_server
=
"adb start-server"
reboot
=
"adb reboot"
@
dataclass
class
AppConst
:
entry_app
=
"Entry.apk"
app_ext
=
".apk"
app_name
=
"APK"
wifi_app
=
"xDeviceService-wifi.apk"
setup.py
浏览文件 @
3f3bd94d
...
...
@@ -36,7 +36,6 @@ def main():
'xdevice._core.executor'
,
'xdevice._core.report'
,
'xdevice._core.testkit'
,
'adapter.xdevice_adapter'
,
],
package_data
=
{
'xdevice._core'
:
[
...
...
src/xdevice/_core/config/config_manager.py
浏览文件 @
3f3bd94d
...
...
@@ -24,7 +24,6 @@ from _core.exception import ParamError
from
_core.logger
import
platform_logger
from
_core.utils
import
get_local_ip
from
xdevice_adapter.constants
import
UsbConst
__all__
=
[
"UserConfigManager"
]
LOG
=
platform_logger
(
"ConfigManager"
)
...
...
@@ -194,8 +193,7 @@ class UserConfigManager(object):
def
get_device
(
self
,
target_name
):
for
node
in
self
.
config_content
.
findall
(
target_name
):
data_dic
=
{}
if
node
.
attrib
[
"type"
]
!=
"usb-hdc"
and
\
node
.
attrib
[
"type"
]
!=
UsbConst
.
connector_type
:
if
node
.
attrib
[
"type"
]
!=
"usb-hdc"
:
continue
data_dic
[
"usb_type"
]
=
node
.
attrib
[
"type"
]
for
sub
in
node
:
...
...
src/xdevice/_core/executor/source.py
浏览文件 @
3f3bd94d
...
...
@@ -28,7 +28,6 @@ from _core.utils import get_filename_extension
from
_core.utils
import
is_config_str
from
_core.utils
import
unique_id
from
xdevice_adapter.constants
import
AppConst
__all__
=
[
"TestSetSource"
,
"TestSource"
,
"find_test_descriptors"
,
"find_testdict_descriptors"
]
...
...
@@ -39,14 +38,12 @@ TestSource = namedtuple('TestSource', 'source_file source_string config_file '
TEST_TYPE_DICT
=
{
"DEX"
:
DeviceTestType
.
dex_test
,
"HAP"
:
DeviceTestType
.
hap_test
,
AppConst
.
app_name
:
DeviceTestType
.
hap_test
,
"PYT"
:
HostDrivenTestType
.
device_test
,
"JST"
:
DeviceTestType
.
jsunit_test
,
"CXX"
:
DeviceTestType
.
cpp_test
,
"BIN"
:
DeviceTestType
.
lite_cpp_test
}
EXT_TYPE_DICT
=
{
".dex"
:
DeviceTestType
.
dex_test
,
".hap"
:
DeviceTestType
.
hap_test
,
AppConst
.
app_ext
:
DeviceTestType
.
hap_test
,
".py"
:
HostDrivenTestType
.
device_test
,
".js"
:
DeviceTestType
.
jsunit_test
,
".bin"
:
DeviceTestType
.
lite_cpp_test
,
...
...
@@ -386,8 +383,6 @@ def _get_test_type(config_file, test_driver, ext):
if
ext
in
[
".py"
,
".js"
,
".dex"
,
".hap"
,
".bin"
]
\
and
ext
in
EXT_TYPE_DICT
.
keys
():
test_type
=
EXT_TYPE_DICT
[
ext
]
elif
ext
in
[
AppConst
.
app_ext
]
and
ext
in
EXT_TYPE_DICT
.
keys
():
test_type
=
DeviceTestType
.
hap_test
else
:
test_type
=
DeviceTestType
.
cpp_test
return
test_type
...
...
src/xdevice/variables.py
浏览文件 @
3f3bd94d
...
...
@@ -23,16 +23,12 @@ from dataclasses import dataclass
__all__
=
[
"Variables"
]
SRC_DIR
=
os
.
path
.
abspath
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
__file__
)))
SRC_ADAPTER_DIR
=
os
.
path
.
abspath
(
os
.
path
.
join
(
SRC_DIR
,
"adapter"
))
MODULES_DIR
=
os
.
path
.
abspath
(
os
.
path
.
dirname
(
__file__
))
TOP_DIR
=
os
.
path
.
abspath
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
__file__
))))
TOP_ADAPTER_DIR
=
os
.
path
.
abspath
(
os
.
path
.
join
(
TOP_DIR
,
"adapter"
))
sys
.
path
.
insert
(
0
,
SRC_DIR
)
sys
.
path
.
insert
(
1
,
MODULES_DIR
)
sys
.
path
.
insert
(
2
,
TOP_DIR
)
sys
.
path
.
insert
(
3
,
SRC_ADAPTER_DIR
)
sys
.
path
.
insert
(
4
,
TOP_ADAPTER_DIR
)
@
dataclass
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录