| 71 | } |
| 72 | |
| 73 | int fl_run_tests(int argc, const char** argv) { |
| 74 | // NOTE: Crash handler is setup by runner.exe BEFORE loading this DLL |
| 75 | // We do NOT call setup_crash_handler() here to avoid duplicate setup |
| 76 | // and to keep crash handler dependencies (dbghelp, psapi) in runner.exe only |
| 77 | |
| 78 | // NOTE: Timeout watchdog is NOT enabled in DLL mode - runner.exe and test_wrapper.py |
| 79 | // provide external timeout monitoring with better stack trace capabilities |
| 80 | |
| 81 | // Pre-initialize CoroutineRunner singleton to avoid DLL hang on first access |
| 82 | std::cout << "Pre-initializing CoroutineRunner singleton" << std::endl; |
| 83 | fl::detail::CoroutineRunner::instance(); |
| 84 | std::cout << "CoroutineRunner singleton pre-initialized successfully" << std::endl; |
| 85 | |
| 86 | // Post-#2428: the channel driver registry no longer auto-populates. |
| 87 | // Enable every platform-available driver so legacy `FastLED.addLeds<>()` |
| 88 | // AND Channel API `FastLED.add(cfg)` paths both have a driver to dispatch |
| 89 | // to on host. Tests that need stricter isolation can call |
| 90 | // `manager.clearAllDrivers()` followed by their own `enableDrivers<>()`. |
| 91 | fl::enableAllDrivers(); |
| 92 | |
| 93 | // Run fl_unittest test framework |
| 94 | fl::test::RunOptions opts = fl::test::parse_args(argc, (const char**)argv); |
| 95 | int result = fl::test::run_all(opts); |
| 96 | |
| 97 | fl_cleanup(); |
| 98 | return result; |
| 99 | } |
| 100 | |
| 101 | int fl_main(int argc, char** argv) { |
| 102 | #ifdef ENABLE_CRASH_HANDLER |
no test coverage detected