Defer packed help board selection to the effective C++ profile

This commit is contained in:
mikecarper committed 2026-10-23 09:44:10 -07:00
1 parent 1ccd0db9b0
commit 28aeea4c96
2 files changed
+8 -7

No files matched your search

+3 -3
View File
@@ -6,12 +6,12 @@ import unittest
ROOT=Path(__file__).resolve().parents[1]
spec=importlib.util.spec_from_file_location('help_language_policy',ROOT/'scripts/nrf52_flash_trim.py');m=importlib.util.module_from_spec(spec);spec.loader.exec_module(m)
class HelpBuildPolicy(unittest.TestCase):
def test_rak_companion_source_registers_before_late_full_profile_flags(self):
def test_companion_source_registers_before_late_board_and_profile_flags(self):
yes=dict(platform='nordicnrf52',mcu='nrf52840',src_filter='+<*> +<../examples/companion_radio>',flags='-DRAK_4631 -DCOMPANION_RADIO_FULL')
self.assertTrue(m.packed_help_policy(**yes))
for flags in ('-DRAK_4631', '-DRAK_4631 -DCOMPANION_RADIO_FULL -UCOMPANION_RADIO_FULL'):
for flags in ('', '-DRAK_4631', '-DCOMPANION_RADIO_FULL', '-DRAK_4631 -URAK_4631', '-DRAK_4631 -DCOMPANION_RADIO_FULL -UCOMPANION_RADIO_FULL'):
self.assertTrue(m.packed_help_policy(**dict(yes,flags=flags)))
for key,value in [('platform','espressif32'),('mcu','nrf52832'),('src_filter','+<*>'),('src_filter','+<../examples/companion_radio> +<../examples/simple_repeater>'),('flags','-DCOMPANION_RADIO_FULL'),('flags','-DRAK_4631 -URAK_4631')]:
for key,value in [('platform','espressif32'),('mcu','nrf52832'),('src_filter','+<*>'),('src_filter','+<../examples/companion_radio> +<../examples/simple_repeater>')]:
with self.subTest(key=key,value=value):
no=dict(yes);no[key]=value;self.assertFalse(m.packed_help_policy(**no))
self.assertTrue(m.packed_help_policy('nordicnrf52','nrf52840','+<../examples/companion_radio>',cppdefines=[('RAK_4631',1),('COMPANION_RADIO_FULL',1)]))