Exemplo n.º 1
0
def Uprev(input_proto, output_proto, _config):
  """Uprev all cros workon ebuilds that have changes."""
  target_names = [t.name for t in input_proto.build_targets]
  build_targets = [build_target_util.BuildTarget(t) for t in target_names]
  overlay_type = _OVERLAY_TYPE_TO_NAME[input_proto.overlay_type]
  chroot = controller_util.ParseChroot(input_proto.chroot)
  output_dir = input_proto.output_dir or None

  try:
    uprevved = packages.uprev_build_targets(build_targets, overlay_type, chroot,
                                            output_dir)
  except packages.Error as e:
    # Handle module errors nicely, let everything else bubble up.
    cros_build_lib.Die(e)

  for path in uprevved:
    output_proto.modified_ebuilds.add().path = path
Exemplo n.º 2
0
 def test_none_type_fails(self):
     """Test None type fails."""
     with self.assertRaises(AssertionError):
         packages.uprev_build_targets([build_target_lib.BuildTarget('foo')],
                                      None)
Exemplo n.º 3
0
 def test_invalid_type_fails(self):
     """Test invalid type fails."""
     with self.assertRaises(AssertionError):
         packages.uprev_build_targets([build_target_lib.BuildTarget('foo')],
                                      'invalid')