-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TODO 2: Tests #163
Comments
Idea 💡 run Rack in headless mode with debugger attached during CI runsI've added Debug and Release modes to the build system and codebase, which provides hooks for using things like To facilitate this, I've added a Very interesting: when running Rack like this, it actually fires it's own debug assertions at you at runtime, in response to your module code. I've encountered debug assertions that my modules were a number of pixels short of the required module height (128.5mm precisely results in a number of pixels just below the required 380 - Inkscape mutates source files automatically to round mm's to valid pixel integer values...) I've not quite been able to construct a ModuleWidget within Catch2 - the test case instantly fails with a I was hoping to construct the ModuleWidget inside my unit tests so that I can check The issue with that is, it requires running Rack, and with a debugger attached, in order to check those assertions. The current CI pipeline covers unit tests thanks to Catch2 and CTest. But, there is no end to end testing. I've quietly added a step to each workflow, to install VCV Rack 2 Free from official sources:
The only platform which actually requires the installation of the Rack executable is Windows (specifically, MinGW!) because the Rack SDK only ships with a Anyway, Rack can be run from the command line and do lots of cool things, like load a custom project template - very handy, or take screenshots - very very handy indeed. It supports a SolutionMy thinking is to add a step within the workflows which runs the built plugin in headless mode. GotchasIt will probably only make sense to do this if we can get the program to close itself after x amount of time, by hoping and assuming that all runners have support for something like I immediately don't like that this adds 60 seconds to every build run. 😢 a reasonable amount of uptime is required... my benchmarking at home suggests that Rack should boot within under one second on any of those runners. And yet, as I write, GitHub is running incredibly slow this evening and each workflow is crawling well below usual speeds by a factor between x4 and x6. The I'd also like to figure out how to extract Rack's More thought required before committing. |
Could be mitigated slightly by only running the, let's call them "runtime assertion tests", on the preview branch, with the option to run them customarily from the actions dispatch button. Slightly smelly because it allows "bugged" code to pass between branches, up until that code reaches the branch with the "runtime assertion tests" workflow. |
Idea 💡 add CTest config for running Rack executable with C++ debugger attachedYes - it means probably writing more CMake or whatever to make sure the Rack executable is acquired, then doing But, parity is very important. A CTest wrapper around around launching Rack to test the built plugin will ensure the same test conditions across users, devs/contributors, platforms, and CI runners. Not in a rush to do it since I'm personally happy with the VSCode |
REQUIRE_THAT(box.size.x, WithinRel(::rack::mm2px(5.08F)))
, etc... #327box.size.y == ...
as above #328The text was updated successfully, but these errors were encountered: