File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change 1818#include <stdlib.h>
1919#include <string.h>
2020
21+ #if defined(_WIN32 )
22+ #include <windows.h>
23+
24+ #include <crtdbg.h>
25+ #endif /* _WIN32 */
26+
2127#include "jerryscript-port.h"
2228#include "jerryscript.h"
2329
@@ -115,7 +121,22 @@ main (int argc, char **argv)
115121
116122 main_args_t arguments ;
117123 arguments .sources_p = sources_p ;
118-
124+ #if defined(_WIN32 )
125+ if (!IsDebuggerPresent ())
126+ {
127+ /* Disable all of the possible ways Windows conspires to make automated
128+ testing impossible. */
129+ #if defined(_MSC_VER )
130+ _set_error_mode (_OUT_TO_STDERR );
131+ _CrtSetReportMode (_CRT_WARN , _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG );
132+ _CrtSetReportFile (_CRT_WARN , _CRTDBG_FILE_STDERR );
133+ _CrtSetReportMode (_CRT_ERROR , _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG );
134+ _CrtSetReportFile (_CRT_ERROR , _CRTDBG_FILE_STDERR );
135+ _CrtSetReportMode (_CRT_ASSERT , _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG );
136+ _CrtSetReportFile (_CRT_ASSERT , _CRTDBG_FILE_STDERR );
137+ #endif /* _MSC_VER */
138+ }
139+ #endif /* _WIN32 */
119140 if (!main_parse_args (argc , argv , & arguments ))
120141 {
121142 return arguments .parse_result ;
You can’t perform that action at this time.
0 commit comments