summaryrefslogtreecommitdiffstats
path: root/Tests/BuildDepends/Project
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-06-13 20:26:50 (GMT)
committerAlexander Neundorf <neundorf@kde.org>2007-06-13 20:26:50 (GMT)
commit92270d5bf8ea8cdf4db7cb5db12e32c7af1fe2fb (patch)
tree934c8f319a04adb80fa1083b5184cd4c9169a22b /Tests/BuildDepends/Project
parent698ca6e9566aeb6bd324982f93dc8b2fae308a1e (diff)
downloadCMake-92270d5bf8ea8cdf4db7cb5db12e32c7af1fe2fb.zip
CMake-92270d5bf8ea8cdf4db7cb5db12e32c7af1fe2fb.tar.gz
CMake-92270d5bf8ea8cdf4db7cb5db12e32c7af1fe2fb.tar.bz2
COMP: fix test, in some cases stdout from bar was not captured correctly,
probably because the process was killed before the fflush() worked because the busy loop blocked the processor (failing midworld test) Alex
Diffstat (limited to 'Tests/BuildDepends/Project')
-rw-r--r--Tests/BuildDepends/Project/bar.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/Tests/BuildDepends/Project/bar.cxx b/Tests/BuildDepends/Project/bar.cxx
index 76e934f..25d8bd2 100644
--- a/Tests/BuildDepends/Project/bar.cxx
+++ b/Tests/BuildDepends/Project/bar.cxx
@@ -3,7 +3,7 @@
#include <regen.h>
#include <noregen.h>
-int main()
+int main(int argc, char** argv)
{
/* Make sure the noregen header was not regenerated. */
if(strcmp("foo", noregen_string) != 0)
@@ -15,6 +15,11 @@ int main()
/* Print out the string that should have been regenerated. */
printf("%s\n", regen_string);
fflush(stdout);
- for(;;);
+ // if any argument is used, wait forever
+ if (argc>1)
+ {
+ // wait that we get killed...
+ for(;;);
+ }
return 0;
}