native_client_sdk/src/tools/tests/create_nmf_test.py
def _CreateDynamicAndStageDeps(self, arch_path=None, **kwargs):
    """Create dynamic .nexe files and put them in a temporary directory, with
    their dependencies staged in the same directory.

    Args:
      arch_path: A dictionary mapping architecture to the directory to generate
          the .nexe for the architecture in.
      kwargs: Keyword arguments to pass through to create_nmf.NmfUtils
          constructor.

    Returns:
      A tuple with 2 elements:
        * The generated NMF as a dictionary (i.e. parsed by json.loads)
        * A list of the generated .nexe paths
    """
    arch_path = arch_path or {}
    nexes = []
    for arch in ('x86_64', 'x86_32', 'arm'):
      nexe_name = 'test_dynamic_%s.nexe' % arch
      rel_nexe = os.path.join(arch_path.get(arch, ''), nexe_name)
      arch_alt = 'i686' if arch == 'x86_32' else arch
      nexe = self._CreateTestNexe(rel_nexe, arch_alt)
      nexes.append(nexe)

    nexes.sort()
    nmf_utils = self._CreateNmfUtils(nexes, **kwargs)
    nmf = json.loads(nmf_utils.GetJson())
    nmf_utils.StageDependencies(self.tempdir)

    return nmf, nexes
Create dynamic .nexe files and put them in a temporary directory, with
    their dependencies staged in the same directory.

    Args:
      arch_path: A dictionary mapping architecture to the directory to generate
          the .nexe for the architecture in.
      kwargs: Keyword arguments to pass through to create_nmf.NmfUtils
          constructor.

    Returns:
      A tuple with 2 elements:
        * The generated NMF as a dictionary (i.e. parsed by json.loads)
        * A list of the generated .nexe paths
    
Create dynamic .nexe files and put them in a temporary directory, with
their dependencies staged in the same directory.
Create dynamic . nexe files and put them in a temporary directory with their dependencies staged in the same directory .
def _CreateDynamicAndStageDeps(self, arch_path=None, **kwargs):
    arch_path = arch_path or {}
    nexes = []
    for arch in ('x86_64', 'x86_32', 'arm'):
      nexe_name = 'test_dynamic_%s.nexe' % arch
      rel_nexe = os.path.join(arch_path.get(arch, ''), nexe_name)
      arch_alt = 'i686' if arch == 'x86_32' else arch
      nexe = self._CreateTestNexe(rel_nexe, arch_alt)
      nexes.append(nexe)
    nexes.sort()
    nmf_utils = self._CreateNmfUtils(nexes, **kwargs)
    nmf = json.loads(nmf_utils.GetJson())
    nmf_utils.StageDependencies(self.tempdir)
    return nmf, nexes
def _CreateDynamicAndStageDeps ( self , arch_path = None , ** kwargs ) : arch_path = arch_path or { } nexes = [ ] for arch in ( 'x86_64' , 'x86_32' , 'arm' ) : nexe_name = 'test_dynamic_%s.nexe' % arch rel_nexe = os . path . join ( arch_path . get ( arch , '' ) , nexe_name ) arch_alt = 'i686' if arch == 'x86_32' else arch nexe = self . _CreateTestNexe ( rel_nexe , arch_alt ) nexes . append ( nexe ) nexes . sort ( ) nmf_utils = self . _CreateNmfUtils ( nexes , ** kwargs ) nmf = json . loads ( nmf_utils . GetJson ( ) ) nmf_utils . StageDependencies ( self . tempdir ) return nmf , nexes
Create dynamic .nexe files and put them in a temporary directory, with
their dependencies staged in the same directory.
Create dynamic . nexe files and put them in a temporary directory with their dependencies staged in the same directory .
"""Create dynamic .nexe files and put them in a temporary directory, with
    their dependencies staged in the same directory.

    Args:
      arch_path: A dictionary mapping architecture to the directory to generate
          the .nexe for the architecture in.
      kwargs: Keyword arguments to pass through to create_nmf.NmfUtils
          constructor.

    Returns:
      A tuple with 2 elements:
        * The generated NMF as a dictionary (i.e. parsed by json.loads)
        * A list of the generated .nexe paths
    """
A tuple with 2 elements:
The generated NMF as a dictionary
A list of the generated .nexe paths
A tuple with 2 elements : The generated NMF as a dictionary A list of the generated . nexe paths
self
arch_path
A dictionary mapping architecture to the directory to generate
the .nexe for the architecture in.
A dictionary mapping architecture to the directory to generate the . nexe for the architecture in .
kwargs
Keyword arguments to pass through to create_nmf.NmfUtils
constructor.
Keyword arguments to pass through to create_nmf . NmfUtils constructor .