Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
oec-hardware
提交
bebdbba4
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 搜索 >>
提交
bebdbba4
编写于
7月 01, 2020
作者:
C
cuixucui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Modify static method
上级
050833aa
变更
16
隐藏空白更改
内联
并排
Showing
16 changed file
with
31 addition
and
60 deletion
+31
-60
hwcompatible/commandUI.py
hwcompatible/commandUI.py
+1
-2
hwcompatible/compatibility.py
hwcompatible/compatibility.py
+1
-2
hwcompatible/device.py
hwcompatible/device.py
+2
-2
hwcompatible/job.py
hwcompatible/job.py
+1
-2
tests/acpi/acpi.py
tests/acpi/acpi.py
+1
-2
tests/cdrom/cdrom.py
tests/cdrom/cdrom.py
+2
-4
tests/clock/clock.py
tests/clock/clock.py
+1
-2
tests/cpufreq/cpufreq.py
tests/cpufreq/cpufreq.py
+5
-10
tests/disk/disk.py
tests/disk/disk.py
+1
-2
tests/ipmi/ipmi.py
tests/ipmi/ipmi.py
+2
-4
tests/memory/memory.py
tests/memory/memory.py
+3
-6
tests/network/network.py
tests/network/network.py
+3
-6
tests/nvme/nvme.py
tests/nvme/nvme.py
+1
-2
tests/system/system.py
tests/system/system.py
+5
-10
tests/usb/usb.py
tests/usb/usb.py
+1
-2
tests/watchdog/watchdog.py
tests/watchdog/watchdog.py
+1
-2
未找到文件。
hwcompatible/commandUI.py
浏览文件 @
bebdbba4
...
...
@@ -98,8 +98,7 @@ class CommandUI(object):
return
False
sys
.
stdout
.
write
(
"Please reply %s or %s.
\n
"
%
(
YES
,
NO
))
@
staticmethod
def
prompt_edit
(
label
,
value
,
choices
=
None
):
def
prompt_edit
(
self
,
label
,
value
,
choices
=
None
):
"""
prompt choice edit
:param label:
...
...
hwcompatible/compatibility.py
浏览文件 @
bebdbba4
...
...
@@ -461,8 +461,7 @@ class EulerCertification(object):
self
.
test_factory
.
sort
(
key
=
lambda
k
:
k
[
"name"
])
FactoryDocument
(
CertEnv
.
factoryfile
,
self
.
test_factory
).
save
()
@
staticmethod
def
search_factory
(
obj_test
,
test_factory
):
def
search_factory
(
self
,
obj_test
,
test_factory
):
"""
Determine whether test exists by searching test_factory
:param obj_test:
...
...
hwcompatible/device.py
浏览文件 @
bebdbba4
...
...
@@ -63,8 +63,8 @@ class CertDevice(object):
else
:
prop
=
line
.
split
(
":"
,
1
)
if
len
(
prop
)
==
2
:
tp
=
prop
[
0
].
strip
(
r
'\ \'\n'
)
attribute
=
prop
[
1
].
strip
(
r
'\ \'\n'
)
tp
=
prop
[
0
].
strip
(
'\
\'\n
'
)
attribute
=
prop
[
1
].
strip
(
'\
\'\n
'
)
if
tp
==
"E"
:
keyvalue
=
attribute
.
split
(
"="
,
1
)
if
len
(
keyvalue
)
==
2
:
...
...
hwcompatible/job.py
浏览文件 @
bebdbba4
...
...
@@ -51,8 +51,7 @@ class Job(object):
for
parameter_name
,
parameter_value
in
self
.
args
.
test_parameters
:
self
.
test_parameters
[
parameter_name
]
=
parameter_value
@
staticmethod
def
discover
(
testname
,
subtests_filter
=
None
):
def
discover
(
self
,
testname
,
subtests_filter
=
None
):
"""
discover test
:param testname:
...
...
tests/acpi/acpi.py
浏览文件 @
bebdbba4
...
...
@@ -24,8 +24,7 @@ class AcpiTest(Test):
Test
.
__init__
(
self
)
self
.
requirements
=
[
"acpica-tools"
]
@
staticmethod
def
test
():
def
test
(
self
):
try
:
Command
(
"acpidump"
).
echo
()
return
True
...
...
tests/cdrom/cdrom.py
浏览文件 @
bebdbba4
...
...
@@ -77,8 +77,7 @@ class CDRomTest(Test):
return
False
return
True
@
staticmethod
def
get_type
(
device
):
def
get_type
(
self
,
device
):
"""
Get the type of CDROM
:param device:
...
...
@@ -234,8 +233,7 @@ class CDRomTest(Test):
print
(
e
)
return
False
@
staticmethod
def
cmp_tree
(
dir1
,
dir2
):
def
cmp_tree
(
self
,
dir1
,
dir2
):
"""
Compare the differences between the two directories
:param dir1:
...
...
tests/clock/clock.py
浏览文件 @
bebdbba4
...
...
@@ -23,8 +23,7 @@ class ClockTest(Test):
"""
Clock Test
"""
@
staticmethod
def
test
():
def
test
(
self
):
"""
Clock test case
:return:
...
...
tests/cpufreq/cpufreq.py
浏览文件 @
bebdbba4
...
...
@@ -63,8 +63,7 @@ class CPU(object):
return
True
@
staticmethod
def
set_freq
(
freq
,
cpu
=
'all'
):
def
set_freq
(
self
,
freq
,
cpu
=
'all'
):
"""
Set CPU frequency
:param freq:
...
...
@@ -79,8 +78,7 @@ class CPU(object):
print
(
e
)
return
False
@
staticmethod
def
get_freq
(
cpu
):
def
get_freq
(
self
,
cpu
):
"""
Get CPU frequency
:param cpu:
...
...
@@ -93,8 +91,7 @@ class CPU(object):
print
(
e
)
return
False
@
staticmethod
def
set_governor
(
governor
,
cpu
=
'all'
):
def
set_governor
(
self
,
governor
,
cpu
=
'all'
):
"""
Set the frequency governor mode of CPU
:param governor:
...
...
@@ -109,8 +106,7 @@ class CPU(object):
print
(
e
)
return
False
@
staticmethod
def
get_governor
(
cpu
):
def
get_governor
(
self
,
cpu
):
"""
Get cpu governor
:param cpu:
...
...
@@ -123,8 +119,7 @@ class CPU(object):
print
(
e
)
return
False
@
staticmethod
def
find_path
(
parent_dir
,
target_name
):
def
find_path
(
self
,
parent_dir
,
target_name
):
"""
Find the target path from the specified directory
:param parent_dir:
...
...
tests/disk/disk.py
浏览文件 @
bebdbba4
...
...
@@ -207,8 +207,7 @@ class DiskTest(Test):
print
(
"#############"
)
return
return_code
@
staticmethod
def
do_fio
(
filepath
,
size
,
option
):
def
do_fio
(
self
,
filepath
,
size
,
option
):
if
os
.
path
.
isdir
(
filepath
):
file_opt
=
"-directory=%s"
%
filepath
else
:
...
...
tests/ipmi/ipmi.py
浏览文件 @
bebdbba4
...
...
@@ -24,8 +24,7 @@ class IpmiTest(Test):
Test
.
__init__
(
self
)
self
.
requirements
=
[
"OpenIPMI"
,
"ipmitool"
]
@
staticmethod
def
start_ipmi
():
def
start_ipmi
(
self
):
"""
Start IPMI test
:return:
...
...
@@ -38,8 +37,7 @@ class IpmiTest(Test):
return
False
return
True
@
staticmethod
def
ipmitool
():
def
ipmitool
(
self
):
"""
Testing with iptool tools
:return:
...
...
tests/memory/memory.py
浏览文件 @
bebdbba4
...
...
@@ -186,8 +186,7 @@ class MemoryTest(Test):
return
False
return
True
@
staticmethod
def
hot_plug_verify
():
def
hot_plug_verify
(
self
):
"""
Verify hot plug
:return:
...
...
@@ -232,8 +231,7 @@ class MemoryTest(Test):
if
total_mem_3
!=
total_mem_1
:
return
False
@
staticmethod
def
online_memory
(
memory_path
):
def
online_memory
(
self
,
memory_path
):
"""
Set memory online
:param memory_path:
...
...
@@ -247,8 +245,7 @@ class MemoryTest(Test):
print
(
"Error: fail to online %s."
%
memory_path
)
return
False
@
staticmethod
def
offline_memory
(
memory_path
):
def
offline_memory
(
self
,
memory_path
):
"""
Set memory offline
:param memory_path:
...
...
tests/network/network.py
浏览文件 @
bebdbba4
...
...
@@ -50,8 +50,7 @@ class NetworkTest(Test):
self
.
target_bandwidth_percent
=
0.8
self
.
testfile
=
'testfile'
@
staticmethod
def
ifdown
(
interface
):
def
ifdown
(
self
,
interface
):
"""
Judge whether the specified interface is closed successfully
:param interface:
...
...
@@ -64,8 +63,7 @@ class NetworkTest(Test):
time
.
sleep
(
1
)
return
False
@
staticmethod
def
ifup
(
interface
):
def
ifup
(
self
,
interface
):
"""
Judge whether the specified interface is enabled successfully
:param interface:
...
...
@@ -78,8 +76,7 @@ class NetworkTest(Test):
return
True
return
False
@
staticmethod
def
get_other_interfaces
():
def
get_other_interfaces
(
self
):
"""
Get other interfaces
:return:
...
...
tests/nvme/nvme.py
浏览文件 @
bebdbba4
...
...
@@ -86,8 +86,7 @@ class NvmeTest(Test):
print
(
e
)
return
False
@
staticmethod
def
in_use
(
disk
):
def
in_use
(
self
,
disk
):
"""
Determine whether the swapon is in use
:param disk:
...
...
tests/system/system.py
浏览文件 @
bebdbba4
...
...
@@ -68,8 +68,7 @@ class SystemTest(Test):
return
return_code
@
staticmethod
def
check_certrpm
():
def
check_certrpm
(
self
):
"""
Check installed cert package
:return:
...
...
@@ -168,8 +167,7 @@ class SystemTest(Test):
return
return_code
@
staticmethod
def
get_modules
(
sign
):
def
get_modules
(
self
,
sign
):
"""
Get the module with signs character
:param sign:
...
...
@@ -238,8 +236,7 @@ class SystemTest(Test):
print
(
""
)
return
True
@
staticmethod
def
read_abi_whitelist
(
whitelist
):
def
read_abi_whitelist
(
self
,
whitelist
):
"""
Read abi whitelist
:param whitelist:
...
...
@@ -296,8 +293,7 @@ class SystemTest(Test):
nm
.
close
()
return
self
.
readSymbols
(
symbols
)
@
staticmethod
def
get_modulefile
(
module
):
def
get_modulefile
(
self
,
module
):
"""
Get module file
:param module:
...
...
@@ -312,8 +308,7 @@ class SystemTest(Test):
print
(
"Error: could no find module file for %s:"
%
module
)
return
None
@
staticmethod
def
check_selinux
():
def
check_selinux
(
self
):
"""
check selinux
:return:
...
...
tests/usb/usb.py
浏览文件 @
bebdbba4
...
...
@@ -97,8 +97,7 @@ class UsbTest(Test):
if
self
.
ui
.
prompt_confirm
(
"All usb sockets have been tested?"
):
return
True
@
staticmethod
def
get_usb
():
def
get_usb
(
self
):
"""
Get usb
:return:
...
...
tests/watchdog/watchdog.py
浏览文件 @
bebdbba4
...
...
@@ -65,8 +65,7 @@ class WatchDogTest(Test):
print
(
""
)
return
False
@
staticmethod
def
startup
():
def
startup
(
self
):
"""
Initialization before test
:return:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录