Example #1
0
 def load_dependencies(self):
     """Load and add all element dependencies to self.elements."""
     all_elements = element_dependencies.expand_dependencies(
         self.elements, ':'.join(self.element_paths))
     self.elements = all_elements
     os.environ['IMAGE_ELEMENT'] = ' '.join(
         [x for x in sorted(self.elements)])
     LOG.info("List of all elements and dependencies: %s" %
              ' '.join(list(self.elements)))
Example #2
0
 def load_dependencies(self):
     """Load and add all element dependencies to self.elements."""
     all_elements = element_dependencies.expand_dependencies(
         self.elements, ':'.join(self.element_paths))
     self.elements = all_elements
     os.environ['IMAGE_ELEMENT'] = ' '.join(
         [x for x in sorted(self.elements)])
     LOG.info("List of all elements and dependencies: %s" %
              ' '.join(list(self.elements)))
Example #3
0
 def test_expand_dependencies_deprecated(self):
     # test the deprecated expand_dependencies call
     result = element_dependencies.expand_dependencies(
         ['foo', 'requires-foo'], self.element_dirs)
     self.assertCountEqual(['foo', 'requires-foo'], result)
 def test_provide(self):
     result = element_dependencies.expand_dependencies(
         ['provides_virtual', 'requires_virtual'],
         elements_dir=self.element_dir)
     self.assertEqual(set(['requires_virtual', 'provides_virtual']), result)
 def test_circular(self):
     result = element_dependencies.expand_dependencies(
         ['circular1'], elements_dir=self.element_dir)
     self.assertEqual(set(['circular1', 'circular2']), result)
 def test_self(self):
     result = element_dependencies.expand_dependencies(
         ['self'], elements_dir=self.element_dir)
     self.assertEqual(set(['self']), result)
 def test_transitive_deps(self):
     result = element_dependencies.expand_dependencies(
         ['requires-requires-foo'], elements_dir=self.element_dir)
     self.assertEqual(set(['requires-requires-foo',
                           'requires-foo',
                           'foo']), result)
Example #8
0
 def test_self(self):
     result = element_dependencies.expand_dependencies(
         ['self', 'foo'], elements_dir=self.element_dir)
     self.assertEqual(set(['self', 'foo']), result)
Example #9
0
 def test_transitive_deps(self):
     result = element_dependencies.expand_dependencies(
         ['requires-requires-foo'], elements_dir=self.element_dir)
     self.assertEqual(set(['requires-requires-foo',
                           'requires-foo',
                           'foo']), result)
Example #10
0
 def test_provide_virtual_ordering(self):
     result = element_dependencies.expand_dependencies(
         ['requires_new_virtual', 'provides_new_virtual'],
         elements_dir=self.element_dir)
     self.assertEqual(set(['requires_new_virtual', 'provides_new_virtual']),
                      result)
Example #11
0
 def test_circular(self):
     result = element_dependencies.expand_dependencies(
         ['circular1'], elements_dir=self.element_dir)
     self.assertEqual(set(['circular1', 'circular2']), result)
 def test_expand_dependencies_deprecated(self):
     # test the deprecated expand_dependencies call
     result = element_dependencies.expand_dependencies(
             ['foo', 'requires-foo'], self.element_dirs)
     self.assertItemsEqual(['foo', 'requires-foo'], result)