projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ae01c1e
)
Don't crash immediately if there's no private data.
author
Carl Hetherington
<cth@carlh.net>
Tue, 21 Mar 2023 11:24:20 +0000
(12:24 +0100)
committer
Carl Hetherington
<cth@carlh.net>
Wed, 22 Mar 2023 22:37:51 +0000
(23:37 +0100)
test/test.cc
patch
|
blob
|
history
diff --git
a/test/test.cc
b/test/test.cc
index 9d444e5cbb46bb9c974bd24243b824ceec630044..c91701e558ce1302c4fd32c60d54848c780f674d 100644
(file)
--- a/
test/test.cc
+++ b/
test/test.cc
@@
-94,7
+94,13
@@
TestPaths::TestPaths::private_data ()
return boost::filesystem::path(env);
}
return boost::filesystem::path(env);
}
- return boost::filesystem::canonical(boost::filesystem::path ("..") / boost::filesystem::path ("dcpomatic-test-private"));
+ auto relative = boost::filesystem::path ("..") / boost::filesystem::path ("dcpomatic-test-private");
+ if (!boost::filesystem::exists(relative)) {
+ std::cerr << "No private test data found! Tests may fail.\n";
+ return relative;
+ }
+
+ return boost::filesystem::canonical(relative);
}
}