Пример #1
0
 def test_getOrderedSectionsWithICF(self):
     '''Test ExpandMoreArgs' _getOrderedSections, with ICF'''
     # Divert subprocess.Popen
     subprocess_popen = subprocess.Popen
     subprocess.Popen = SubprocessPopen(self)
     config.EXPAND_LIBS_ORDER_STYLE = 'linkerscript'
     config.OBJ_SUFFIX = '.o'
     config.LIB_SUFFIX = '.a'
     config.LD_PRINT_ICF_SECTIONS = '-Wl,--print-icf-sections'
     args = ExpandArgsMore(['foo', '-bar', 'bar.o', 'foo.o'])
     self.assertEqual(args._getOrderedSections(['hello', '_Z6barbazv']), ['.text.hello', '.text.hi', '.text.hot._Z6barbazv'])
     self.assertEqual(args._getOrderedSections(['_ZThn4_6foobarv', 'hi', '_Z6barbazv']), ['.text._Z6foobarv', '.text._ZThn4_6foobarv', '.text.hi', '.text.hello', '.text.hot._Z6barbazv'])
     subprocess.Popen = subprocess_popen
Пример #2
0
 def test_getOrderedSectionsWithICF(self):
     '''Test ExpandMoreArgs' _getOrderedSections, with ICF'''
     # Divert subprocess.Popen
     subprocess_popen = subprocess.Popen
     subprocess.Popen = SubprocessPopen(self)
     config.EXPAND_LIBS_ORDER_STYLE = 'linkerscript'
     config.OBJ_SUFFIX = '.o'
     config.LIB_SUFFIX = '.a'
     config.LD_PRINT_ICF_SECTIONS = '-Wl,--print-icf-sections'
     args = ExpandArgsMore(['foo', '-bar', 'bar.o', 'foo.o'])
     self.assertEqual(args._getOrderedSections(['hello', '_Z6barbazv']), ['.text.hi', '.text.hello', '.text.hot._Z6barbazv'])
     self.assertEqual(args._getOrderedSections(['_ZThn4_6foobarv', 'hi', '_Z6barbazv']), ['.text._Z6foobarv', '.text._ZThn4_6foobarv', '.text.hi', '.text.hello', '.text.hot._Z6barbazv'])
     subprocess.Popen = subprocess_popen
Пример #3
0
 def test_getOrderedSectionsWithICF(self):
     """Test ExpandMoreArgs' _getOrderedSections, with ICF"""
     # Divert subprocess.Popen
     subprocess_popen = subprocess.Popen
     subprocess.Popen = SubprocessPopen(self)
     config.EXPAND_LIBS_ORDER_STYLE = "linkerscript"
     config.OBJ_SUFFIX = ".o"
     config.LIB_SUFFIX = ".a"
     config.LD_PRINT_ICF_SECTIONS = "-Wl,--print-icf-sections"
     args = ExpandArgsMore(["foo", "-bar", "bar.o", "foo.o"])
     self.assertEqual(
         args._getOrderedSections(["hello", "_Z6barbazv"]), [".text.hello", ".text.hi", ".text.hot._Z6barbazv"]
     )
     self.assertEqual(
         args._getOrderedSections(["_ZThn4_6foobarv", "hi", "_Z6barbazv"]),
         [".text._Z6foobarv", ".text._ZThn4_6foobarv", ".text.hi", ".text.hello", ".text.hot._Z6barbazv"],
     )
     subprocess.Popen = subprocess_popen