- allow test run from command line (config is no more needed)
This commit is contained in:
11
run_node.sh
11
run_node.sh
@@ -17,5 +17,12 @@ pkill pulseaudio
|
|||||||
# Ensure BT stack is here
|
# Ensure BT stack is here
|
||||||
python3 -u $SCRIPT_DIR/src/bt_preconnect.py $SCRIPT_DIR/config/agent.yaml
|
python3 -u $SCRIPT_DIR/src/bt_preconnect.py $SCRIPT_DIR/config/agent.yaml
|
||||||
|
|
||||||
# Run main script
|
#!/bin/bash
|
||||||
python3 -u $SCRIPT_DIR/src/agent_gsm.py --config $SCRIPT_DIR/config/agent.yaml
|
if [ -n "$1" ]
|
||||||
|
then
|
||||||
|
# Run main script
|
||||||
|
python3 -u $SCRIPT_DIR/src/agent_gsm.py --config $SCRIPT_DIR/config/agent.yaml "$1"
|
||||||
|
else
|
||||||
|
python3 -u $SCRIPT_DIR/src/agent_gsm.py --config $SCRIPT_DIR/config/agent.yaml
|
||||||
|
|
||||||
|
fi
|
||||||
|
|||||||
@@ -311,7 +311,7 @@ def run_caller_task(t):
|
|||||||
|
|
||||||
# Runs caller probe - load task list and perform calls
|
# Runs caller probe - load task list and perform calls
|
||||||
def run_probe():
|
def run_probe():
|
||||||
global TASK_LIST, REFERENCE_AUDIO, LOADED_AUDIO, CURRENT_TASK
|
global TASK_LIST, REFERENCE_AUDIO, LOADED_AUDIO, CURRENT_TASK, FORCE_RUN
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
# Get task list update
|
# Get task list update
|
||||||
@@ -403,6 +403,9 @@ if len(sys.argv) < 2:
|
|||||||
parser.print_help()
|
parser.print_help()
|
||||||
sys.exit(EXIT_OK)
|
sys.exit(EXIT_OK)
|
||||||
|
|
||||||
|
if args.test:
|
||||||
|
FORCE_RUN = True
|
||||||
|
|
||||||
if Path(QUALTEST_PID).exists() and args.check_pid_file:
|
if Path(QUALTEST_PID).exists() and args.check_pid_file:
|
||||||
print(f'File {QUALTEST_PID} exists, seems another instance of script is running. Please delete {QUALTEST_PID} to allow the start.')
|
print(f'File {QUALTEST_PID} exists, seems another instance of script is running. Please delete {QUALTEST_PID} to allow the start.')
|
||||||
sys.exit(EXIT_OK)
|
sys.exit(EXIT_OK)
|
||||||
|
|||||||
Reference in New Issue
Block a user