summaryrefslogtreecommitdiff
path: root/test/fs/CMakeLists.txt
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2016-12-25 16:19:12 +0100
committerFelix Morgner <felix.morgner@gmail.com>2016-12-25 16:19:12 +0100
commite1d780910569abd7019b7aa40d94fbfe6a42d398 (patch)
tree8eb492234d3638168153aea25689b9a89b63ee3c /test/fs/CMakeLists.txt
parent6b6c50c740954e10d1d50f4b1ae69aac4b1c9599 (diff)
downloadextfs-e1d780910569abd7019b7aa40d94fbfe6a42d398.tar.xz
extfs-e1d780910569abd7019b7aa40d94fbfe6a42d398.zip
extfs: Add exisiting image construction tests
Diffstat (limited to 'test/fs/CMakeLists.txt')
-rw-r--r--test/fs/CMakeLists.txt25
1 files changed, 24 insertions, 1 deletions
diff --git a/test/fs/CMakeLists.txt b/test/fs/CMakeLists.txt
index b1ccc1b..bfd593e 100644
--- a/test/fs/CMakeLists.txt
+++ b/test/fs/CMakeLists.txt
@@ -1,3 +1,26 @@
set(CUTE_GROUP "fs")
-cute_test(extfs LIBRARIES extfs)
+file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/test/extfs_data")
+message(STATUS "Creating test disk images")
+execute_process(
+ COMMAND dd if=/dev/zero of=${CMAKE_BINARY_DIR}/test/extfs_data/labeled.img bs=1M count=1
+ OUTPUT_QUIET
+ ERROR_QUIET
+ )
+execute_process(
+ COMMAND mkfs.ext2 -L labeleddisk ${CMAKE_BINARY_DIR}/test/extfs_data/labeled.img
+ OUTPUT_QUIET
+ ERROR_QUIET
+ )
+execute_process(
+ COMMAND dd if=/dev/zero of=${CMAKE_BINARY_DIR}/test/extfs_data/unlabeled.img bs=1M count=1
+ OUTPUT_QUIET
+ ERROR_QUIET
+ )
+execute_process(
+ COMMAND mkfs.ext2 ${CMAKE_BINARY_DIR}/test/extfs_data/unlabeled.img
+ OUTPUT_QUIET
+ ERROR_QUIET
+ )
+
+cute_test(extfs LIBRARIES extfs stdc++fs)