Skip to content

Commit

Permalink
Added option to enable test event triggers for EVSE but in a generic …
Browse files Browse the repository at this point in the history
…way for future.
  • Loading branch information
jamesharrow committed Jan 11, 2024
1 parent 5e68670 commit f87e4ae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions scripts/build/build/targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ def BuildHostTarget():
target.AppendModifier('test', extra_tests=True)
target.AppendModifier('rpc', enable_rpcs=True)
target.AppendModifier('with-ui', imgui_ui=True)
target.AppendModifier('evse-test-event', enable_test_event_triggers=['EVSE']).OnlyIfRe('-energy-management')

return target

Expand Down
7 changes: 6 additions & 1 deletion scripts/build/builders/host.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,8 @@ def __init__(self, root, runner, app: HostApp, board=HostBoard.NATIVE,
separate_event_loop=True, fuzzing_type: HostFuzzingType = HostFuzzingType.NONE, use_clang=False,
interactive_mode=True, extra_tests=False, use_platform_mdns=False, enable_rpcs=False,
use_coverage=False, use_dmalloc=False, minmdns_address_policy=None,
minmdns_high_verbosity=False, imgui_ui=False, crypto_library: HostCryptoLibrary = None):
minmdns_high_verbosity=False, imgui_ui=False, crypto_library: HostCryptoLibrary = None,
enable_test_event_triggers=None):
super(HostBuilder, self).__init__(
root=os.path.join(root, 'examples', app.ExamplePath()),
runner=runner)
Expand Down Expand Up @@ -398,6 +399,10 @@ def __init__(self, root, runner, app: HostApp, board=HostBoard.NATIVE,
if crypto_library:
self.extra_gn_options.append(crypto_library.gn_argument)

if enable_test_event_triggers is not None:
if 'EVSE' in enable_test_event_triggers:
self.extra_gn_options.append('chip_enable_energy_evse_trigger=true')

if self.board == HostBoard.ARM64:
if not use_clang:
raise Exception("Cross compile only supported using clang")
Expand Down

0 comments on commit f87e4ae

Please sign in to comment.