File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 22#include < cstdio>
33#include < iostream>
44#include < thread>
5+ #include < filesystem>
56
67#ifdef WIN32
78#include < Windows.h>
@@ -31,6 +32,8 @@ int main(int argc, char* argv[])
3132 return 0 ;
3233 }
3334
35+ std::remove (" hl_test_success" );
36+
3437#ifdef WIN32
3538 auto result = (void *)LoadLibrary (" hl_test_hostd.dll" );
3639#else
@@ -43,5 +46,17 @@ int main(int argc, char* argv[])
4346 return 1 ;
4447 }
4548
46- std::cin.ignore ();
49+ int elapsedTime = 0 ;
50+ while (elapsedTime++ < 200 )
51+ {
52+ std::this_thread::sleep_for (std::chrono::milliseconds (10 ));
53+ if (std::filesystem::exists (" hl_test_success" ))
54+ {
55+ std::remove (" hl_test_success" );
56+ return 0 ;
57+ }
58+ }
59+
60+ printf (" Timed out while waiting for tests to finish.\n " );
61+ return 1 ;
4762}
Original file line number Diff line number Diff line change 1717#include < stdexcept>
1818#include < thread>
1919#include < algorithm>
20+ #include < fstream>
2021
2122
2223#define HL_ASSERT (cond, format, ...) \
@@ -599,6 +600,7 @@ class TestMain : public hl::Main
599600 HL_TEST (TestVEH);
600601
601602 HL_LOG_RAW (" ==========\n Tests finished successfully.\n " );
603+ std::ofstream successFile (" hl_test_success" );
602604 return false ;
603605 }
604606};
You can’t perform that action at this time.
0 commit comments