glfw: window open test is optional (cannot open windows on CI)

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2021-07-18 15:19:27 -07:00
parent 3627edfbba
commit b5d1ebd1cd
2 changed files with 5 additions and 2 deletions

View file

@ -126,7 +126,10 @@ pub fn basicTest() !void {
c.glfwWindowHint(c.GLFW_VISIBLE, c.GLFW_FALSE); c.glfwWindowHint(c.GLFW_VISIBLE, c.GLFW_FALSE);
const window = c.glfwCreateWindow(640, 480, "GLFW example", null, null); const window = c.glfwCreateWindow(640, 480, "GLFW example", null, null);
if (window == null) { if (window == null) {
@panic("failed to create window"); // return without fail, because most of our CI environments are headless / we cannot open
// windows on them.
std.debug.print("note: failed to create window", .{});
return;
} }
var start = std.time.milliTimestamp(); var start = std.time.milliTimestamp();