ROCgdb test script review#117
Open
lumachad wants to merge 8 commits intoamd-stagingfrom
Open
Conversation
Quote optimization flags in CFLAGS_FOR_TARGET to prevent shell argument splitting when values contain spaces (e.g., "--optimization=-O3 -g"). Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
Replace hardcoded XFAILED_TESTS dictionary with JSON-based ignore list management by creating a new rocgdb_ignore_list.json file containing the update list of ignore entries. Add load_ignore_list_from_json() to read ignore lists from JSON files and generate_ignore_list() to export test failures as ignore lists. Introduce --ignore-list-file option to specify custom ignore list locations and --output-ignore-list-file option to export failures to JSON format. Update print_configuration() to display the ignore list file status. This enables dynamic ignore list management and allows regenerating ignore lists from test run failures for easier maintenance. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Simplified the category display dictionary from tuples of (prefix, suffix) to just prefix values, since the suffix was never used. Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
The function only exits with code 1 when error_msg is provided. When error_msg is None, it re-raises the CalledProcessError instead. Also clarified that failure means non-zero exit status. Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
The original flag name was misleading: specifying --dump-failed-test-log actually disabled the log dump due to action="store_false". Rename to --skip-failed-test-log to match the actual behavior, making the interface more intuitive. Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
The --tests argument accepts both individual .exp files and directories. When a directory is provided, the expand_test_paths function automatically appends /*.exp to find all test files. Update the help text to document this behavior so users know they don't need to add the suffix manually. Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
Replace manual validation checks with custom type functions passed to add_argument. This follows standard argparse patterns and provides immediate validation feedback when arguments are parsed. Added _positive_int() for --max-failed-retries and _timeout_value() for --timeout, removing the redundant manual checks after parse_args(). Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
Refactor cleanup_old_entries and update_results to accept List[str] instead of space-separated strings. The run_tests function now works with lists internally and only joins to space-separated format when needed for the make command. This improves type safety and makes the code clearer by keeping the space-separated string conversion at the boundary where it's required. Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
Collaborator
Author
|
FYI, the changes in the testing script won't be reflected in the CI. Manual testing required. |
Collaborator
Author
|
Marking ci:skip as this won't get auto-tested anyway. |
Draft
2 tasks
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.
This PR contains a few improvements and changes based on previews reviews. We should go through the entire code and make sure everyone is happy.
Fix test_rocgdb.py optimization flag parsing with spaces
Quote optimization flags in CFLAGS_FOR_TARGET to prevent shell argument
splitting when values contain spaces (e.g., "--optimization=-O3 -g").
Add ROCgdb test ignore list JSON configuration and generation
Replace hardcoded XFAILED_TESTS dictionary with JSON-based ignore list
management by creating a new rocgdb_ignore_list.json file containing the
update list of ignore entries. Add load_ignore_list_from_json() to read ignore
lists from JSON files and generate_ignore_list() to export test failures
as ignore lists.
Introduce --ignore-list-file option to specify custom ignore list locations
and --output-ignore-list-file option to export failures to JSON format.
Update print_configuration() to display the ignore list file status.
This enables dynamic ignore list management and allows regenerating ignore
lists from test run failures for easier maintenance.
Remove unused suffix from CATEGORY_DISPLAY configuration
Simplified the category display dictionary from tuples of (prefix, suffix)
to just prefix values, since the suffix was never used.
Fix _run_command docstring to clarify exit/raise behavior
The function only exits with code 1 when error_msg is provided. When
error_msg is None, it re-raises the CalledProcessError instead. Also
clarified that failure means non-zero exit status.
Rename --dump-failed-test-log to --skip-failed-test-log for clarity
The original flag name was misleading: specifying --dump-failed-test-log
actually disabled the log dump due to action="store_false". Rename to
--skip-failed-test-log to match the actual behavior, making the interface
more intuitive.
Clarify --tests help text to document automatic /*.exp expansion
The --tests argument accepts both individual .exp files and directories.
When a directory is provided, the expand_test_paths function automatically
appends /*.exp to find all test files. Update the help text to document
this behavior so users know they don't need to add the suffix manually.
Move timeout and max-retries validation to argparse type functions
Replace manual validation checks with custom type functions passed to
add_argument. This follows standard argparse patterns and provides
immediate validation feedback when arguments are parsed.
Added _positive_int() for --max-failed-retries and _timeout_value()
for --timeout, removing the redundant manual checks after parse_args().
Change tests parameter from string to List[str] for better type safety
Refactor cleanup_old_entries and update_results to accept List[str]
instead of space-separated strings. The run_tests function now works
with lists internally and only joins to space-separated format when
needed for the make command.
This improves type safety and makes the code clearer by keeping the
space-separated string conversion at the boundary where it's required.