-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrun_test
executable file
·61 lines (54 loc) · 1.41 KB
/
run_test
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
#!/bin/bash
echo "
█▀▀ █░░ ▄▀█ █▀█ ▄▀█ ▀█▀ █▀▀ █▀ ▀█▀ █ █▄░█ █▀▀
█▄▄ █▄▄ █▀█ █▀▄ █▀█ ░█░ ██▄ ▄█ ░█░ █ █░▀█ █▄█"
echo ""
OS=$(uname -s)
PACKAGE_MANAGER=""
if [[ "$OS" == "Linux" ]]; then
if command -v apt-get >/dev/null 2>&1; then
PACKAGE_MANAGER="apt-get"
elif command -v pacman >/dev/null 2>&1; then
PACKAGE_MANAGER="pacman"
else
echo "Error: Unsupported package manager. Exiting..."
exit 1
fi
elif [[ "$OS" == "Darwin" ]]; then
PACKAGE_MANAGER="brew"
else
echo "Unsupported operating system. Exiting..."
exit 1
fi
if [[ "$PACKAGE_MANAGER" == "apt-get" ]]; then
if ! dpkg -l | grep libeigen; then
sudo apt-get install libeigen3-dev
fi
elif [[ "$PACKAGE_MANAGER" == "pacman" ]]; then
if ! pacman -Q eigen; then
sudo pacman -S eigen
fi
elif [[ "$PACKAGE_MANAGER" == "brew" ]]; then
if ! brew list | grep eigen; then
brew install eigen
fi
fi
echo "Initializing Google Test"
git clone https://github.com/google/googletest.git -b release-1.11.0
cd googletest
mkdir build
cd build
cmake ..
make install
echo "Testing Clara"
cd ..
cd ..
mkdir build
cd build
cmake ..
make
echo ""
echo "Result from Clara test"
cd build
cd tests
./clara_testing