Skip to content

Commit

Permalink
tools: update to sh version 2
Browse files Browse the repository at this point in the history
The return value is now [a string by default][1]--unless one passes
`_return_cmd=True` to opt-in to the old behaviour.  Do so.

[1]: https://github.com/amoffat/sh/blob/develop/MIGRATION.md#return-value-now-a-true-string

Signed-off-by: FireFly <[email protected]>
  • Loading branch information
FireyFly committed May 7, 2024
1 parent e3df782 commit aa47caa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion common.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def _init_build_directory(config, initialised, directory, tute_directory, output
tute_dir = "-DTUTORIAL_DIR=" + os.path.basename(tute_directory)
args = ['-G', 'Ninja'] + config_dict[config] + [tute_dir] + \
["-C", "../projects/sel4-tutorials/settings.cmake"]
return sh.cmake(args + [tute_directory], _cwd=directory, _out=output, _err=output)
return sh.cmake(args + [tute_directory], _cwd=directory, _out=output, _err=output, _return_cmd=True)


def _init_tute_directory(config, tut, solution, task, directory, output=None):
Expand Down
4 changes: 2 additions & 2 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ def run_single_test_iteration(build_dir, solution, logfile):

check = sh.Command(os.path.join(build_dir, "check"))
if solution:
result = check(_out=logfile, _cwd=build_dir)
result = check(_out=logfile, _cwd=build_dir, _return_cmd=True)
else:
# We check the start state if not solution
result = check("--start", _out=logfile, _cwd=build_dir)
result = check("--start", _out=logfile, _cwd=build_dir, _return_cmd=True)
for proc in psutil.process_iter():
if "qemu" in proc.name():
proc.kill()
Expand Down

0 comments on commit aa47caa

Please sign in to comment.