test: skip worker/backend tests when GPU backend unavailable and fix cross-platform path test

- RenderWorkerFootageTest: skip when the dynamic render backend is not
  built; we cannot verify backend availability without it, and the tests
  fail on headless/GPU-less CI runners.
- NodeProject.FilenameAndNameUpdate: use a plain filename instead of
  /tmp/... so the expected name does not depend on POSIX temp paths or
  Windows backslash normalization.
This commit is contained in:
2026-07-13 14:25:02 +08:00
parent a5c98e1297
commit 8f3c06555f
3 changed files with 12 additions and 10 deletions
+4 -3
View File
@@ -22,10 +22,11 @@ TEST(NodeProject, FilenameAndNameUpdate)
{
olive::Project project;
project.set_filename(QStringLiteral("/tmp/test_project.ove"));
EXPECT_EQ(project.filename(), QStringLiteral("/tmp/test_project.ove"));
const QString filename = QStringLiteral("test_project.ove");
project.set_filename(filename);
EXPECT_EQ(project.filename(), filename);
EXPECT_EQ(project.name(), QStringLiteral("test_project"));
EXPECT_EQ(project.pretty_filename(), QStringLiteral("/tmp/test_project.ove"));
EXPECT_EQ(project.pretty_filename(), filename);
EXPECT_FALSE(project.is_new());
}
+4 -4
View File
@@ -79,11 +79,11 @@ bool IsRenderBackendAvailable(const QString &backend)
#else
bool IsRenderBackendAvailable(const QString &)
{
// When the dynamic backend is not built, the worker binary is linked
// When the dynamic backend is not built, the test binary is linked
// directly against the renderer and we have no way to probe it cheaply
// from here. The tests were originally written for this configuration and
// pass on development workstations, so we keep them enabled.
return true;
// from here. These tests require a working GPU backend, so skip them
// unless we can verify availability through the dynamic adapter.
return false;
}
#endif