using namespace boost::filesystem;
using namespace boost::process;
- remove_all ("build/test/disk_writer_test1.disk");
- remove_all ("build/test/disk_writer_test1.partition");
- remove_all ("build/test/disk_writer_test1");
+ Cleanup cl;
path disk = "build/test/disk_writer_test1.disk";
path partition = "build/test/disk_writer_test1.partition";
+ cl.add(disk);
+ cl.add(partition);
+
/* lwext4 has a lower limit of correct ext2 partition sizes it can make; 32Mb
* does not work here: fsck gives errors about an incorrect free blocks count.
*/
/* Some arbitrary file size here */
make_random_file (dcp / "foo", 1024 * 1024 * 32 - 6128);
- dcpomatic::write (dcp, disk.string(), partition.string(), 0);
+ dcpomatic::write (dcp, disk.string(), partition.string(), nullptr);
BOOST_CHECK_EQUAL (system("/sbin/e2fsck -fn build/test/disk_writer_test1.partition"), 0);
system ("e2cp " + partition.string() + ":disk_writer_test1/foo build/test/disk_writer_test1_foo_back");
check_file ("build/test/disk_writer_test1/foo", "build/test/disk_writer_test1_foo_back");
+
+ cl.run();
}
make_random_file(partition, 4LL * 1024LL * 1024LL * 1024LL);
auto const dcp = TestPaths::private_data() / "xm";
- dcpomatic::write(dcp, disk.string(), partition.string(), 0);
+ dcpomatic::write(dcp, disk.string(), partition.string(), nullptr);
BOOST_CHECK_EQUAL(system("/sbin/e2fsck -fn build/test/disk_writer_test2.partition"), 0);