ldgen: do not generate rules when no condition is true

Closes https://github.com/espressif/esp-idf/issues/3295
This commit is contained in:
Renz Christian Bagaporo
2019-04-24 18:25:24 +08:00
parent e1592c8c81
commit 2522268c20
3 changed files with 23 additions and 5 deletions
+4 -2
View File
@@ -617,8 +617,10 @@ entries:
* (noflash) # if condition is false, then no 'entries' key value
""")
with self.assertRaises(ParseFatalException):
FragmentFile(test_fragment, self.sdkconfig)
expected = set()
fragment_file = FragmentFile(test_fragment, self.sdkconfig)
self.assertEqual(expected, fragment_file.fragments[0].entries)
test_fragment = self.create_fragment_file(u"""
[mapping:test]