-e /type_base_path/type_path/ -e /object_base_path/object_path/
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
parent
48eb996a2e
commit
a8ec91c804
2 changed files with 7 additions and 7 deletions
|
@ -38,7 +38,7 @@ common:
|
|||
__global: full qualified path to the global output dir == local.out_path
|
||||
__cdist_manifest: full qualified path of the manifest == script
|
||||
__cdist_type_base_path: full qualified path to the directory where types are defined for use in type emulator
|
||||
== local.type_base_path
|
||||
== local.type_path
|
||||
|
||||
initial manifest is:
|
||||
script: full qualified path to the initial manifest
|
||||
|
@ -72,7 +72,7 @@ class Manifest(object):
|
|||
'PATH': "%s:%s" % (self.local.bin_path, os.environ['PATH']),
|
||||
'__target_host': self.target_host,
|
||||
'__global': self.local.out_path,
|
||||
'__cdist_type_base_path': self.local.type_base_path, # for use in type emulator
|
||||
'__cdist_type_base_path': self.local.type_path, # for use in type emulator
|
||||
}
|
||||
|
||||
def run_initial_manifest(self, script):
|
||||
|
@ -90,5 +90,5 @@ class Manifest(object):
|
|||
'__object_fq': cdist_object.path,
|
||||
'__type': cdist_object.type.absolute_path,
|
||||
})
|
||||
script = os.path.join(self.local.type_base_path, cdist_object.type.manifest_path)
|
||||
script = os.path.join(self.local.type_path, cdist_object.type.manifest_path)
|
||||
return self.local.run_script(script, env=env)
|
||||
|
|
|
@ -72,12 +72,12 @@ class ManifestTestCase(unittest.TestCase):
|
|||
self.assertTrue(output_dict['PATH'].startswith(self.local.bin_path))
|
||||
self.assertEqual(output_dict['__target_host'], self.local.target_host)
|
||||
self.assertEqual(output_dict['__global'], self.local.out_path)
|
||||
self.assertEqual(output_dict['__cdist_type_base_path'], self.local.type_base_path)
|
||||
self.assertEqual(output_dict['__cdist_type_base_path'], self.local.type_path)
|
||||
self.assertEqual(output_dict['__manifest'], self.local.manifest_path)
|
||||
|
||||
def test_type_manifest_environment(self):
|
||||
cdist_type = core.Type(self.local.type_base_path, '__dump_environment')
|
||||
cdist_object = core.Object(cdist_type, self.local.object_base_path, 'whatever')
|
||||
cdist_type = core.Type(self.local.type_path, '__dump_environment')
|
||||
cdist_object = core.Object(cdist_type, self.local.object_path, 'whatever')
|
||||
|
||||
output_string = self.manifest.run_type_manifest(cdist_object)
|
||||
output_dict = {}
|
||||
|
@ -88,7 +88,7 @@ class ManifestTestCase(unittest.TestCase):
|
|||
self.assertTrue(output_dict['PATH'].startswith(self.local.bin_path))
|
||||
self.assertEqual(output_dict['__target_host'], self.local.target_host)
|
||||
self.assertEqual(output_dict['__global'], self.local.out_path)
|
||||
self.assertEqual(output_dict['__cdist_type_base_path'], self.local.type_base_path)
|
||||
self.assertEqual(output_dict['__cdist_type_base_path'], self.local.type_path)
|
||||
self.assertEqual(output_dict['__type'], cdist_type.absolute_path)
|
||||
self.assertEqual(output_dict['__object'], cdist_object.absolute_path)
|
||||
self.assertEqual(output_dict['__object_id'], cdist_object.object_id)
|
||||
|
|
Loading…
Reference in a new issue