diff --git a/test/mip_tap_test.c b/test/mip_tap_test.c index 1b62b322..c54682af 100644 --- a/test/mip_tap_test.c +++ b/test/mip_tap_test.c @@ -65,15 +65,20 @@ static char *host_ip; static int s_num_tests = 0; -#define ABORT() \ - usleep(500000); /* 500 ms, GH print reason */ \ +#ifdef NO_SLEEP_ABORT +#define ABORT() abort() +#else +#define ABORT() \ + sleep(2); /* 2s, GH print reason */ \ abort(); +#endif #define ASSERT(expr) \ do { \ s_num_tests++; \ if (!(expr)) { \ printf("FAILURE %s:%d: %s\n", __FILE__, __LINE__, #expr); \ + fflush(stdout); \ ABORT(); \ } \ } while (0) diff --git a/test/mip_test.c b/test/mip_test.c index 32ca2d77..5acae37b 100644 --- a/test/mip_test.c +++ b/test/mip_test.c @@ -21,6 +21,7 @@ static int s_seg_sent = 0; s_num_tests++; \ if (!(expr)) { \ printf("FAILURE %s:%d: %s\n", __FILE__, __LINE__, #expr); \ + fflush(stdout); \ ABORT(); \ } \ } while (0) diff --git a/test/unit_test.c b/test/unit_test.c index 296e735d..895d6bc5 100644 --- a/test/unit_test.c +++ b/test/unit_test.c @@ -18,6 +18,7 @@ static int s_num_tests = 0; s_num_tests++; \ if (!(expr)) { \ printf("FAILURE %s:%d: %s\n", __FILE__, __LINE__, #expr); \ + fflush(stdout); \ ABORT(); \ } \ } while (0)