test: make OSBuild.compile return the result
Load the result data as json and return it to the caller.
This commit is contained in:
parent
c298d31ba0
commit
19f9fb02bf
1 changed files with 4 additions and 0 deletions
|
|
@ -279,6 +279,8 @@ class OSBuild(contextlib.AbstractContextManager):
|
|||
The produced artifact (if any) is stored in the directory passed via
|
||||
the output_dir parameter. If it's set to None, a temporary directory
|
||||
is used and thus the caller cannot access the built artifact.
|
||||
|
||||
Returns the build result as dictionary.
|
||||
"""
|
||||
|
||||
if output_dir is None:
|
||||
|
|
@ -319,6 +321,8 @@ class OSBuild(contextlib.AbstractContextManager):
|
|||
self._print_result(p.returncode, data_stdout, data_stderr)
|
||||
self._unittest.assertEqual(p.returncode, 0)
|
||||
|
||||
return json.loads(data_stdout)
|
||||
|
||||
def compile_file(self, file_stdin, output_dir=None, checkpoints=None):
|
||||
"""Compile an Artifact
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue