fix problems found in sanity test

This commit is contained in:
Kevin Hester
2020-12-09 09:41:49 +08:00
parent 1f91f541ef
commit 3645cff97e
4 changed files with 24 additions and 2 deletions

9
.vscode/launch.json vendored
View File

@@ -36,6 +36,15 @@
"justMyCode": true,
"args": ["--debug", "--setchan", "psk", "fish"]
},
{
"name": "meshtastic seturl",
"type": "python",
"request": "launch",
"module": "meshtastic",
"justMyCode": true,
"args": ["--seturl", "https://www.meshtastic.org/c/#GAMiENTxuzogKQdZ8Lz_q89Oab8qB0RlZmF1bHQ="
]
},
{
"name": "meshtastic shell",
"type": "python",

View File

@@ -1,7 +1,19 @@
set -e
echo "Running (crude) prerelease tests to verify sanity"
echo running hello
python3 tests/hello_world.py
bin/run.sh --help
# bin/run.sh --help
echo toggling router
bin/run.sh --set-router
bin/run.sh --unset-router
echo setting channel
bin/run.sh --seturl "https://www.meshtastic.org/c/#GAMiENTxuzogKQdZ8Lz_q89Oab8qB0RlZmF1bHQ="
echo setting time
bin/run.sh --settime
echo setting owner
bin/run.sh --setowner "Test Build"
echo dumping info
bin/run.sh --info
echo sending closing message
bin/run.sh --sendtext "Sanity complete"

View File

@@ -233,6 +233,7 @@ class MeshInterface:
t = mesh_pb2.ToRadio()
t.set_radio.CopyFrom(self.radioConfig)
self._sendToRadio(t)
logging.debug("Wrote config")
def getMyNode(self):
if self.myInfo is None:

View File

@@ -327,7 +327,7 @@ def main():
args.destOrAll = "^all"
if not args.seriallog:
if args.info or args.set or args.setstr or args.setchan or args.sendtext or args.router != None or args.qr:
if args.info or args.set or args.seturl or args.setowner or args.settime or args.setstr or args.setchan or args.sendtext or args.router != None or args.qr:
args.seriallog = "none" # assume no debug output in this case
else:
args.seriallog = "stdout" # default to stdout