forked from trendmicro/tlsh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmake.sh
executable file
·72 lines (60 loc) · 1.21 KB
/
make.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
#!/bin/sh
####################################################
# process command line options
####################################################
OPTION=$1
notest=0
if [ "$OPTION" = "-notest" ]; then
notest=1
fi
####################################################
if [ $# -eq 1 -a "$1" = "debug" ]; then
mkdir -p build/debug
cd build/debug
cmake -DCMAKE_BUILD_TYPE=Debug ../..
else
mkdir -p build/release
cd build/release
cmake ../..
fi
makecversion=0
if [ $# -eq 1 -a "$1" = "-c" ]; then
makecversion=1
fi
make
cd ../../bin
cmake -E create_symlink tlsh_unittest tlsh
cd -
if test $notest = 0
then
echo
echo "==========="
echo "Cmake Tests"
echo "==========="
make test
fi
cd ../..
if test $makecversion = 1
then
echo
echo "==========="
echo "make c standalone version"
echo "==========="
cd src_c_standalone
make
cd ..
fi
if test $notest = 0
then
echo
echo "====================="
echo "tests on example data"
echo "====================="
cd Testing
./test.sh | grep -E "(^test|^passed|error|^Running|Scenario)"
echo "====================="
echo "tests tlsh_pattern"
echo "====================="
./test_pattern.sh | grep -E "(^test|^passed|error|^Running|Scenario)"
cd ..
fi