Skip to content

donate_cpu_lib.py: fix callstack capture, fix dependency check#3665

Merged
firewave merged 3 commits intocppcheck-opensource:mainfrom
guillaume-uH57J9:patch-1
Jan 2, 2022
Merged

donate_cpu_lib.py: fix callstack capture, fix dependency check#3665
firewave merged 3 commits intocppcheck-opensource:mainfrom
guillaume-uH57J9:patch-1

Conversation

@guillaume-uH57J9
Copy link
Copy Markdown
Contributor

check_requirements: verify that module psutil is available.
scan_package: collect crash callstack regardless of cppcheck_path and cppcheck version

check_requirements: verify that module psutil is available. 
scan_package: collect crash callstack regardless of cppcheck_path and cppcheck version
@guillaume-uH57J9
Copy link
Copy Markdown
Contributor Author

The issue was reported by @firewave in a comment at a3560aa

Comment thread tools/donate_cpu_lib.py
try:
import psutil
except ImportError as e:
print("Error: {}. Module is required. ".format(e))
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that

Comment thread tools/donate_cpu_lib.py
@guillaume-uH57J9
Copy link
Copy Markdown
Contributor Author

guillaume-uH57J9 commented Jan 2, 2022

Okay.
I removed this test because I thought it made sense to capture for all versions; it would make diff output easier to interpret.
Since it's needed I brought it back as an explicit parameter.

@firewave
Copy link
Copy Markdown
Collaborator

firewave commented Jan 2, 2022

Okay. I removed this test because I thought it made sense to capture for all versions; it would make diff output easier to interpret. Since it's needed I brought it back as an explicit parameter.

We only store this information for head since we do rolling releases from main so we don't need that information for previous releases.

The parameter is better implementation as it removes some logic from the function and makes it clearer what it actually does. 🥳

@firewave
Copy link
Copy Markdown
Collaborator

firewave commented Jan 2, 2022

Gave it a spin and it works again - see http://cppcheck1.osuosl.org:8000/angband

Thanks for the fast reply.

@firewave firewave merged commit dfd2291 into cppcheck-opensource:main Jan 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants