api/sysroot: add simple chrome sysroot artifact
Update the existing CreateSimpleChromeSysroot function and use this
version for the Get() function for the newly defined enum value.
BUG=b:181879769
TEST=modded units, cq
Change-Id: I185a935a4cf012e5fc9319906dcc79961a0d578b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/3018566
Reviewed-by: Jack Neus <jackneus@google.com>
Reviewed-by: Alex Klein <saklein@chromium.org>
Tested-by: George Engelbrecht <engeg@google.com>
Commit-Queue: George Engelbrecht <engeg@google.com>
diff --git a/api/controller/sysroot.py b/api/controller/sysroot.py
index 602037a..c13bceb 100644
--- a/api/controller/sysroot.py
+++ b/api/controller/sysroot.py
@@ -32,6 +32,14 @@
uabs = common_pb2.UploadedArtifactsByService
cabs = common_pb2.ArtifactsByService
return uabs.Sysroot(artifacts=[
+ uabs.Sysroot.ArtifactPaths(
+ artifact_type=cabs.Sysroot.ArtifactType.SIMPLE_CHROME_SYSROOT,
+ paths=[
+ common_pb2.Path(
+ path='/tmp/sysroot_chromeos-base_chromeos-chrome.tar.xz',
+ location=common_pb2.Path.OUTSIDE)
+ ],
+ ),
uabs.Sysroot.ArtifactPaths(
artifact_type=cabs.Sysroot.ArtifactType.DEBUG_SYMBOLS,
paths=[
@@ -69,8 +77,10 @@
"""
generated = []
artifact_types = {
+ in_proto.ArtifactType.SIMPLE_CHROME_SYSROOT:
+ sysroot.CreateSimpleChromeSysroot,
in_proto.ArtifactType.BREAKPAD_DEBUG_SYMBOLS: sysroot.BundleBreakpadSymbols,
- in_proto.ArtifactType.DEBUG_SYMBOLS: sysroot.BundleDebugSymbols
+ in_proto.ArtifactType.DEBUG_SYMBOLS: sysroot.BundleDebugSymbols,
}
for output_artifact in in_proto.output_artifacts:
@@ -86,7 +96,6 @@
return generated
-
@faux.all_empty
@validate.require('build_target.name')
@validate.validation_complete
@@ -118,24 +127,6 @@
@faux.all_empty
-@validate.require('build_target.name')
-@validate.validation_complete
-def CreateSimpleChromeSysroot(input_proto, output_proto, _config):
- """Create a sysroot for SimpleChrome to use."""
- build_target_name = input_proto.build_target.name
- use_flags = input_proto.use_flags
-
- sysroot_tar_path = sysroot.CreateSimpleChromeSysroot(build_target_name,
- use_flags)
- # By assigning this Path variable to the tar path, the tar file will be
- # copied out to the input_proto's ResultPath location.
- output_proto.sysroot_archive.path = sysroot_tar_path
- output_proto.sysroot_archive.location = common_pb2.Path.INSIDE
-
- return controller.RETURN_CODE_SUCCESS
-
-
-@faux.all_empty
@validate.require('build_target.name', 'packages')
@validate.require_each('packages', ['category', 'package_name'])
@validate.validation_complete