Build API TestService: Add rules_cros test endpoint and implementation
BUG=b:217770417
TEST=Pass CQ & Run endpoint from commandline
Cq-Depend: chromium:3498755
Change-Id: I046886b2053d15246773730adff391c7261788ea
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/3499544
Tested-by: Sloan Johnson <sloanjohnson@google.com>
Reviewed-by: Chris McDonald <cjmcdonald@chromium.org>
Reviewed-by: Alex Klein <saklein@chromium.org>
Commit-Queue: Sloan Johnson <sloanjohnson@google.com>
diff --git a/api/controller/test.py b/api/controller/test.py
index a444a8f..c2479c7 100644
--- a/api/controller/test.py
+++ b/api/controller/test.py
@@ -314,6 +314,17 @@
return controller.RETURN_CODE_SUCCESS
+@faux.empty_success
+@faux.empty_completed_unsuccessfully_error
+@validate.validation_complete
+def RulesCrosUnitTest(_input_proto, _output_proto, _config):
+ """Run the rules_cros unit tests."""
+ if test.RulesCrosUnitTest():
+ 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