Esempio n. 1
0
 def testPassesProfileInfoAfdoRelease(self):
     request = toolchain_pb2.PrepareForToolchainBuildRequest(
         artifact_types=[
             BuilderConfig.Artifacts.UNVERIFIED_CHROME_LLVM_ORDERFILE],
         chroot=None, sysroot=None, input_artifacts=[
             BuilderConfig.Artifacts.InputArtifactInfo(
                 input_artifact_type=\
                     BuilderConfig.Artifacts.UNVERIFIED_CHROME_LLVM_ORDERFILE,
                 input_artifact_gs_locations=['path1', 'path2']),
             BuilderConfig.Artifacts.InputArtifactInfo(
                 input_artifact_type=\
                     BuilderConfig.Artifacts.UNVERIFIED_CHROME_LLVM_ORDERFILE,
                 input_artifact_gs_locations=['path3']),
         ],
         profile_info=common_pb2.ArtifactProfileInfo(
             afdo_release=common_pb2.AfdoRelease(
                 chrome_cwp_profile='CWPVERSION',
                 image_build_id=1234)),
     )
     toolchain.PrepareForBuild(request, self.response, self.api_config)
     self.prep.assert_called_once_with(
         'UnverifiedChromeLlvmOrderfile', None, '', '', {
             'UnverifiedChromeLlvmOrderfile':
             ['gs://path1', 'gs://path2', 'gs://path3'],
         }, {
             'chrome_cwp_profile': 'CWPVERSION',
             'image_build_id': 1234
         })
Esempio n. 2
0
 def testAcceptsNone(self):
     request = toolchain_pb2.PrepareForToolchainBuildRequest(
         artifact_types=[
             BuilderConfig.Artifacts.UNVERIFIED_CHROME_LLVM_ORDERFILE
         ],
         chroot=None,
         sysroot=None)
     toolchain.PrepareForBuild(request, self.response, self.api_config)
     self.prep.assert_called_once_with('UnverifiedChromeLlvmOrderfile',
                                       None, '', '', {}, {})
Esempio n. 3
0
 def testHandlesUnknownInputArtifacts(self):
     request = toolchain_pb2.PrepareForToolchainBuildRequest(
         artifact_types=[
             BuilderConfig.Artifacts.UNVERIFIED_CHROME_LLVM_ORDERFILE
         ],
         chroot=None,
         sysroot=None,
         input_artifacts=[
             BuilderConfig.Artifacts.InputArtifactInfo(
                 input_artifact_type=BuilderConfig.Artifacts.IMAGE_ZIP,
                 input_artifact_gs_locations=['path1']),
         ])
     toolchain.PrepareForBuild(request, self.response, self.api_config)
     self.prep.assert_called_once_with('UnverifiedChromeLlvmOrderfile',
                                       None, '', '', {}, {})