Просмотр исходного кода

AppVeyor/MinGW: Try to debug CI build

bel 8 лет назад
Родитель
Сommit
18a8b91ad3
1 измененных файлов с 20 добавлено и 0 удалено
  1. 20 0
      test/timertest.c

+ 20 - 0
test/timertest.c

@@ -49,6 +49,15 @@ static int action_dec_ret;
 static int
 action_dec(void *arg)
 {
+#if defined(__MINGW32__)
+    /* Try to find "***Exception: SegFault" that occurs only with MinGW builds 
+     * on AppVeyor/Windows, not with gcc/Linux and not MinGW/local.
+    https://ci.appveyor.com/project/civetweb/civetweb/build/job/epsqi8perbca1jd6
+    https://github.com/civetweb/civetweb/issues/366#issuecomment-269383810
+    */
+    (void)arg;
+    return 0;
+#else
 	int *p = (int *)arg;
 	(*p)--;
 
@@ -58,12 +67,22 @@ action_dec(void *arg)
 	}
 
 	return (*p >= -3) ? action_dec_ret : 0;
+#endif
 }
 
 
 static int
 action_dec_to_0(void *arg)
 {
+#if defined(__MINGW32__)
+    /* Try to find "***Exception: SegFault" that occurs only with MinGW builds 
+     * on AppVeyor/Windows, not with gcc/Linux and not MinGW/local.
+    https://ci.appveyor.com/project/civetweb/civetweb/build/job/epsqi8perbca1jd6
+    https://github.com/civetweb/civetweb/issues/366#issuecomment-269383810
+    */
+    (void)arg;
+    return 0;
+#else
 	int *p = (int *)arg;
 	(*p)--;
 
@@ -73,6 +92,7 @@ action_dec_to_0(void *arg)
 	}
 
 	return (*p > 0);
+#endif
 }