chainlink-testing-framework icon indicating copy to clipboard operation
chainlink-testing-framework copied to clipboard

Flakeguard: Resolve Full Paths for Run Command and Extract Test Parser Module

Open lukaszcl opened this issue 9 months ago • 0 comments


Below is a summarization created by an LLM (gpt-4-0125-preview). Be mindful of hallucinations and verify accuracy.

Why

  • Added support for golang 1.24.0 to ensure compatibility and leverage the latest features and security patches.
  • Introduced a new field TestDir in CITestConf structure to enable specification of test directories, enhancing configuration flexibility.
  • Implemented full path resolution for projectPath, mainResultsPath, and rerunResultsPath in flakeguard/cmd/run.go to ensure consistent path handling across different environments.
  • Integrated a spinner feedback mechanism during custom test command execution to provide real-time status updates, improving user experience.
  • Developed a unified command execution function executeCommand to streamline running and handling output of test commands, promoting code reuse and maintainability.
  • Extracted JSON parsing related functionalities into a separate testparser package, facilitating code organization and focus on parsing logic.
  • Adopted a test-centric approach in testparser to accurately attribute panics and data races to specific tests, enhancing error reporting and analysis.

What

  • .tool-versions

    • Added golang 1.24.0.
  • tools/citool/cmd/types.go

    • Added TestDir string field in CITestConf structure.
  • tools/flakeguard/cmd/run.go

    • Implemented path resolution for projectPath, mainResultsPath, and rerunResultsPath.
    • Added a spinner feedback mechanism during custom test command execution.
    • Introduced executeCommand function to handle execution of test-related commands.
  • tools/flakeguard/runner/runner.go

    • Refactored to use executeCommand for running test packages and commands.
    • Removed unused code and simplified test result parsing logic.
  • tools/flakeguard/runner/runner_test.go

    • Updated tests to reflect changes in the runner package.
  • tools/flakeguard/testparser/testparser.go

    • Introduced new package for parsing test results from JSON files.
    • Included functions to attribute panics and data races to specific tests.
  • tools/flakeguard/testparser/testparser_test.go

    • Added tests for the testparser package functionalities.

lukaszcl avatar Mar 26 '25 16:03 lukaszcl