File: tests-Pass-c-k-options-to-zstd-too.patch

package info (click to toggle)
bmap-tools 3.6-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 936 kB
  • sloc: python: 5,078; sh: 117; makefile: 8
file content (32 lines) | stat: -rw-r--r-- 1,441 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From: Simon McVittie <smcv@debian.org>
Date: Thu, 28 Oct 2021 11:16:39 +0100
Subject: tests: Pass -c -k options to zstd, too

Otherwise we get interactive prompts during testing, like this:

    zstd: /*stdin*\: unexpected end of file
    zstd: /*stdin*\: unexpected end of file
    zstd: /*stdin*\: unexpected end of file
    zstd: /*stdin*\: unexpected end of file
    zstd: .../.pybuild/cpython3_3.9/build/4Khole_idts5mgb.img.zst already exists; overwrite (y/n) ?

Signed-off-by: Simon McVittie <smcv@debian.org>
Forwarded: https://github.com/intel/bmap-tools/pull/88
Applied-upstream: 3.7, commit:18f21738a89a30b335421dc1292bde81e56853de
---
 tests/test_api_base.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/test_api_base.py b/tests/test_api_base.py
index 11adeaa..39b83fa 100644
--- a/tests/test_api_base.py
+++ b/tests/test_api_base.py
@@ -91,7 +91,7 @@ def _generate_compressed_files(file_path, delete=True):
                    ("xz",     None, ".xz",    "-c -k"),
                    ("lzop",   None, ".lzo",   "-c -k"),
                    ("lz4",    None, ".lz4",   "-c -k"),
-                   ("zstd",   None, ".zst",   ""),
+                   ("zstd",   None, ".zst",   "-c -k"),
                    # The "-P -C /" trick is used to avoid silly warnings:
                    # "tar: Removing leading `/' from member names"
                    ("bzip2", "tar", ".tar.bz2", "-c -j -O -P -C /"),