Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
oec-hardware
提交
d4afcbc5
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 搜索 >>
提交
d4afcbc5
编写于
6月 19, 2020
作者:
C
cuixucui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
解决id参数获取不到问题
上级
8fc90ba8
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
15 addition
and
13 deletion
+15
-13
hwcompatible/command.py
hwcompatible/command.py
+1
-1
hwcompatible/compatibility.py
hwcompatible/compatibility.py
+3
-2
server/server.py
server/server.py
+6
-6
tests/memory/memory.py
tests/memory/memory.py
+1
-0
tests/system/system.py
tests/system/system.py
+4
-4
未找到文件。
hwcompatible/command.py
浏览文件 @
d4afcbc5
...
...
@@ -124,7 +124,7 @@ class Command:
if
self
.
pipe
:
return
self
.
pipe
.
poll
()
def
_get_str
(
self
,
regex
=
None
,
regex_group
=
None
,
single_line
=
True
,
return_list
=
False
,
ignore_errors
=
False
):
def
_get_str
(
self
,
regex
=
None
,
regex_group
=
None
,
single_line
=
True
,
return_list
=
False
):
self
.
regex
=
regex
self
.
single_line
=
single_line
self
.
regex_group
=
regex_group
...
...
hwcompatible/compatibility.py
浏览文件 @
d4afcbc5
...
...
@@ -146,6 +146,7 @@ class EulerCertification():
def
submit
(
self
):
packages
=
list
()
pattern
=
re
.
compile
(
"^oech-[0-9]{14}-[0-9a-zA-Z]{10}.tar$"
)
files
=
[]
for
(
root
,
dirs
,
files
)
in
os
.
walk
(
CertEnv
.
datadirectory
):
break
packages
.
extend
(
filter
(
pattern
.
search
,
files
))
...
...
@@ -268,8 +269,8 @@ class EulerCertification():
if
device
.
get_property
(
"ID_CDROM"
)
==
"1"
:
types
=
[
"DVD_RW"
,
"DVD_PLUS_RW"
,
"DVD_R"
,
"DVD_PLUS_R"
,
"DVD"
,
\
"BD_RE"
,
"BD_R"
,
"BD"
,
"CD_RW"
,
"CD_R"
,
"CD"
]
for
type
in
types
:
if
device
.
get_property
(
"ID_CDROM_"
+
type
)
==
"1"
:
for
dev_
type
in
types
:
if
device
.
get_property
(
"ID_CDROM_"
+
dev_
type
)
==
"1"
:
try
:
sort_devices
[
"cdrom"
].
extend
([
device
])
except
KeyError
:
...
...
server/server.py
浏览文件 @
d4afcbc5
...
...
@@ -71,7 +71,7 @@ def get_results():
return
render_template
(
'results.html'
,
results
=
results
)
@
app
.
route
(
'/results/<host>/<id>/<job>'
)
@
app
.
route
(
'/results/<host>/<
oec_
id>/<job>'
)
def
get_job
(
host
,
oec_id
,
job
):
dir_job
=
os
.
path
.
join
(
dir_results
,
host
,
oec_id
,
job
)
json_info
=
os
.
path
.
join
(
dir_job
,
'compatibility.json'
)
...
...
@@ -86,7 +86,7 @@ def get_job(host, oec_id, job):
return
render_template
(
'job.html'
,
host
=
host
,
id
=
oec_id
,
job
=
job
,
info
=
info
,
results
=
results
)
@
app
.
route
(
'/results/<host>/<id>/<job>/devices/<interface>'
)
@
app
.
route
(
'/results/<host>/<
oec_
id>/<job>/devices/<interface>'
)
def
get_device
(
host
,
oec_id
,
job
,
interface
):
dir_job
=
os
.
path
.
join
(
dir_results
,
host
,
oec_id
,
job
)
json_results
=
os
.
path
.
join
(
dir_job
,
'factory.json'
)
...
...
@@ -103,7 +103,7 @@ def get_device(host, oec_id, job, interface):
abort
(
404
)
@
app
.
route
(
'/results/<host>/<id>/<job>/devices'
)
@
app
.
route
(
'/results/<host>/<
oec_
id>/<job>/devices'
)
def
get_devices
(
host
,
oec_id
,
job
):
dir_job
=
os
.
path
.
join
(
dir_results
,
host
,
oec_id
,
job
)
json_devices
=
os
.
path
.
join
(
dir_job
,
'device.json'
)
...
...
@@ -115,7 +115,7 @@ def get_devices(host, oec_id, job):
return
render_template
(
'devices.html'
,
devices
=
devices
)
@
app
.
route
(
'/results/<host>/<id>/<job>/attachment'
)
@
app
.
route
(
'/results/<host>/<
oec_
id>/<job>/attachment'
)
def
get_attachment
(
host
,
oec_id
,
job
):
dir_job
=
os
.
path
.
join
(
dir_results
,
host
,
oec_id
,
job
)
attachment
=
dir_job
+
'.tar.gz'
...
...
@@ -124,7 +124,7 @@ def get_attachment(host, oec_id, job):
return
send_from_directory
(
filedir
,
filename
,
as_attachment
=
True
)
@
app
.
route
(
'/results/<host>/<id>/<job>/logs/<name>'
)
@
app
.
route
(
'/results/<host>/<
oec_
id>/<job>/logs/<name>'
)
def
get_log
(
host
,
oec_id
,
job
,
name
):
dir_job
=
os
.
path
.
join
(
dir_results
,
host
,
oec_id
,
job
)
logpath
=
os
.
path
.
join
(
dir_job
,
name
+
'.log'
)
...
...
@@ -138,7 +138,7 @@ def get_log(host, oec_id, job, name):
return
render_template
(
'log.html'
,
name
=
name
,
log
=
log
)
@
app
.
route
(
'/results/<host>/<id>/<job>/submit'
)
@
app
.
route
(
'/results/<host>/<
oec_
id>/<job>/submit'
)
def
submit
(
host
,
oec_id
,
job
):
dir_job
=
os
.
path
.
join
(
dir_results
,
host
,
oec_id
,
job
)
tar_job
=
dir_job
+
'.tar.gz'
...
...
tests/memory/memory.py
浏览文件 @
d4afcbc5
...
...
@@ -58,6 +58,7 @@ class MemoryTest(Test):
self
.
free_memory
=
0
self
.
system_memory
=
0
self
.
swap_memory
=
0
self
.
hugepage_size
=
0
self
.
hugepage_total
=
0
self
.
hugepage_free
=
0
while
True
:
...
...
tests/system/system.py
浏览文件 @
d4afcbc5
...
...
@@ -161,10 +161,10 @@ class SystemTest(Test):
def
abi_check
(
self
,
module
):
whitelist_path
=
[(
"/lib/modules/kabi-current/kabi_whitelist_"
+
self
.
sysinfo
.
arch
),
(
"/lib/modules/kabi/kabi_whitelist_"
+
self
.
sysinfo
.
arch
),
(
"/usr/src/kernels/%s/kabi_whitelist"
%
self
.
sysinfo
.
kernel
)
]
(
"/lib/modules/kabi/kabi_whitelist_"
+
self
.
sysinfo
.
arch
),
(
"/usr/src/kernels/%s/kabi_whitelist"
%
self
.
sysinfo
.
kernel
)
]
whitelist
=
""
for
whitelist
in
whitelist_path
:
if
os
.
path
.
exists
(
whitelist
):
break
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录