Add expression test runner to Bazel (#1464)
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#ifdef CI_BUILD
|
||||
#include <chrono>
|
||||
#include <thread>
|
||||
#include <iostream>
|
||||
#endif
|
||||
|
||||
#include <GL/glx.h>
|
||||
@@ -31,7 +32,7 @@ public:
|
||||
|
||||
#ifdef CI_BUILD
|
||||
// XOpenDisplay has proven very unreliable on CI, perform some retries if it fails
|
||||
constexpr auto CI_RETRIES = 10;
|
||||
constexpr auto CI_RETRIES = 20;
|
||||
for (int i = 0; i < CI_RETRIES; i++) {
|
||||
#endif
|
||||
xDisplay = XOpenDisplay(nullptr);
|
||||
@@ -39,7 +40,8 @@ public:
|
||||
if (xDisplay != nullptr) {
|
||||
break;
|
||||
}
|
||||
Log::Debug(Event::OpenGL, "[CI] Failed to open X display, retrying...");
|
||||
// std::cerr is used because the tests expect logging to be deterministic
|
||||
std::cerr << "[CI] Failed to open X display, retrying..." << std::endl;
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user