Skip to content

Implement Verbose Support - #122

Merged
ergo720 merged 2 commits into
Cxbx-Reloaded:masterfrom
RadWolfie:impl-verbose-support
Aug 18, 2026
Merged

Implement Verbose Support#122
ergo720 merged 2 commits into
Cxbx-Reloaded:masterfrom
RadWolfie:impl-verbose-support

Conversation

@RadWolfie

@RadWolfie RadWolfie commented Aug 8, 2026

Copy link
Copy Markdown
Member

Instead of always outputting a plain "PASSED" to the screen and the log file without any details, I added support for a disable-verbose config option to the config.txt file (which currently defaults to OFF). Enabling verbose logging provides deep details about what each test processed. This helps improve testing by ensuring that the written code works correctly, or by catching cases where a developer forgot to upload the updated XBE file.

Developers or testers can disable verbose output by setting disable-verbose=1 in the config.txt file.

@ergo720

ergo720 commented Aug 8, 2026

Copy link
Copy Markdown
Member

I suggest to remove the argument test_name from ASSERT_HEADER and ASSERT_FOOTER, so we don't have to pass it every single time we use the macros. The macros can already use it if the variable is in scope when they are used.

@RadWolfie

Copy link
Copy Markdown
Member Author

That is to be determined. There are also api_name and var_name arguments used in the other functions. Once we complete most of the API tests, we can determine whether we still need to provide the argument to the macro, which isn't bound to the functions at the moment.

Also, I'm having second thoughts about this. Instead of using a make command, maybe we could add a configuration argument to toggle the verbose output on and off for each run. This would prevent the need to recompile every time. Clearly, Make's build system isn't smart enough to automatically track macro changes and rebuild the affected files. However, I know CMake's build system is smart enough to recognize that a single macro definition change via the CLI requires rebuilding only the affected files.

@RadWolfie
RadWolfie force-pushed the impl-verbose-support branch from 98665c8 to 72a174d Compare August 14, 2026 03:16
@RadWolfie

Copy link
Copy Markdown
Member Author

I ran the tests with and without verbose logging to check the difference in the time it took to complete when using a macro versus a config variable. Here is what I got from the hardware while testing the XeLoadSection function:

macro verbose:

  • 327 - XeLoadSection: Test completed in 163.513 seconds

macro no verbose:

  • 327 - XeLoadSection: Test completed in 1.048 seconds

config verbose:

  • 327 - XeLoadSection: Test completed in 162.254 seconds

config no verbose:

  • 327 - XeLoadSection: Test completed in 1.048 seconds

Support for timing each test will be submitted in a separate pull request, which will add a new config option.

@RadWolfie
RadWolfie force-pushed the impl-verbose-support branch from 72a174d to a5db85d Compare August 14, 2026 03:34
@ergo720

ergo720 commented Aug 18, 2026

Copy link
Copy Markdown
Member

I still don't like having to pass the API test name to ASSERT_HEADER, ASSERT_FOOTER and assert_object_type. Hopefully, this will be addressed in a future PR, like the above comment mentioned. Merging as is for now.

@ergo720
ergo720 merged commit 03f27c8 into Cxbx-Reloaded:master Aug 18, 2026
1 check passed
@RadWolfie
RadWolfie deleted the impl-verbose-support branch August 18, 2026 20:17
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.

2 participants