test/run: uncompressed raw images before running image-info
Signed-off-by: Tom Gundersen <teg@jklm.no>
This commit is contained in:
parent
e62ba4577a
commit
0217b4b590
1 changed files with 5 additions and 0 deletions
5
test/run
5
test/run
|
|
@ -126,6 +126,11 @@ def run_test(case, store):
|
|||
else:
|
||||
filename, _ = urllib.request.urlretrieve(case["url"])
|
||||
|
||||
fn, ex = os.path.splitext(filename)
|
||||
if ex == ".xz":
|
||||
with open(fn, "w") as f:
|
||||
subprocess.run(["xz", "--decompress", "--stdout", filename], stdout=f)
|
||||
filename = fn
|
||||
info = json.loads(subprocess.check_output(["tools/image-info", filename]))
|
||||
if info != case["expected"]:
|
||||
with temporary_json_file(case["expected"]) as a, temporary_json_file(info) as b:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue