Implement ChromitePytest API
BUG=chromium:1062066
TEST=api/contrib/gen_call_scripts;
api/contrib/call_scripts/test__chromite_pytest
Change-Id: I7ea791c11677ef204ee6c44f0a3246fc4a5dcc7c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/2107881
Tested-by: Greg Edelston <gredelston@google.com>
Reviewed-by: Alex Klein <saklein@chromium.org>
Commit-Queue: Greg Edelston <gredelston@google.com>
diff --git a/api/controller/test.py b/api/controller/test.py
index ccaae00..295b64f 100644
--- a/api/controller/test.py
+++ b/api/controller/test.py
@@ -137,6 +137,17 @@
return controller.RETURN_CODE_COMPLETED_UNSUCCESSFULLY
+@faux.empty_success
+@faux.empty_completed_unsuccessfully_error
+@validate.validation_complete
+def ChromitePytest(_input_proto, _output_proto, _config):
+ """Run the chromite unit tests."""
+ if test.ChromitePytest():
+ return controller.RETURN_CODE_SUCCESS
+ else:
+ return controller.RETURN_CODE_COMPLETED_UNSUCCESSFULLY
+
+
@faux.all_empty
@validate.require('sysroot.path', 'sysroot.build_target.name', 'chrome_root')
@validate.validation_complete