tests: CLI: add simple test running python example
authorEdouard Tisserant <edouard.tisserant@gmail.com>
Fri, 15 Jul 2022 14:47:23 +0200
changeset 3543 6210c08c1c41
parent 3542 c1d627434cd1
child 3544 f2dff88db448
tests: CLI: add simple test running python example
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