aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeandro Nunes <Leandro.Nunes@arm.com>2024-03-20 14:35:46 +0000
committerLeandro Nunes <Leandro.Nunes@arm.com>2024-05-22 12:22:00 +0100
commit359fac9c00aab8d29f7da6a060d36bcdaa491584 (patch)
tree523bc02505dd4fcaaa45f2be2d35a94529d23170
parent1afe51436f0daf351fa7be1d72bdc4a3b33ccbdf (diff)
downloadreference_model-359fac9c00aab8d29f7da6a060d36bcdaa491584.tar.gz
[ref model] Fix pre-commit test to run on linux and macOS
Adjust test_run_command_fail_with_stderr to test with `cat` rather than `ls`, as `ls` will return different error codes on linux(2) and macOS(1), and `cat` will provide same error code under both platforms. Change-Id: I7b178b8da5446e6610b0d5ecded82100be6963c7
-rw-r--r--verif/tests/test_tosa_run_tests_runshcmd.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/verif/tests/test_tosa_run_tests_runshcmd.py b/verif/tests/test_tosa_run_tests_runshcmd.py
index a765413..8d6ff97 100644
--- a/verif/tests/test_tosa_run_tests_runshcmd.py
+++ b/verif/tests/test_tosa_run_tests_runshcmd.py
@@ -30,12 +30,12 @@ def test_run_command_fail():
def test_run_command_fail_with_stderr():
"""Run unsuccessful command capturing output."""
- cmd = ["ls", "--unknown-option"]
+ cmd = ["cat", "--unknown-option"]
try:
stdout, stderr = run_sh_command(cmd, capture_output=True)
ok = True
except RunShCommandError as e:
- assert e.return_code == 2
+ assert e.return_code == 1
assert e.stderr
ok = False
assert not ok