MCPcopy Create free account
hub / github.com/FastLED/FastLED / fl_run_tests

Function fl_run_tests

tests/doctest_main.cpp:73–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71}
72
73int 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
101int fl_main(int argc, char** argv) {
102#ifdef ENABLE_CRASH_HANDLER

Callers 1

run_testsFunction · 0.85

Calls 4

enableAllDriversFunction · 0.85
run_allFunction · 0.85
fl_cleanupFunction · 0.85
parse_argsFunction · 0.50

Tested by

no test coverage detected