# HG changeset patch # User Edouard Tisserant # Date 1657889243 -7200 # Node ID 6210c08c1c41b4becd785b02575150553e404323 # Parent c1d627434cd18c891c84a921495003110f1cee2d tests: CLI: add simple test running python example diff -r c1d627434cd1 -r 6210c08c1c41 tests/cli_tests/run_python_example.bash --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/cli_tests/run_python_example.bash Fri Jul 15 14:47:23 2022 +0200 @@ -0,0 +1,15 @@ +#!/bin/bash + +# Run python example throug command line, and check usual output + +coproc setsid $BEREMIZPYTHONPATH $BEREMIZPATH/Beremiz_cli.py -k --project-home ~/src/beremiz/exemples/python build transfer run; + +while read -u ${COPROC[0]} line; do + echo "$line" + if [[ "$line" == *Grumpf* ]]; then + pkill -9 -s $COPROC_PID + exit 0 + fi +done + +exit 42