| 45 | static double g_timeout_seconds = 20.0; |
| 46 | |
| 47 | static void alarm_handler(int) FL_NOEXCEPT { |
| 48 | if (!g_active) { |
| 49 | return; |
| 50 | } |
| 51 | |
| 52 | fprintf(stderr, "\n"); |
| 53 | fprintf(stderr, "================================================================================\n"); |
| 54 | fprintf(stderr, "RUNNER WATCHDOG TIMEOUT\n"); |
| 55 | fprintf(stderr, "================================================================================\n"); |
| 56 | fprintf(stderr, "Test exceeded runner timeout of %.1f seconds\n", g_timeout_seconds); |
| 57 | fprintf(stderr, "Dumping stack trace...\n"); |
| 58 | fprintf(stderr, "================================================================================\n"); |
| 59 | fprintf(stderr, "\n"); |
| 60 | |
| 61 | runner_print_stacktrace(); |
| 62 | |
| 63 | fprintf(stderr, "\n"); |
| 64 | fprintf(stderr, "================================================================================\n"); |
| 65 | fprintf(stderr, "END RUNNER WATCHDOG\n"); |
| 66 | fprintf(stderr, "Exiting with code 1\n"); |
| 67 | fprintf(stderr, "================================================================================\n"); |
| 68 | fprintf(stderr, "\n"); |
| 69 | |
| 70 | _exit(1); |
| 71 | } |
| 72 | |
| 73 | static void setup(double timeout_seconds = 20.0) FL_NOEXCEPT { |
| 74 | const char* disable_env = getenv("FASTLED_DISABLE_TIMEOUT_WATCHDOG"); |
nothing calls this directly
no test coverage detected