-
Notifications
You must be signed in to change notification settings - Fork 2
In integration tests, store drunc console output in a log file and check for warnings and errors #162
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
Merged
Merged
In integration tests, store drunc console output in a log file and check for warnings and errors #162
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
73113a4
Added functionality to integrationtest_drunc.py to store the drunc co…
4f55e76
Added a phrase that we always want to exclude from drunc log file che…
7e8cab7
Fixed a bug in log_file_checks.py - only the first excluded or requir…
4cc6708
added critical messages to ones that we'll print out from the drunc c…
f0e3ea4
Updated the standard excluded phrases in log_file_checks.py to includ…
59a351f
Merge remote-tracking branch 'origin/develop' into kbiery/drunc_outpu…
a7716ec
Filtered out ANSI escape characters in the text that we write to the …
e2e2450
Dropped the 'X11 forwarding' message from the excluded list in log_fi…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -111,6 +111,9 @@ def logs_are_error_free(log_file_names, show_all_problems=True, print_logfilenam | |
| ["RAN:", "LogLevel=error"] | ||
| ) | ||
|
|
||
| # 21-Jul-2026, KAB: phrases that we always want to exclude | ||
| excluded_substring_map.setdefault("drunc", []).extend(["Substate.*In error.*Endpoint"]) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the movtivation for excluding the phrase "Endpoint" or "Substate" here? |
||
|
|
||
| all_ok=True | ||
| #print("") # Clear potential dot from pytest | ||
| for log in log_file_names: | ||
|
|
@@ -121,13 +124,11 @@ def logs_are_error_free(log_file_names, show_all_problems=True, print_logfilenam | |
| match_obj = re.search(exclusion_key, log.name) | ||
| if match_obj: | ||
| exclusions += excluded_substring_map[exclusion_key] | ||
| break | ||
| for required_key in required_substring_map.keys(): | ||
| match_obj = re.search(required_key, log.name) | ||
| if match_obj: | ||
| requireds += required_substring_map[required_key] | ||
| break | ||
|
|
||
|
|
||
| single_ok=log_has_no_errors(log, print_logfilename_for_problems, exclusions, requireds, | ||
| print_required_message_report, verbosity_helper) | ||
|
|
||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
This is exactly what is needed, but I suggest an extension here. Investigating the logfile, mani ANSI escape characters associated with the use of the
richoutput with color coding is including additional verbosity asThere was a similar case of this when @emmuhamm overhauled the python logging framework, and the stripping of this was implemented in
daqsystemtestin this PR. Would it be possible to implement this?