Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
oec-hardware
提交
a577e2a1
O
oec-hardware
项目概览
openeuler
/
oec-hardware
通知
4
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
oec-hardware
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
a577e2a1
编写于
7月 24, 2020
作者:
C
cuixucui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
delete tape testcase
上级
b9a81581
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
2 addition
and
121 deletion
+2
-121
README.md
README.md
+2
-6
hwcompatible/compatibility.py
hwcompatible/compatibility.py
+0
-6
tests/tape/Makefile
tests/tape/Makefile
+0
-22
tests/tape/tape.py
tests/tape/tape.py
+0
-87
未找到文件。
README.md
浏览文件 @
a577e2a1
...
...
@@ -335,15 +335,11 @@ openEuler硬件兼容性验证测试框架有如下特点:
使用 nvme-cli 工具对盘进行格式化、读写、查询测试。
13.
**tape**
测试磁带是否正常读写。
14.
**usb**
13.
**usb**
插拔 usb 设备,测试 usb 接口能否正常识别。
1
5
.
**acpi**
1
4
.
**acpi**
利用 acpidump 工具读取数据。
...
...
hwcompatible/compatibility.py
浏览文件 @
a577e2a1
...
...
@@ -266,12 +266,6 @@ class EulerCertification():
if
device
.
get_property
(
"PCI_CLASS"
)
==
"30000"
or
device
.
get_property
(
"PCI_CLASS"
)
==
"38000"
:
sort_devices
[
"video"
]
=
[
device
]
continue
if
device
.
get_property
(
"SUBSYSTEM"
)
==
"tape"
and
"/dev/st"
in
device
.
get_property
(
"DEVNAME"
):
try
:
sort_devices
[
"tape"
].
extend
([
device
])
except
KeyError
:
sort_devices
[
"tape"
]
=
[
device
]
continue
if
(
device
.
get_property
(
"DEVTYPE"
)
==
"disk"
and
not
device
.
get_property
(
"ID_TYPE"
))
or
\
device
.
get_property
(
"ID_TYPE"
)
==
"disk"
:
if
"nvme"
in
device
.
get_property
(
"DEVPATH"
):
...
...
tests/tape/Makefile
已删除
100755 → 0
浏览文件 @
b9a81581
# Copyright (c) 2020 Huawei Technologies Co., Ltd.
# oec-hardware is licensed under the Mulan PSL v2.
# You can use this software according to the terms and conditions of the Mulan PSL v2.
# You may obtain a copy of Mulan PSL v2 at:
# http://license.coscl.org.cn/MulanPSL2
# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
# PURPOSE.
# See the Mulan PSL v2 for more details.
# Create: 2020-04-01
.PHONY
:
install clean
all
:
;
install
:
mkdir
-p
$(DEST)
cp
-a
*
.py
$(DEST)
chmod
a+x
$(DEST)
/
*
.py
clean
:
rm
-rf
$(DEST)
tests/tape/tape.py
已删除
100755 → 0
浏览文件 @
b9a81581
#!/usr/bin/env python
# coding: utf-8
# Copyright (c) 2020 Huawei Technologies Co., Ltd.
# oec-hardware is licensed under the Mulan PSL v2.
# You can use this software according to the terms and conditions of the Mulan PSL v2.
# You may obtain a copy of Mulan PSL v2 at:
# http://license.coscl.org.cn/MulanPSL2
# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
# PURPOSE.
# See the Mulan PSL v2 for more details.
# Create: 2020-04-01
import
argparse
from
hwcompatible.test
import
Test
from
hwcompatible.command
import
Command
,
CertCommandError
class
TapeTest
(
Test
):
"""
Tape test
"""
def
__init__
(
self
):
Test
.
__init__
(
self
)
self
.
args
=
None
self
.
device
=
None
self
.
tapeDevice
=
None
def
setup
(
self
,
args
=
None
):
"""
Initialization before test
:param args:
:return:
"""
self
.
args
=
args
or
argparse
.
Namespace
()
self
.
device
=
getattr
(
args
,
"device"
,
None
)
self
.
tapeDevice
=
self
.
device
.
get_property
(
"DEVNAME"
)
if
self
.
tapeDevice
==
""
:
print
(
"Did not found any Tape Device"
)
else
:
print
(
"Found the Tape Device :
\n
%s"
%
self
.
tapeDevice
)
def
test
(
self
):
"""
test case
:return:
"""
if
not
self
.
tapeDevice
:
return
False
print
(
"Testing tape device %s"
%
self
.
tapeDevice
)
# set default block size to 32k (64 x 512byte = 32k)
bs
=
64
# rewind the tape
try
:
tape_rewind
=
Command
(
"mt -f %s rewind 2>/dev/null"
%
self
.
tapeDevice
).
read
()
print
(
"Rewind tape :
\n
%s"
%
tape_rewind
)
except
CertCommandError
as
exception
:
print
(
exception
)
return
False
# Write data
try
:
tapewritedata
=
Command
(
"tar -Pcb %s -f %s /usr"
%
(
bs
,
self
.
tapeDevice
)).
read
()
if
tapewritedata
==
0
:
print
(
"Write data done. Start comparing ..."
)
# Compare data
comparedata
=
Command
(
"tar -Pdb %s -f %s /usr"
%
(
bs
,
self
.
tapeDevice
)).
read
()
if
comparedata
==
0
:
print
(
"Tape test on device %s passed."
%
self
.
tapeDevice
)
return
True
else
:
print
(
"Error: data comparison fail."
)
return
False
else
:
print
(
"Error: write data fail."
)
return
False
except
CertCommandError
as
exception
:
print
(
exception
)
return
False
if
__name__
==
"__main__"
:
main
=
TapeTest
()
main
.
test
()
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录