Initial commit.
[CMakeLuaTailorHgBridge.git] / CMakeLua / Source / kwsys / testFail.c
blobc9d62f48c9885f3007107a4d172e9db782ff64e9
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <string.h>
5 int testFail(int argc, char* argv[])
7 char* env = getenv("DASHBOARD_TEST_FROM_CTEST");
8 int oldCtest = 0;
9 if(env)
11 if(strcmp(env, "1") == 0)
13 oldCtest = 1;
15 printf("DASHBOARD_TEST_FROM_CTEST = %s\n", env);
17 printf("%s: This test intentionally fails\n", argv[0]);
18 if(oldCtest)
20 printf("The version of ctest is not able to handle intentionally failing tests, so pass.\n");
21 return 0;
23 return argc;