mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 10:47:19 +02:00
fix(ldgen): duplicate entries in the generated .ld file
This commit is contained in:
@ -79,7 +79,10 @@ class GenerationTest(unittest.TestCase):
|
|||||||
self.entities.add_sections_info(objdump)
|
self.entities.add_sections_info(objdump)
|
||||||
|
|
||||||
with open('data/linker_script.ld') as linker_script:
|
with open('data/linker_script.ld') as linker_script:
|
||||||
self.linker_script = LinkerScript(linker_script)
|
self.linker_script_expect = LinkerScript(linker_script)
|
||||||
|
|
||||||
|
with open('data/linker_script.ld') as linker_script:
|
||||||
|
self.linker_script_actual = LinkerScript(linker_script)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def create_fragment_file(contents, name='test_fragment.lf'):
|
def create_fragment_file(contents, name='test_fragment.lf'):
|
||||||
@ -93,11 +96,11 @@ class GenerationTest(unittest.TestCase):
|
|||||||
self.generation.add_fragments_from_file(fragment_file)
|
self.generation.add_fragments_from_file(fragment_file)
|
||||||
|
|
||||||
def write(self, expected, actual):
|
def write(self, expected, actual):
|
||||||
self.linker_script.fill(expected)
|
self.linker_script_expect.fill(expected)
|
||||||
self.linker_script.write(open('expected.ld', 'w'))
|
self.linker_script_expect.write(open('expected.ld', 'w'))
|
||||||
|
|
||||||
self.linker_script.fill(actual)
|
self.linker_script_actual.fill(actual)
|
||||||
self.linker_script.write(open('actual.ld', 'w'))
|
self.linker_script_actual.write(open('actual.ld', 'w'))
|
||||||
|
|
||||||
def generate_default_rules(self):
|
def generate_default_rules(self):
|
||||||
rules = collections.defaultdict(list)
|
rules = collections.defaultdict(list)
|
||||||
|
Reference in New Issue
Block a user