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-by: Michael Mortensen <>
Tested-by: Mike Frysinger <>
diff --git a/run_tests b/run_tests
index 9f19e2e..07cd98d 100755
--- a/run_tests
+++ b/run_tests
@@ -50,7 +50,7 @@
   os.environ['PYTHONPATH'] = pythonpath
   pytest = find_pytest()
-  return[pytest] + argv, check=True)
+  return[pytest] + argv, check=False).returncode
 if __name__ == '__main__':