projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fe933eb
)
Do cleanup of a test more nicely.
author
Carl Hetherington
<cth@carlh.net>
Sun, 19 Jun 2022 21:01:10 +0000
(23:01 +0200)
committer
Carl Hetherington
<cth@carlh.net>
Tue, 21 Jun 2022 16:55:16 +0000
(18:55 +0200)
test/disk_writer_test.cc
patch
|
blob
|
history
diff --git
a/test/disk_writer_test.cc
b/test/disk_writer_test.cc
index 7b3778b671c7b9b9a930d18d3cf222df3e017147..7d1df487340cdf5cb2555ecab60e689c0d5f38ed 100644
(file)
--- a/
test/disk_writer_test.cc
+++ b/
test/disk_writer_test.cc
@@
-69,13
+69,14
@@
BOOST_AUTO_TEST_CASE (disk_writer_test1)
using namespace boost::filesystem;
using namespace boost::process;
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";
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.
*/
/* 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.
*/
@@
-124,6
+125,8
@@
BOOST_AUTO_TEST_CASE (disk_writer_test1)
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");
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();
}
}