-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexecute_tests.sh
More file actions
executable file
·60 lines (57 loc) · 1.29 KB
/
Copy pathexecute_tests.sh
File metadata and controls
executable file
·60 lines (57 loc) · 1.29 KB
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
#!/bin/bash
clear
# Try to identify whether we are on Raspberry Pi or not
# source the /etc/os-release values
# This may not be the best option
. /etc/os-release
echo "System name $NAME"
echo "Select the tests you want to run:
1. Propulsion tests
2. IR tests
3. Ultrasound tests
4. Camera tests
5. Master process tests
6. All tests
0. Quit
"
read -p "Enter option [0-6] > "
if [[ "$REPLY" =~ ^[0-6]$ ]]; then
if [[ "$REPLY" == 0 ]]; then
echo "Terminating program"
exit
fi
if [[ "$REPLY" -eq 1 ]]; then
echo "Running Propulsion tests"
python3 run_tests.py "PLATFORM=$NAME" "ID=$REPLY"
exit 0
fi
if [[ "$REPLY" -eq 2 ]]; then
echo "Running IR tests..."
echo "This is not enabled yet"
python3 run_tests.py PLATFORM=$NAME ID=$REPLY
exit 0
fi
if [[ "$REPLY" -eq 3 ]]; then
echo "Ultrasound tests..."
python3 run_tests.py PLATFORM=$NAME ID=$REPLY
exit 0
fi
if [[ "$REPLY" -eq 4 ]]; then
echo "Camera tests..."
python3 run_tests.py PLATFORM=$NAME ID=$REPLY
exit 0
fi
if [[ "$REPLY" -eq 5 ]]; then
echo "Master process tests..."
python3 run_tests.py PLATFORM=$NAME ID=$REPLY
exit
fi
if [[ "$REPLY" -eq 6 ]]; then
echo "Running all tests..."
python3 run_tests.py PLATFORM=$NAME ID=$REPLY
exit 0
fi
else
echo "Unknown test type ${REPLY} was selected" >&2
exit 1
fi