]> granicus.if.org Git - libevent/commitdiff
regress: add EVENT_NO_FILE_BUFFERING, to disable buffering for stdout/stderr
authorAzat Khuzhin <a3at.mail@gmail.com>
Tue, 13 Nov 2018 06:25:13 +0000 (09:25 +0300)
committerAzat Khuzhin <a3at.mail@gmail.com>
Tue, 13 Nov 2018 19:25:13 +0000 (22:25 +0300)
Useful for win32

test/regress_main.c

index a5fda7c5f50c0b73e0d98bdb6f8b24ffd53a8518..d3c6c3cee3725326e0e767de184b4b71357981f4 100644 (file)
@@ -455,6 +455,11 @@ main(int argc, const char **argv)
 
        evutil_weakrand_seed_(&test_weakrand_state, 0);
 
+       if (getenv("EVENT_NO_FILE_BUFFERING")) {
+               setbuf(stdout, NULL);
+               setbuf(stderr, NULL);
+       }
+
        if (tinytest_main(argc,argv,testgroups))
                return 1;