Skip to content

Refactor test suite creation to avoid specifying the number of test inside the suite#113

Merged
LuernOutOfOrder merged 2 commits intodevelopfrom
96-improve-test-suite-for-test-number
Feb 3, 2026
Merged

Refactor test suite creation to avoid specifying the number of test inside the suite#113
LuernOutOfOrder merged 2 commits intodevelopfrom
96-improve-test-suite-for-test-number

Conversation

@LuernOutOfOrder
Copy link
Owner

This pull request refactors the test suite infrastructure by removing the tests_nb field from the TestSuite struct and updating all usages to dynamically calculate the number of tests. This change simplifies test suite management and reduces redundancy. Additionally, the initialization and reporting logic have been updated to use the length of the test array directly.

Test suite infrastructure refactoring:

  • Removed the tests_nb field from the TestSuite struct and all test suite initializations, relying instead on the length of the tests array for the number of tests. [1] [2]
  • Updated the test runner logic to use test_suite.tests.len() for determining the number of tests to run and for reporting, replacing all references to tests_nb. [1] [2]

Test suite definitions cleanup:

  • Removed the tests_nb argument from all test suite initializations across multiple test modules, including RISC-V32 context, trap handler, interrupt enabling, trap frame, CPU interrupt-controller, serials, timer, ktime, memory, platform, ring buffer, and task suites. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14]

Minor code cleanup:

  • Removed the #[unsafe(no_mangle)] attribute from the test_runner function, as it is no longer needed.

@LuernOutOfOrder LuernOutOfOrder added this to the v0.4.2 milestone Feb 3, 2026
@LuernOutOfOrder LuernOutOfOrder self-assigned this Feb 3, 2026
@LuernOutOfOrder LuernOutOfOrder added the enhancement New feature or request label Feb 3, 2026
@LuernOutOfOrder LuernOutOfOrder merged commit 54cc10a into develop Feb 3, 2026
3 checks passed
@LuernOutOfOrder LuernOutOfOrder deleted the 96-improve-test-suite-for-test-number branch February 3, 2026 15:43
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