Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e9eb5f96 authored by Bill Peckham's avatar Bill Peckham
Browse files

Adding initial merge_target_files.py script to merge two target files packages.

This script takes as input two partial target files (one contains system bits,
and the other contains non-system, or other, bits). The script merges the
contents of the two partial target files packages to produce a complete target
files package.

Bug: 123430711
Test: Build two partial target files, merge, compare with full target files.
Test: Validate merged target files via validate_target_files.py.
Change-Id: Ic24acf43b86fc703fb4c970688b006291a1861f8
parent dba735e9
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -190,6 +190,25 @@ def Run(args, verbose=None, **kwargs):
  return subprocess.Popen(args, **kwargs)


def RunAndWait(args, verbose=None, **kwargs):
  """Runs the given command and returns the exit code.

  Args:
    args: The command represented as a list of strings.
    verbose: Whether the commands should be shown. Default to the global
        verbosity if unspecified.
    kwargs: Any additional args to be passed to subprocess.Popen(), such as env,
        stdin, etc. stdout and stderr will default to subprocess.PIPE and
        subprocess.STDOUT respectively unless caller specifies any of them.

  Returns:
    The process return code.
  """
  proc = Run(args, verbose=verbose, **kwargs)
  proc.wait()
  return proc.returncode


def RunAndCheckOutput(args, verbose=None, **kwargs):
  """Runs the given command and returns the output.

+679 −0

File added.

Preview size limit exceeded, changes collapsed.