-
Notifications
You must be signed in to change notification settings - Fork 1
4444 Checks fix coverage upload.fixup 4 #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Bernhard Kaindl <bernhard.kaindl@cloud.com>
Signed-off-by: Bernhard Kaindl <bernhard.kaindl@cloud.com>
bernhardkaindl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
code-coverage
Lines 208-209 are not covered
Line 209 in 6d224ae
| return None |
Line 211 is not covered
Line 211 in 6d224ae
| def parse_dmv_info(self, fpath): |
Lines 213-216 are not covered
Line 216 in 6d224ae
| json_formatted = { |
Lines 229-230 are not covered
Line 230 in 6d224ae
| json_formatted["selected"] = self.variant_selected( |
Line 232 is not covered
Line 232 in 6d224ae
| json_formatted["active"] = get_active_variant( |
Line 234 is not covered
Line 234 in 6d224ae
| json_formatted["loaded modules"] = get_loaded_modules( |
Line 236 is not covered
Line 236 in 6d224ae
| return json_data, json_formatted |
Lines 238-239 are not covered
Line 239 in 6d224ae
| dmv_list = {} # type: Dict[str, Any] |
Lines 241-243 are not covered
Line 243 in 6d224ae
| self.dmv_list = { |
Line 248 is not covered
Line 248 in 6d224ae
| self.errors_list = { |
Lines 254-257 are not covered
Line 257 in 6d224ae
| variants[k] = v |
Line 259 is not covered
Line 259 in 6d224ae
| json_formatted = { |
Lines 266-272 are not covered
Line 272 in 6d224ae
| json_formatted["selected"] = selected |
Lines 274-279 are not covered
Line 279 in 6d224ae
| json_formatted["active"] = active |
Lines 281-282 are not covered
Line 282 in 6d224ae
| json_formatted["loaded modules"] = loaded |
Line 284 is not covered
Line 284 in 6d224ae
| self.dmv_list["drivers"][oldone["info"]] = json_formatted |
Lines 286-290 are not covered
Line 290 in 6d224ae
| self.dmv_list["drivers"][json_data["name"]] = json_formatted |
Line 292 is not covered
Line 292 in 6d224ae
| self.merge_jsondata(self.dmv_list["drivers"][json_data["name"]], json_formatted) |
Lines 294-295 are not covered
Line 295 in 6d224ae
| lspci_out = subprocess.run(["lspci", '-nm'], stdout=subprocess.PIPE, |
Lines 298-300 are not covered
Line 300 in 6d224ae
| continue |
Lines 302-304 are not covered
Line 304 in 6d224ae
| continue |
Lines 306-309 are not covered
Line 309 in 6d224ae
| self.process_dmv_data(json_data, json_formatted) |
Lines 311-312 are not covered
Line 312 in 6d224ae
| lspci_out = subprocess.run(["lspci", '-nm'], stdout=subprocess.PIPE, |
Lines 315-317 are not covered
Line 317 in 6d224ae
| self.process_dmv_data(json_data, json_formatted) |
Lines 319-320 are not covered
Line 320 in 6d224ae
| return self.dmv_list |
Lines 322-327 are not covered
Line 327 in 6d224ae
| for module_file in module_files: |
Lines 329-334 are not covered
Line 334 in 6d224ae
| except FileNotFoundError: |
Lines 336-341 are not covered
Line 341 in 6d224ae
| subprocess.run( |
Lines 347-349 are not covered
Line 349 in 6d224ae
| uname_r = subprocess.run(["uname", '-r'], stdout=subprocess.PIPE, text=True, |
Lines 351-357 are not covered
Line 357 in 6d224ae
| return False |
Lines 359-360 are not covered
Line 360 in 6d224ae
| return self.errors_list |
Lines 362-364 are not covered
Line 364 in 6d224ae
| self.errors_list["message"] = os.strerror(errcode) |
| import re | ||
| import struct | ||
| import subprocess | ||
| from typing import Any, Dict |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lines 24-31 are not covered
| import subprocess | ||
| from typing import Any, Dict | ||
|
|
||
| from .compat import open_with_codec_handling |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 33 is not covered
| from .compat import open_with_codec_handling | ||
|
|
||
| dmv_proto_ver = 0.1 | ||
| err_proto_ver = 0.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lines 35-36 are not covered
| dmv_proto_ver = 0.1 | ||
| err_proto_ver = 0.1 | ||
|
|
||
| def get_all_kabi_dirs(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 38 is not covered
| dirs = [] | ||
| for kabi_ver in os.listdir(modules_root): | ||
| updates_dir = os.path.join(modules_root, kabi_ver, "updates") | ||
| dmv_dir = os.path.join(modules_root, kabi_ver, "dmv") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lines 40-44 are not covered
| info_file = os.path.join(module_dir, "info.json") | ||
| with open(info_file, "r", encoding="ascii") as json_file: | ||
| json_data = json.load(json_file) | ||
| variant = json_data["variant"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lines 176-184 are not covered
| variant = json_data["variant"] | ||
|
|
||
| return variant | ||
| return None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lines 186-187 are not covered
| def __init__(self, updates_dir, lspci_out, runtime=False): | ||
| self.updates_dir = updates_dir | ||
| self.lspci_out = lspci_out | ||
| self.runtime = runtime |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lines 189-193 are not covered
| self.lspci_out = lspci_out | ||
| self.runtime = runtime | ||
|
|
||
| def variant_selected(self, modules): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 195 is not covered
| info_file = os.path.join(module_dir, "info.json") | ||
| with open(info_file, "r", encoding="ascii") as json_file: | ||
| json_data = json.load(json_file) | ||
| variant = json_data["variant"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lines 198-206 are not covered
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Pull Request Test Coverage Report for Build 17054637565Details
💛 - Coveralls |
623aca2 to
bbc199e
Compare
Signed-off-by: Bernhard Kaindl <bernhard.kaindl@cloud.com>
move DMV common code to python-libs because RPU plugin calls these functions as well Signed-off-by: Chunjie Zhu <chunjie.zhu@cloud.com>
Signed-off-by: Bernhard Kaindl <bernhard.kaindl@cloud.com>
bbc199e to
3be08cc
Compare
8a18101 to
2534106
Compare
No description provided.