提交 d4afcbc5 编写于 作者: C cuixucui

解决id参数获取不到问题

上级 8fc90ba8
......@@ -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
......
......@@ -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:
......
......@@ -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'
......
......@@ -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:
......
......@@ -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.
先完成此消息的编辑!
想要评论请 注册