Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Applications Sample Wifi Iot
提交
35d31454
A
Applications Sample Wifi Iot
项目概览
OpenHarmony
/
Applications Sample Wifi Iot
大约 1 年 前同步成功
通知
3
Star
24
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
Applications Sample Wifi Iot
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
35d31454
编写于
5月 30, 2022
作者:
O
openharmony_ci
提交者:
Gitee
5月 30, 2022
浏览文件
操作
浏览文件
下载
差异文件
!81 冒烟测试解锁问题修复
Merge pull request !81 from lnlan/master_18
上级
51ce2520
35f87b1c
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
10 addition
and
13 deletion
+10
-13
screenshot/resource/capturescreentest.py
screenshot/resource/capturescreentest.py
+10
-13
未找到文件。
screenshot/resource/capturescreentest.py
浏览文件 @
35d31454
...
...
@@ -167,21 +167,23 @@ if __name__ == "__main__":
EnterShellCmd
(
"/data/screen_test/printscreen -f /data/screen_test/launcher_{}.png"
.
format
(
args
.
device_num
),
1
)
GetFileFromDev
(
"/data/screen_test/launcher_{}.pngraw"
.
format
(
args
.
device_num
),
args
.
save_path
)
GetFileFromDev
(
"/data/screen_test/launcher_{}.png"
.
format
(
args
.
device_num
),
args
.
save_path
)
cmp_launcher
=
"cmp -l /data/screen_test/launcher
.pngraw /data/screen_test/train_set/launcher.pngraw | wc -l"
cmp_launcher
=
"cmp -l /data/screen_test/launcher
_{}.pngraw /data/screen_test/train_set/launcher.pngraw | wc -l"
.
format
(
args
.
device_num
)
p
=
EnterShellCmd
(
cmp_launcher
,
1
)
num
=
re
.
findall
(
r
'[-+]?\d+'
,
p
)
PrintToLog
(
num
)
if
type
(
num
)
==
list
and
len
(
num
)
>
0
and
int
(
num
[
0
])
<
443200
:
if
type
(
num
)
==
list
and
len
(
num
)
>
0
and
int
(
num
[
0
])
<
443200
and
p
.
find
(
'No such file or directory'
,
0
,
len
(
p
))
==
-
1
:
PrintToLog
(
"remove lock is ok!
\n\n
"
)
break
elif
rebootcnt
>=
1
:
PrintToLog
(
"remove lock failed, reboot and try!!!
\n\n
"
)
os
.
system
(
"hdc_std -t {} shell reboot"
.
format
(
args
.
device_num
)
)
EnterShellCmd
(
"reboot"
)
for
i
in
range
(
5
):
EnterCmd
(
"hdc_std list targets"
,
10
)
else
:
PrintToLog
(
"remove lock failed
\n\n
"
)
break
PrintToLog
(
"ERROR: remove lock failed
\n\n
"
)
PrintToLog
(
"SmokeTest find some fatal problems!"
)
PrintToLog
(
"End of check, test failed!"
)
sys
.
exit
(
99
)
PrintToLog
(
"
\n\n
########## First check key processes start ##############"
)
lose_process
=
[]
...
...
@@ -284,16 +286,11 @@ if __name__ == "__main__":
else
:
tolerance
=
global_pos
[
'cmp_cmd-level'
][
1
]
p
=
EnterShellCmd
(
new_cmp_cmd
,
single_action
[
0
])
no_such
=
re
.
findall
(
r
'No such file or directory'
,
p
)
PrintToLog
(
no_such
)
if
type
(
no_such
)
==
list
and
len
(
no_such
)
>
0
and
no_such
[
0
]
==
'No such file or directory'
:
PrintToLog
(
"ERROR: {} screenshot failed!
\n\n
"
.
format
(
raw_pic_name
))
PrintToLog
(
"SmokeTest find some key problems!"
)
PrintToLog
(
"End of check, test failed!"
)
sys
.
exit
(
98
)
#no_such = re.findall(r'No such file or directory', p)
#PrintToLog(no_such)
num
=
re
.
findall
(
r
'[-+]?\d+'
,
p
)
PrintToLog
(
num
)
if
type
(
num
)
==
list
and
len
(
num
)
>
0
and
int
(
num
[
0
])
<
tolerance
:
if
type
(
num
)
==
list
and
len
(
num
)
>
0
and
int
(
num
[
0
])
<
tolerance
and
p
.
find
(
'No such file or directory'
,
0
,
len
(
p
))
==
-
1
:
if
testok
==
0
:
testok
=
1
PrintToLog
(
"{} screenshot check is ok!
\n\n
"
.
format
(
raw_pic_name
))
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录