From e448022f2324b785fd2138c1ac5481cdd7e5d02c Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Mon, 9 Sep 2019 14:58:25 +0200 Subject: [PATCH] Fix hard-disk image creation in libc_fatfs The hard-disk image must be created before boot-image creation as it is used as boot module by variants of the test (use_ram_block=true). --- repos/libports/run/libc_filesystem_test.inc | 26 ++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/repos/libports/run/libc_filesystem_test.inc b/repos/libports/run/libc_filesystem_test.inc index 17b48fe2b0..fb2625b52c 100644 --- a/repos/libports/run/libc_filesystem_test.inc +++ b/repos/libports/run/libc_filesystem_test.inc @@ -129,6 +129,19 @@ append config { install_config $config +# +# Prepare hard-disk image for test (used by Qemu or in RAM) +# + +set disk_image "bin/test.hda" +set cmd "dd if=/dev/zero of=$disk_image bs=1024 count=65536" +puts "creating disk image: $cmd" +catch { exec sh -c $cmd } + +set cmd "$mkfs_cmd $mkfs_opts $disk_image" +puts "formating disk: $cmd" +catch { exec sh -c $cmd } + # # Boot modules # @@ -152,19 +165,6 @@ append_platform_drv_boot_modules build_boot_image $boot_modules -# -# Execute test case -# - -set disk_image "bin/test.hda" -set cmd "dd if=/dev/zero of=$disk_image bs=1024 count=65536" -puts "creating disk image: $cmd" -catch { exec sh -c $cmd } - -set cmd "$mkfs_cmd $mkfs_opts $disk_image" -puts "formating disk: $cmd" -catch { exec sh -c $cmd } - # # Qemu #