Add expression test runner to Bazel (#1464)

This commit is contained in:
Bart Louwers
2023-08-05 09:48:15 +02:00
committed by GitHub
parent 3c57d37ef2
commit 15bf44da97
12 changed files with 68 additions and 43 deletions

View File

@@ -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