summaryrefslogtreecommitdiff
path: root/tests/actions/test/src/run_timeout.cpp
diff options
context:
space:
mode:
authorruki <[email protected]>2023-12-28 18:52:35 +0800
committerGitHub <[email protected]>2023-12-28 18:52:35 +0800
commitda3b723be857e3a2fe4e229265caf6246db1f0dd (patch)
treec330648539432dcfd2df6e7582b789aaba74c272 /tests/actions/test/src/run_timeout.cpp
parentc68263277c8c25f5fe3a9bed275e09a96372d0a7 (diff)
parent945fa0908fbfed1f83020658e6fd9791bbc569b0 (diff)
Merge pull request #4545 from xmake-io/tests
Support to wait timeout for `xmake test`
Diffstat (limited to 'tests/actions/test/src/run_timeout.cpp')
-rw-r--r--tests/actions/test/src/run_timeout.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/actions/test/src/run_timeout.cpp b/tests/actions/test/src/run_timeout.cpp
new file mode 100644
index 000000000..b4746403f
--- /dev/null
+++ b/tests/actions/test/src/run_timeout.cpp
@@ -0,0 +1,14 @@
+#ifdef _MSC_VER
+# include <windows.h>
+#else
+# include <unistd.h>
+#endif
+
+int main(int argc, char** argv) {
+#ifdef _MSC_VER
+ Sleep(10 * 1000);
+#else
+ usleep(10 * 100 * 1000);
+#endif
+ return 0;
+}