Skip to content

Commit

Permalink
add sanitizers reports
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreyMlashkin committed Nov 14, 2024
1 parent c7aefbc commit cd02834
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/clang-sanitizers-linux-nix-check.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Test on Linux Platforms
name: Build and Test sanitizers on Linux with clang

on:
workflow_call:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ jobs:
steps:
- name: Post logs to Sig Noz
run: |
printenv
UndefinedBehaviorSanitizer=$(nix log -L .?#checks.x86_64-linux.all-sanitizers | grep UndefinedBehaviorSanitizer | wc -l)
AddressSanitizer=$(nix log -L .?#checks.x86_64-linux.all-sanitizers | grep "AddressSanitizer" | wc -l)
LeakSanitizer=$(nix log -L .?#checks.x86_64-linux.all-sanitizers | grep "LeakSanitizer" | wc -l)
ls -l -a
ls -l -a ./result/
export OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED=true
Expand Down
9 changes: 8 additions & 1 deletion parse_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
import glob, os
from opentelemetry import trace

undefined_behavior_sanitizer=os.environ['UndefinedBehaviorSanitizer']
address_sanitizer=os.environ['AddressSanitizer']
leak_sanitizer=os.environ['LeakSanitizer']

aggregated_test_results = JUnitXml();
for file in glob.glob("result/test-logs/*.xml"):
aggregated_test_results.append(JUnitXml.fromfile(file))
Expand All @@ -18,7 +22,10 @@
"errors" : aggregated_test_results.errors,
"skipped" : aggregated_test_results.skipped,
"succeeded" : succeeded,
"execution_time" : aggregated_test_results.time,
"execution_time" : aggregated_test_results.time,
"undefined_behavior_sanitizer" : int(undefined_behavior_sanitizer),
"address_sanitizer" : int(address_sanitizer),
"leak_sanitizer" : int(leak_sanitizer),
}

print("Resulting JSON: {}".format(json.dumps(result)))
Expand Down

0 comments on commit cd02834

Please sign in to comment.