/* vim:set ts=2 sw=2 sts=2 et: */ /** * \author Marcus Holland-Moritz (github@mhxnet.de) * \copyright Copyright (c) Marcus Holland-Moritz * * This file is part of dwarfs. * * dwarfs is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * dwarfs is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with dwarfs. If not, see . */ #include #include #include #include #include #include #include #include #include #include #include #include "dwarfs/block_compressor.h" #include "dwarfs/builtin_script.h" #include "dwarfs/entry.h" #include "dwarfs/file_stat.h" #include "dwarfs/file_type.h" #include "dwarfs/filesystem_v2.h" #include "dwarfs/filesystem_writer.h" #include "dwarfs/filter_debug.h" #include "dwarfs/fs_section.h" #include "dwarfs/logger.h" #include "dwarfs/mmif.h" #include "dwarfs/options.h" #include "dwarfs/progress.h" #include "dwarfs/scanner.h" #include "dwarfs/segmenter_factory.h" #include "dwarfs/vfs_stat.h" #include "filter_test_data.h" #include "loremipsum.h" #include "mmap_mock.h" #include "test_helpers.h" #include "test_logger.h" using namespace dwarfs; namespace fs = std::filesystem; namespace { std::string const default_file_hash_algo{"xxh3-128"}; std::string build_dwarfs(logger& lgr, std::shared_ptr input, std::string const& compression, segmenter::config const& cfg = segmenter::config(), scanner_options const& options = scanner_options(), progress* prog = nullptr, std::shared_ptr