[posix] clean up for radio url (#5027)

* fix max-power-table documentation
* rename `baudrate` to `uart-baudrate`, `arg` to `forkpty-arg`
* update command line enumeration
* update README
* remove trailing argument from node.py
This commit is contained in:
Yakun Xu
2020-06-01 08:13:46 -07:00
committed by GitHub
parent 115616c6bf
commit f8f75d6d05
13 changed files with 111 additions and 87 deletions
+8 -5
View File
@@ -108,8 +108,10 @@ class Node:
cmd = '%s/examples/apps/cli/ot-cli-%s' % (srcdir, mode)
if 'RADIO_DEVICE' in os.environ:
cmd += ' -v spinel+hdlc+uart://%s?arg=%d' % (
cmd += ' -v spinel+hdlc+uart://%s?forkpty-arg=%d' % (
os.environ['RADIO_DEVICE'], nodeid)
else:
cmd += ' %d' % nodeid
# Load Thread 1.1 node when testing Thread 1.2 scenarios for interoperability
elif self.version == '1.1':
@@ -121,10 +123,11 @@ class Node:
cmd = '%s/examples/apps/cli/ot-cli-%s' % (srcdir, mode)
if 'RADIO_DEVICE_1_1' in os.environ:
cmd += ' -v spinel+hdlc+uart://%s?arg=%d' % (
cmd += ' -v spinel+hdlc+uart://%s?forkpty-arg=%d' % (
os.environ['RADIO_DEVICE_1_1'], nodeid)
else:
cmd += ' %d' % nodeid
cmd += ' %d' % nodeid
print("%s" % cmd)
self.pexpect = pexpect.popen_spawn.PopenSpawn(cmd, timeout=4)
@@ -148,7 +151,7 @@ class Node:
# If Thread version of node matches the testing environment version.
if self.version == self.env_version:
if 'RADIO_DEVICE' in os.environ:
args = ' spinel+hdlc+uart://%s?arg=%d' % (
args = ' spinel+hdlc+uart://%s?forkpty-arg=%d' % (
os.environ['RADIO_DEVICE'], nodeid)
else:
args = ''
@@ -187,7 +190,7 @@ class Node:
# Load Thread 1.1 node when testing Thread 1.2 scenarios for interoperability.
elif self.version == '1.1':
if 'RADIO_DEVICE_1_1' in os.environ:
args = ' spinel+hdlc+uart://%s?arg=%d' % (
args = ' spinel+hdlc+uart://%s?forkpty-arg=%d' % (
os.environ['RADIO_DEVICE_1_1'], nodeid)
else:
args = ''