瀏覽代碼

AppVeyor/MinGW: Try to debug CI build

bel 8 年之前
父節點
當前提交
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
 }