From bfbcfd904592a2f61e11a12eec281102230281d6 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 11 Mar 2021 00:07:24 -0500 Subject: [PATCH] run_tests: fix exit code handling We need to pass back an int, not a CompletedProcess object. Switch to check=False so we don't throw an exception on failure -- we're already showing pytest's stderr, and will return the non-zero status. Change-Id: Ib0d3862a09a3963f25025f39a8e34419cf2a54df Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/299624 Reviewed-by: Michael Mortensen Tested-by: Mike Frysinger --- run_tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run_tests b/run_tests index 9f19e2e2..07cd98db 100755 --- a/run_tests +++ b/run_tests @@ -50,7 +50,7 @@ def main(argv): os.environ['PYTHONPATH'] = pythonpath pytest = find_pytest() - return subprocess.run([pytest] + argv, check=True) + return subprocess.run([pytest] + argv, check=False).returncode if __name__ == '__main__':