-
Notifications
You must be signed in to change notification settings - Fork 268
/
Copy pathtests.sh
executable file
·92 lines (75 loc) · 1.78 KB
/
tests.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/usr/bin/env bash
set -ex # exit on error, echo commands
# TODO: validate versions
# validate required software is installed
python3 --version
ipython3 --version
node -v
npm -v
byobu --version
nmap --version
lsof -v
git --version
vim --version
pip --version
pip3 --version
tcpdump --version
monkey --version
espeak --version
xxd --version
systemctl --version
if [ -z $VM ]; then
# rpi only software
python --version
[[ $(python -c 'import sys;print(sys.version_info.major)') == "3" ]]
python -m debugpy --version
python3 -m debugpy --version
pigpiod -v
i2cdetect -V
/usr/local/bin/butterfly.server.py --help
mjpg_streamer --version
fi
# ros stuff
roscore -h
catkin_find
rosversion clover
rosversion aruco_pose
rosversion mavros
rosversion mavros_extras
rosversion ws281x
rosversion led_msgs
rosversion dynamic_reconfigure
rosversion tf2_web_republisher
rosversion rosbridge_server
rosversion usb_cam
rosversion cv_camera
rosversion web_video_server
rosversion nodelet
rosversion image_view
[[ $(rosversion ws281x) == "0.0.15" ]]
if [ -z $VM ]; then
# rosversion compressed_image_transport
rosversion rosshow
rosversion vl53l1x
rosversion rosserial
[[ $(rosversion cv_camera) == "0.6.1" ]] # patched version with init fix
fi
# determine user home directory
[ $VM ] && H="/home/clover" || H="/home/pi"
# test basic ros tool work
source $H/catkin_ws/devel/setup.bash
roscd
rosrun
rosmsg
rossrv
rosnode || [ $? -eq 64 ] # usage output code is 64
rostopic || [ $? -eq 64 ]
rosservice || [ $? -eq 64 ]
rosparam
roslaunch -h
# validate examples are present
[[ $(ls $H/examples/*) ]]
# validate web tools present
[ -d $H/.ros/www ]
[ "$(readlink $H/.ros/www/clover)" = "$H/catkin_ws/src/clover/clover/www" ]
[ "$(readlink $H/.ros/www/clover_blocks)" = "$H/catkin_ws/src/clover/clover_blocks/www" ]