Skip to content

feat: Add advanced options - #16

Merged
liam-colle merged 3 commits into
mainfrom
feat/advanced-options
Mar 5, 2026
Merged

feat: Add advanced options#16
liam-colle merged 3 commits into
mainfrom
feat/advanced-options

Conversation

@liam-colle

Copy link
Copy Markdown
Owner

This pull request adds support for per-test configuration options in the JSON scripts, enabling customization of test execution parameters such as timeouts and memory checking behavior. It also improves memory leak detection, enhances error handling, and refactors utility functions for greater flexibility. The documentation is updated to reflect these changes.

Configuration and Test Options:

  • Added support for per-test options in the JSON scripts, allowing users to specify timeout, trace_children, and lenient_memory_check on a per-test basis; updated the README.md with examples and documentation for these options. [1] [2] [3]
  • Parser (lib/grindscript_parse.py) now reads these options, sets sensible defaults, and passes them to the test runner and Valgrind invocation. [1] [2]

Memory Leak Detection and Valgrind Integration:

  • Improved memory leak detection by parsing Valgrind output for allocation/free counts and reporting leaks when allocs > frees; expanded Valgrind error patterns for more detailed memory diagnostics. [1] [2] [3]
  • Added VALGRIND_DEFAULT_TIMEOUT (default 30 minutes) and support for per-test timeouts in Valgrind execution. [1] [2] [3]
  • Enhanced Valgrind argument handling to support trace_children and leak-check flags based on test options.

Error Handling and Utility Functions:

  • Improved error and timeout handling in test execution, with clearer messages for timeouts and unknown errors.
  • Refactored get_dict_value utility to support nested key paths and default values, improving robustness when accessing optional config fields.
  • Minor: Improved error reporting for terminal size detection.

Other:

  • Changed test log file writing mode from exclusive create to append to avoid errors on repeated runs.
  • Updated code to ensure all new options and arguments are passed through the test execution pipeline.

@liam-colle liam-colle self-assigned this Mar 5, 2026
@liam-colle liam-colle added the enhancement New feature or request label Mar 5, 2026
@liam-colle
liam-colle merged commit 7ea8368 into main Mar 5, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant