-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
99 lines (83 loc) · 3.36 KB
/
.travis.yml
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
93
94
95
96
97
98
99
language: python
matrix:
fast_finish: true
include:
- python: 2.7
- os: osx
osx_image: xcode9.3beta
language: generic
services:
- mongodb
- mysql
- postgresql
before_install:
- |
if [[ $TRAVIS_OS_NAME == "linux" ]]; then
sudo apt-get update -qq
sudo apt-get install python-dev python-libvirt libffi-dev libssl-dev
sudo apt-get install swig libpq-dev libmysqlclient-dev rar
sudo apt-get install libcairo2-dev libpng-dev libossp-uuid-dev
sudo apt-get install libfreerdp-dev libjpeg-turbo8-dev
# Install guacd.
wget https://www.apache.org/dist/guacamole/0.9.14/source/guacamole-server-0.9.14.tar.gz
tar xvf guacamole-server-0.9.14.tar.gz && cd guacamole-server-0.9.14
./configure --with-init-dir=/etc/init.d && make && sudo make install && sudo ldconfig && cd ../
sudo mysql -e "CREATE USER cuckoo@localhost IDENTIFIED BY 'cuckoo'"
sudo mysql -e "GRANT ALL PRIVILEGES ON * . * TO cuckoo@localhost"
sudo mysql -e "FLUSH PRIVILEGES"
sudo mysql -e "CREATE DATABASE cuckootest"
sudo mysql -e "CREATE DATABASE cuckootest060"
sudo mysql -e "CREATE DATABASE cuckootest11"
sudo mysql -e "CREATE DATABASE distcuckootest"
psql -U postgres -c "CREATE USER cuckoo WITH PASSWORD 'cuckoo'"
psql -U postgres -c "CREATE DATABASE cuckootest"
psql -U postgres -c "CREATE DATABASE cuckootest060"
psql -U postgres -c "CREATE DATABASE cuckootest11"
psql -U postgres -c "CREATE DATABASE distcuckootest"
sudo mysql -e "CREATE DATABASE cuckootestimport"
sudo mysql cuckootestimport < tests/files/sql/11my.sql
psql -U postgres -c "CREATE DATABASE cuckootestimport"
psql -U postgres cuckootestimport <tests/files/sql/11pg.sql >/dev/null
pip install psycopg2 mysql-python m2crypto==0.24.0 weasyprint
else
brew update || brew update
brew install libmagic cairo pango mongodb
brew services start mongodb
# The following wasn't required in the past and therefore may become
# obsolete once again in the future. Let's wait and see.
wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py
sudo pip install virtualenv
virtualenv $HOME
source $HOME/bin/activate
fi
install:
# Fetch monitor & stuff which is required for CWD migration tests.
- python stuff/monitor.py
# Bump the version of Cuckoo during tests (e.g., for new Signatures).
- python stuff/patch_version.py setup.py 3.0
- pip install -U pip setuptools
- python setup.py sdist
- pip install -e .
- pip install pytest pytest-cov codecov coveralls distorm3 pycrypto
- pip install flask-testing mock pytest-django pytest-pythonpath responses
# Install Volatility.
- git clone https://github.com/volatilityfoundation/volatility vol-setup
- cd vol-setup && python setup.py install && cd ..
script:
# Start guacd.
- |
if [[ $TRAVIS_OS_NAME == "linux" ]]; then
sudo /etc/init.d/guacd start
fi
# Create the Cuckoo Working Directory.
- cuckoo -d
# Download Cuckoo Signatures.
- cuckoo community
# Check the code integrity of the Signatures by running Cuckoo.
- cuckoo -d 2>&1|grep "Unable to bind ResultServer"
# Run tests from the "tests" directory.
- py.test --cov=cuckoo
after_success:
- coveralls
- codecov