tools: fix generate-test-case script

Commit 8dd4554491 introduced a bug because
the output from osbuild is not captured. The problem is that osbuild
itself writes JSON document to STDOUT so two different JSON documents
are written to STDOUT: osbuild output and generated test case. The
generate-test-cases script then fails because it cannot json.loads() the
test case.

This patch simply supresses the output which fixes the issue.
This commit is contained in:
Martin Sehnoutka 2020-06-05 11:24:27 +02:00 committed by Ondřej Budai
parent 14a3f2a9d3
commit 1f580738db

View file

@ -41,9 +41,10 @@ def run_osbuild(manifest, store, output):
"--store", store,
"--output-directory", output,
"--json", "-"],
check=True,
encoding="utf-8",
input=json.dumps(manifest))
stdout=subprocess.DEVNULL,
check=True,
encoding="utf-8",
input=json.dumps(manifest))
def main(test_case, store):