Skip to content

Commit

Permalink
edit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Npaintrobo committed Jan 3, 2024
1 parent 52a178f commit c59765e
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions test/test.bash
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,29 @@ cd $dir/ros2_ws
colcon build
source $dir/.bashrc

#Human-node
gnome-terminal -- bash -c "
sleep 3
sleep 4
expect -c '
spawn ros2 run robosys2023ros human
expect \"human:\"
send \"aiueo\n\"
expect \"human:\"
send \"123456789\n\"
expect \"human:\"
send \"a1b2c3d4e5\n\"
expect eof
'
"

#Parrot-node
timeout 10 ros2 run robosys2023ros parrot > parrot.log 2>&1

echo test
cat parrot.log|
grep 'parrot'






#parrot-log
grep_result=$(cat parrot.log | grep -e 'aiueo' -e '123456789' -e 'a1b2c3d4e5')
echo "$grep_result"
if [ -n "$grep_result" ]; then
echo "OK"
else
echo "test failed"
fi

0 comments on commit c59765e

Please sign in to comment.