projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ce477f0
)
Avoid using unzip.exe for Windows tests, as it crashes quite a lot for some reason.
author
Carl Hetherington
<cth@carlh.net>
Mon, 15 Feb 2021 23:18:35 +0000
(
00:18
+0100)
committer
Carl Hetherington
<cth@carlh.net>
Mon, 15 Feb 2021 23:18:35 +0000
(
00:18
+0100)
test/zipper_test.cc
patch
|
blob
|
history
diff --git
a/test/zipper_test.cc
b/test/zipper_test.cc
index 1ec7ff80b9e74398fd13fc1af533542e3bfb29d2..c3f6ef7281140769220ab20489d190a44869942c 100644
(file)
--- a/
test/zipper_test.cc
+++ b/
test/zipper_test.cc
@@
-42,7
+42,15
@@
BOOST_AUTO_TEST_CASE (zipper_test1)
zipper.close ();
boost::filesystem::remove_all ("build/test/zipper_test1", ec);
zipper.close ();
boost::filesystem::remove_all ("build/test/zipper_test1", ec);
+#ifdef DCPOMATIC_WINDOWS
+ /* unzip on windows crashes every so often (with a return code -1073740940, for some reason)
+ * so try using the built-in tar which can unzip things.
+ */
+ boost::filesystem::create_directories ("build/test/zipper_test1");
+ int const r = system ("tar -xf build\\test\\zipped.zip -C build\\test\\zipper_test1");
+#else
int const r = system ("unzip build/test/zipped.zip -d build/test/zipper_test1");
int const r = system ("unzip build/test/zipped.zip -d build/test/zipper_test1");
+#endif
BOOST_REQUIRE_EQUAL (r, 0);
BOOST_CHECK_EQUAL (dcp::file_to_string("build/test/zipper_test1/foo.txt"), "1234567890");
BOOST_REQUIRE_EQUAL (r, 0);
BOOST_CHECK_EQUAL (dcp::file_to_string("build/test/zipper_test1/foo.txt"), "1234567890");