[$25 BOUNTY] Add diagnostic bundle validation tests#3
Open
maojianian25-png wants to merge 2 commits into
Open
Conversation
Add comprehensive test suite for diagnostic bundle validation: - test_diagnostic_files_exist: Verify logd and json files are created - test_diagnostic_json_structure: Validate required JSON fields - test_diagnostic_counts_match: Ensure module counts are consistent - test_module_status_values: Verify PASS/FAIL status values - test_module_required_fields: Check all required module fields - test_elapsed_seconds_numeric: Validate numeric elapsed times - test_path_redaction: Ensure sensitive paths are redacted - test_missing_json_fails: Detect missing JSON metadata - test_missing_logd_fails: Detect missing logd bundle - test_mismatched_commit_ids: Catch commit ID mismatches - test_cross_platform_path_separator: Verify forward slashes - test_deterministic_output: Ensure consistent validation results - test_build_module_imports: Verify build module imports - test_module_list_not_empty: Confirm modules are defined Also fix f-string backslash syntax error in build.py. Closes Andyyook#1
Owner
|
Thanks for the PR. I cannot forward this as bounty-ready in its current form. The PR deletes |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This PR adds comprehensive diagnostic bundle validation tests as requested in #1.
Changes
tests/test_diagnostic_bundle.py: New test suite with 14 tests covering:
build.py: Fixed f-string backslash syntax error for Python 3.12+ compatibility
Testing
All 14 tests pass locally:
$ python3 tests/test_diagnostic_bundle.py test_build_module_imports ... ok test_module_list_not_empty ... ok test_cross_platform_path_separator ... ok test_deterministic_output ... ok test_diagnostic_counts_match ... ok test_diagnostic_files_exist ... ok test_diagnostic_json_structure ... ok test_elapsed_seconds_numeric ... ok test_mismatched_commit_ids ... ok test_missing_json_fails ... ok test_missing_logd_fails ... ok test_module_required_fields ... ok test_module_status_values ... ok test_path_redaction ... ok ---------------------------------------------------------------------- Ran 14 tests in 0.014s OKChecklist
Closes #1