Skip to content

Conversation

@rafarrel
Copy link
Contributor

Merge this PR first: #164

This PR completely revamps MicrostrainTest, making it more a framework for managing test framework dependencies and test registration and discovery, as well as common wrapper code and utility assertions for any framework.

It adds:

  • Easy framework installation (just set a CMake variable)
  • Easily set up one framework for C and one for C++ simultaneously
  • Automatic test discovery for C frameworks
  • The ability to run test suites sequentially or in parallel

rafarrel and others added 30 commits September 25, 2025 14:27
@rafarrel rafarrel requested a review from robbiefish October 22, 2025 14:05
@rafarrel rafarrel self-assigned this Oct 22, 2025
Copy link
Collaborator

@robbiefish robbiefish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good for the most part, but I would change to use a template file for the C auto discovery instead of generating the entire file in CMake

@rafarrel rafarrel requested a review from robbiefish October 23, 2025 16:13
# Escape backslashes in filepaths for C string literal
string(REPLACE "\\" "\\\\" TEST_FILEPATH_ESCAPED "${TEST_FILEPATH}")

string(APPEND TEST_FILTERING " if (!test_filter || strcmp(test_filter, \"[${SUITE_NAME}] ${TEST_NAME}\") == 0) {\n")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like this functionality could live in another macro that wraps the INTERNAL_RUN_MICROSTRAIN_TEST_CASE_AUTO_DISCOVER so that you are only appending one line of code to the file. I think the multiline nature of this code generation is what makes it difficult to read

@rafarrel rafarrel merged commit 55f11fa into develop Oct 23, 2025
2 checks passed
@rafarrel rafarrel deleted the feature/update_microstrain_test branch October 23, 2025 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants