mirror of
https://github.com/mauiaaron/apple2.git
synced 2024-06-01 13:41:28 +00:00
Misc testing tweaks
This commit is contained in:
parent
596f767b9a
commit
14bb75a941
|
@ -31,17 +31,10 @@ void test_type_input_deterministically(const char *input) {
|
|||
}
|
||||
|
||||
void test_breakpoint(void *arg) {
|
||||
fprintf(GREATEST_STDOUT, "DISPLAY NOTE: busy-spinning in test_breakpoint(), needs gdb/lldb intervention to continue...\n");
|
||||
volatile bool debug_continue = false;
|
||||
while (!debug_continue) {
|
||||
struct timespec ts = { .tv_sec=0, .tv_nsec=33333333 };
|
||||
nanosleep(&ts, NULL);
|
||||
}
|
||||
fprintf(GREATEST_STDOUT, "OOPS set a breakpoint in test_breakpoint() to diagnose test failure...\n");
|
||||
}
|
||||
|
||||
void test_common_init(void) {
|
||||
GREATEST_SET_BREAKPOINT_CB(test_breakpoint, NULL);
|
||||
|
||||
#if __ANDROID__
|
||||
// tags help us wade through log soup
|
||||
#else
|
||||
|
@ -66,8 +59,7 @@ void test_common_init(void) {
|
|||
|
||||
c_debugger_set_watchpoint(WATCHPOINT_ADDR);
|
||||
|
||||
fprintf(stderr, "NOTE : RUNNING WITH DISPLAY\n");
|
||||
fprintf(stderr, "Will spinloop on failed tests for debugger intervention\n");
|
||||
fprintf(stderr, "Break in test_breakpoint() to catch and diagnose test failures...\n");
|
||||
c_debugger_set_timeout(0);
|
||||
}
|
||||
|
||||
|
|
|
@ -7411,6 +7411,7 @@ GREATEST_SUITE(test_suite_cpu) {
|
|||
|
||||
GREATEST_SET_SETUP_CB(testcpu_setup, NULL);
|
||||
GREATEST_SET_TEARDOWN_CB(testcpu_teardown, NULL);
|
||||
GREATEST_SET_BREAKPOINT_CB(test_breakpoint, NULL);
|
||||
|
||||
srandom(time(NULL));
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user