summaryrefslogtreecommitdiffstats
path: root/Tests/CTestTestTimeout
diff options
context:
space:
mode:
authorZach Mullen <zach.mullen@kitware.com>2009-09-30 18:48:40 (GMT)
committerZach Mullen <zach.mullen@kitware.com>2009-09-30 18:48:40 (GMT)
commitcc8c4a3f4fdc92a40d0ae5def0a113f860d11a8f (patch)
treed9aee682360790f7ecae617d53be3615c950e707 /Tests/CTestTestTimeout
parent122c7f61795fbe4d12d44c4faf0e0536058178c8 (diff)
downloadCMake-cc8c4a3f4fdc92a40d0ae5def0a113f860d11a8f.zip
CMake-cc8c4a3f4fdc92a40d0ae5def0a113f860d11a8f.tar.gz
CMake-cc8c4a3f4fdc92a40d0ae5def0a113f860d11a8f.tar.bz2
Improved safety and removed busy waiting from the CTestTestTimeout test.
Diffstat (limited to 'Tests/CTestTestTimeout')
-rw-r--r--Tests/CTestTestTimeout/timeout.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/Tests/CTestTestTimeout/timeout.c b/Tests/CTestTestTimeout/timeout.c
index e30cf5a..559b6a5 100644
--- a/Tests/CTestTestTimeout/timeout.c
+++ b/Tests/CTestTestTimeout/timeout.c
@@ -1,10 +1,15 @@
-#include <stdio.h>
+#if defined(_WIN32)
+# include <windows.h>
+#else
+# include <unistd.h>
+#endif
-/* infinite loop */
int main(void)
{
- while(1)
- {
- }
- return 0;
+#if defined(_WIN32)
+ Sleep(5000);
+#else
+ sleep(5);
+#endif
+ return -1;
}