From c74cc928799fcc1909c873a8d414891ebc61b83e Mon Sep 17 00:00:00 2001 From: Mike Solar Date: Sun, 7 Jun 2026 16:23:48 +0800 Subject: [PATCH] Set default OCIO config for gtests --- tests/gtest/main.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/gtest/main.cpp b/tests/gtest/main.cpp index 0bf0dbde7..bbff6102d 100644 --- a/tests/gtest/main.cpp +++ b/tests/gtest/main.cpp @@ -1,8 +1,17 @@ #include +#include +#include #include int main(int argc, char **argv) { + Q_INIT_RESOURCE(ocioconf); + if (qEnvironmentVariableIsEmpty("OCIO")) { + qputenv("OCIO", QFile::encodeName( + QDir(QStringLiteral(OAK_TEST_SOURCE_DIR)) + .filePath(QStringLiteral( + "app/render/ocioconf/config.ocio")))); + } QApplication app(argc, argv); ::testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS();