-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtests.sh
53 lines (48 loc) · 1.34 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
#!/bin/bash
# Prompt the user to choose a test
echo "Please choose a test to perform:"
echo "1. Test classify"
echo "2. Test image_helper"
echo "3. Test mnist"
echo "4. Test train"
echo "5. Exit"
# Read user input
read -p "Enter your choice (1-5): " choice
# Delete and create build directory
rm -rf build && mkdir build
# Enter in build and run cmake
cd build && cmake .. &&
# Execute the corresponding test based on the user's choice
case $choice in
1)
echo "Running Test classify..."
make classify_lib_test && cd test
chmod +x ./test_classify/classify_lib_test
./test_classify/classify_lib_test
;;
2)
echo "Running Test image_helper..."
make image_helper_lib_test && cd test
chmod +x ./test_image_helper/image_helper_lib_test
./test_image_helper/image_helper_lib_test
;;
3)
echo "Running Test mnist..."
make mnist_lib_test && cd test
chmod +x ./test_mnist/mnist_lib_test
./test_mnist/mnist_lib_test
;;
4)
echo "Running Test train..."
make train_lib_test && cd test
chmod +x ./test_train/train_lib_test
./test_train/train_lib_test
;;
5)
echo "Exiting..."
exit 0
;;
*)
echo "Invalid choice. Please enter a number between 1 and 5."
;;
esac