mirror of
https://github.com/espressif/openthread.git
synced 2026-08-07 03:07:47 +00:00
[toranj] verify "RCPVersion" is gettable on posix-app mode (#3735)
This commit updates the `test-001` to allow extra properties to be verified when running under posix-app model. The new test ensures "POSIXApp:RCPVersion" is gettable.
This commit is contained in:
committed by
Jonathan Hui
parent
6e718a1c76
commit
7c3bce3a4f
@@ -174,11 +174,19 @@ all_gettable_props = [
|
||||
wpan.WPAN_THREAD_STABLE_LEADER_NETWORK_DATA
|
||||
]
|
||||
|
||||
all_posix_app_gettable_props = [
|
||||
wpan.WPAN_RCP_VERSION
|
||||
]
|
||||
|
||||
node.form('get-set')
|
||||
|
||||
for prop in all_gettable_props:
|
||||
node.get(prop)
|
||||
|
||||
if node.using_posix_app_with_rcp:
|
||||
for prop in all_posix_app_gettable_props:
|
||||
node.get(prop)
|
||||
|
||||
#-----------------------------------------------------------------------------------------------------------------------
|
||||
# Test finished
|
||||
|
||||
|
||||
@@ -58,6 +58,7 @@ WPAN_NCP_VERSION = 'NCP:Version'
|
||||
WPAN_NCP_MCU_POWER_STATE = "NCP:MCUPowerState"
|
||||
WPAN_NETWORK_ALLOW_JOIN = 'com.nestlabs.internal:Network:AllowingJoin'
|
||||
WPAN_NETWORK_PASSTHRU_PORT = 'com.nestlabs.internal:Network:PassthruPort'
|
||||
WPAN_RCP_VERSION = "POSIXApp:RCPVersion"
|
||||
|
||||
WPAN_IP6_LINK_LOCAL_ADDRESS = "IPv6:LinkLocalAddress"
|
||||
WPAN_IP6_MESH_LOCAL_ADDRESS = "IPv6:MeshLocalAddress"
|
||||
@@ -298,11 +299,11 @@ class Node(object):
|
||||
# Check if env variable `TORANJ_POSIX_APP_RCP_MODEL` is defined
|
||||
# and use it to determine if to use operate in "posix-ncp-app".
|
||||
if self._POSIX_APP_ENV_VAR in os.environ:
|
||||
use_posix_app_with_rcp = (os.environ[self._POSIX_APP_ENV_VAR] in ['1', 'yes'])
|
||||
self._use_posix_app_with_rcp = (os.environ[self._POSIX_APP_ENV_VAR] in ['1', 'yes'])
|
||||
else:
|
||||
use_posix_app_with_rcp = False
|
||||
self._use_posix_app_with_rcp = False
|
||||
|
||||
if use_posix_app_with_rcp:
|
||||
if self._use_posix_app_with_rcp:
|
||||
ncp_socket_path = 'system:{} -s {} {} {}'.format(self._OT_NCP_FTD_POSIX_APP, self._SPEED_UP_FACTOR,
|
||||
self._OT_NCP_RADIO, index)
|
||||
else:
|
||||
@@ -350,6 +351,10 @@ class Node(object):
|
||||
def tund_log_file(self):
|
||||
return self._tund_log_file
|
||||
|
||||
@property
|
||||
def using_posix_app_with_rcp(self):
|
||||
return self._use_posix_app_with_rcp
|
||||
|
||||
#------------------------------------------------------------------------------------------------------------------
|
||||
# Executing a `wpanctl` command
|
||||
|
||||
|
||||
Reference in New Issue
Block a user