run_tests: Change top-level wrapper to split test execution
Change the top-level `run_tests` program to execute `scripts/run_tests`
for Python 2 only, followed by `scripts/run_pytest` (which runs on
Python 3 only). Also change the CQ to run `scripts/run_tests` on py2 only.
BUG=chromium:1062657
TEST=`run_tests`
Change-Id: I9f0fe0ee9125e9c97856d6094451e18cb5036b7a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/2140626
Tested-by: Chris McDonald <cjmcdonald@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Greg Edelston <gredelston@google.com>
Commit-Queue: Chris McDonald <cjmcdonald@chromium.org>
diff --git a/api/controller/test.py b/api/controller/test.py
index 295b64f..05dbf95 100644
--- a/api/controller/test.py
+++ b/api/controller/test.py
@@ -129,7 +129,7 @@
@validate.validation_complete
def ChromiteUnitTest(_input_proto, _output_proto, _config):
"""Run the chromite unit tests."""
- cmd = [os.path.join(constants.CHROMITE_DIR, 'scripts', 'run_tests')]
+ cmd = [os.path.join(constants.CHROMITE_DIR, 'scripts', 'run_tests'), '--py2']
result = cros_build_lib.run(cmd, check=False)
if result.returncode == 0:
return controller.RETURN_CODE_SUCCESS