summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2023-07-26 17:08:27 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2023-07-26 17:08:27 (GMT)
commit830a4b37aa3e301761dbf94407ce5896a2cf6c88 (patch)
tree79010accf508d0f6f549e0d6b0b2485391390883 /Tests
parent8129bf85edea4ab6646b14687134b5a7dc5b23a5 (diff)
downloadCMake-830a4b37aa3e301761dbf94407ce5896a2cf6c88.zip
CMake-830a4b37aa3e301761dbf94407ce5896a2cf6c88.tar.gz
CMake-830a4b37aa3e301761dbf94407ce5896a2cf6c88.tar.bz2
cmUVProcessChain::Wait(): Treat timeout of 0 as no timeout
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CMakeLib/testUVProcessChain.cxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/Tests/CMakeLib/testUVProcessChain.cxx b/Tests/CMakeLib/testUVProcessChain.cxx
index 7630aa0..22373ef 100644
--- a/Tests/CMakeLib/testUVProcessChain.cxx
+++ b/Tests/CMakeLib/testUVProcessChain.cxx
@@ -652,6 +652,20 @@ bool testUVProcessChainInputFile(const char* helperCommand)
return true;
}
+bool testUVProcessChainWait0(const char* helperCommand)
+{
+ cmUVProcessChainBuilder builder;
+ builder.AddCommand({ helperCommand, "echo" });
+
+ auto chain = builder.Start();
+ if (!chain.Wait(0)) {
+ std::cout << "Wait(0) returned false, should be true" << std::endl;
+ return false;
+ }
+
+ return true;
+}
+
int testUVProcessChain(int argc, char** const argv)
{
if (argc < 2) {
@@ -699,5 +713,10 @@ int testUVProcessChain(int argc, char** const argv)
return -1;
}
+ if (!testUVProcessChainWait0(argv[1])) {
+ std::cout << "While executing testUVProcessChainWait0().\n";
+ return -1;
+ }
+
return 0;
}