diff --git a/test/test.bash b/test/test.bash index 28d482f..a2a8991 100755 --- a/test/test.bash +++ b/test/test.bash @@ -16,20 +16,23 @@ ng() { res=0 -# Parrot-node -(ros2 run robosys2023ros parrot > /tmp/robosys2023ros.log)& +touch test.log +# Parrot-node +(ros2 run robosys2023ros parrot > test.log)& # Human-node { - (sleep 5 && echo "aiueo" && sleep 1 && echo "123456789" && sleep 1 && echo "a1b2c3d4e5") | ros2 run robosys2023ros human + (echo "aiueo"; sleep 1; echo "123456789"; sleep 1; echo "a1b2c3d4e5") | ros2 run robosys2023ros human } +sleep 20 # Parrot-log -cat /tmp/robosys2023ros.log | grep 'aiueo' || ng ${LINENO} -cat /tmp/robosys2023ros.log | grep '123456789' || ng ${LINENO} -cat /tmp/robosys2023ros.log | grep 'a1b2c3d4e5' || ng ${LINENO} +cat test.log | grep 'aiueo' || ng ${LINENO} +cat test.log | grep '123456789' || ng ${LINENO} +cat test.log | grep 'a1b2c3d4e5' || ng ${LINENO} +rm test.log echo "" [ "$res" = 0 ] && echo "OK" exit $res