summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-02-16 00:18:35 +0100
committerCarl Hetherington <cth@carlh.net>2021-02-16 00:18:35 +0100
commit39d51cddeeea82e602ab1925430b0dfb5752ac79 (patch)
tree3403aef3c3b235a019180fb6a98e7d9d9d56e493
parentce477f002d52a6f52aeb7cc95f82ac7dd03328fb (diff)
Avoid using unzip.exe for Windows tests, as it crashes quite a lot for some reason.
-rw-r--r--test/zipper_test.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/zipper_test.cc b/test/zipper_test.cc
index 1ec7ff80b..c3f6ef728 100644
--- 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);
+#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");
+#endif
BOOST_REQUIRE_EQUAL (r, 0);
BOOST_CHECK_EQUAL (dcp::file_to_string("build/test/zipper_test1/foo.txt"), "1234567890");