File tree 1 file changed +22
-1
lines changed
1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change 18
18
#include <stdlib.h>
19
19
#include <string.h>
20
20
21
+ #if defined(_WIN32 )
22
+ #include <windows.h>
23
+
24
+ #include <crtdbg.h>
25
+ #endif /* _WIN32 */
26
+
21
27
#include "jerryscript-port.h"
22
28
#include "jerryscript.h"
23
29
@@ -115,7 +121,22 @@ main (int argc, char **argv)
115
121
116
122
main_args_t arguments ;
117
123
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 */
119
140
if (!main_parse_args (argc , argv , & arguments ))
120
141
{
121
142
return arguments .parse_result ;
You can’t perform that action at this time.
0 commit comments