diff options
author | Sven Göthel <[email protected]> | 2024-04-30 11:57:13 +0200 |
---|---|---|
committer | Sven Göthel <[email protected]> | 2024-04-30 11:57:13 +0200 |
commit | fbb8e8b51e6a47f47064e357a51f9b3340330caa (patch) | |
tree | 0a9b1c68671e9ad06e73b860e42ebc1cf0aa6d92 /test/testsudo_fileutils02.cpp | |
parent | 056b6a35a30b492577be755c5136f38733ca6277 (diff) |
file_util: Add absolute() and isAbsolute(), make test_fileutils* more robust using test-exe-path -> test_data dir
Diffstat (limited to 'test/testsudo_fileutils02.cpp')
-rw-r--r-- | test/testsudo_fileutils02.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/test/testsudo_fileutils02.cpp b/test/testsudo_fileutils02.cpp index 4e4833f..19d80b9 100644 --- a/test/testsudo_fileutils02.cpp +++ b/test/testsudo_fileutils02.cpp @@ -323,11 +323,10 @@ class TestFileUtil02 : TestFileUtilBase { REQUIRE( user_id == ::geteuid() ); { - std::string image_file = root + ".sqfs"; - jau::fs::file_stats image_stats(image_file); + jau::fs::file_stats image_stats = getTestDataImageFile(executable_path); REQUIRE( true == image_stats.exists() ); - const std::string mount_point = root+"_mount"; + const std::string mount_point = temp_root+"_mount"; jau::fs::remove(mount_point, jau::fs::traverse_options::recursive); // start fresh REQUIRE( true == jau::fs::mkdir(mount_point, jau::fs::fmode_t::def_dir_prot) ); @@ -354,7 +353,7 @@ class TestFileUtil02 : TestFileUtilBase { jau::fs::copy_options::preserve_all | jau::fs::copy_options::sync | jau::fs::copy_options::verbose; - const std::string root_copy = root+"_copy_test50"; + const std::string root_copy = temp_root+"_copy_test50"; jau::fs::remove(root_copy, jau::fs::traverse_options::recursive); testxx_copy_r_p("test50_mount_copy_r_p", mount_point, 1 /* source_added_dead_links */, root_copy, copts, false /* dest_is_vfat */); REQUIRE( true == jau::fs::remove(root_copy, jau::fs::traverse_options::recursive) ); |