Skip to content

Commit

Permalink
test: mkdwarfs with different --progress and --log-level options
Browse files Browse the repository at this point in the history
But not on Windows, because subprocesses suck on Windows.
  • Loading branch information
mhx committed Dec 22, 2023
1 parent 6f7c71a commit 2f83c20
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions test/dwarfs_tools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,26 @@ TEST_P(tools_test, end_to_end) {
ASSERT_TRUE(fs::exists(image));
ASSERT_GT(fs::file_size(image), 1000);

#ifndef _WIN32
{
auto image2 = td / "test2.dwarfs";

ASSERT_TRUE(subprocess::check_run(
*mkdwarfs_test_bin, mkdwarfs_tool_arg, "-i", fsdata_dir, "-o", image2,
"--progress=simple", "--log-level=debug"));

ASSERT_TRUE(fs::exists(image2));
ASSERT_GT(fs::file_size(image2), 1000);

ASSERT_TRUE(subprocess::check_run(
*mkdwarfs_test_bin, mkdwarfs_tool_arg, "-i", fsdata_dir, "-o", image2,
"--progress=ascii", "--log-level=trace", "--force"));

ASSERT_TRUE(fs::exists(image2));
ASSERT_GT(fs::file_size(image2), 1000);
}
#endif

ASSERT_TRUE(subprocess::check_run(
*mkdwarfs_test_bin, mkdwarfs_tool_arg, "-i", image, "-o", image_hdr,
"--no-progress", "--recompress=none", "--header", header_data));
Expand Down Expand Up @@ -1195,7 +1215,12 @@ TEST_P(tools_test, categorize) {
fsdata_dir.string(),
"-o",
image.string(),
#ifdef _WIN32
"--no-progress",
#else
"--progress=ascii",
"--log-level=verbose",
#endif
"--categorize",
"-S",
"16",
Expand Down

0 comments on commit 2f83c20

Please sign in to comment.