2015-10-26 17:11:36 +01:00
|
|
|
language: python
|
|
|
|
|
|
|
|
python:
|
2016-12-13 18:36:18 +01:00
|
|
|
- 2.7
|
|
|
|
- 3.3
|
|
|
|
- 3.4
|
|
|
|
- 3.5
|
|
|
|
- nightly
|
2015-10-26 17:11:36 +01:00
|
|
|
|
2015-10-27 10:59:35 +01:00
|
|
|
sudo: required
|
2016-12-09 17:41:19 +01:00
|
|
|
# do we need sudo? should double check
|
2015-10-27 10:59:35 +01:00
|
|
|
|
2015-11-24 15:03:57 +01:00
|
|
|
dist: trusty
|
|
|
|
|
2015-10-27 10:59:35 +01:00
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
2015-11-24 15:03:57 +01:00
|
|
|
# General dependencies
|
2015-10-27 10:59:35 +01:00
|
|
|
- p7zip-full
|
2015-11-24 15:03:57 +01:00
|
|
|
# generic.py dependencies
|
|
|
|
- ghostscript
|
|
|
|
# Testing dependencies
|
2015-11-20 11:47:47 +01:00
|
|
|
- mercurial
|
2015-10-27 10:59:35 +01:00
|
|
|
|
2015-10-26 17:11:36 +01:00
|
|
|
install:
|
2015-11-24 15:03:57 +01:00
|
|
|
# General dependencies
|
2015-11-24 15:09:27 +01:00
|
|
|
- sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ trusty multiverse" && sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ trusty-updates multiverse"
|
|
|
|
- sudo apt-get update -qq
|
|
|
|
- sudo apt-get install -y p7zip-rar
|
2015-11-24 15:03:57 +01:00
|
|
|
# generic.py: pdf2htmlEX + dependencies
|
2015-10-27 10:59:35 +01:00
|
|
|
- sudo add-apt-repository ppa:fontforge/fontforge --yes
|
2015-11-24 15:09:27 +01:00
|
|
|
# to get a working 0.26 poppler
|
|
|
|
- sudo add-apt-repository ppa:delayargentina/delayx --yes
|
2015-10-27 10:59:35 +01:00
|
|
|
- sudo apt-get update -qq
|
2015-11-24 15:09:27 +01:00
|
|
|
- sudo apt-get install -y libpoppler-dev libpoppler-private-dev libspiro-dev libcairo-dev libpango1.0-dev libfreetype6-dev libltdl-dev libfontforge-dev python-imaging python-pip firefox xvfb
|
2015-10-27 10:59:35 +01:00
|
|
|
- git clone https://github.com/coolwanglu/pdf2htmlEX.git
|
|
|
|
- pushd pdf2htmlEX
|
|
|
|
- cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DENABLE_SVG=ON .
|
|
|
|
- make
|
|
|
|
- sudo make install
|
|
|
|
- popd
|
2015-11-24 15:03:57 +01:00
|
|
|
# generic.py: Other dependencies
|
2016-05-09 18:09:49 +02:00
|
|
|
- sudo apt-get install -y libreoffice libreoffice-script-provider-python unoconv
|
2015-11-24 15:03:57 +01:00
|
|
|
# filecheck.py dependencies
|
2016-05-09 17:38:32 +02:00
|
|
|
- sudo apt-get install libxml2-dev libxslt1-dev
|
2015-11-03 11:54:38 +01:00
|
|
|
- wget https://didierstevens.com/files/software/pdfid_v0_2_1.zip
|
|
|
|
- unzip pdfid_v0_2_1.zip
|
2016-12-09 17:41:19 +01:00
|
|
|
- pip install -U pip
|
|
|
|
- pip install lxml exifread pillow
|
2016-12-16 20:09:13 +01:00
|
|
|
- pip install olefile
|
|
|
|
- pip install git+https://github.com/decalage2/oletools.git
|
2016-12-09 17:41:19 +01:00
|
|
|
- pip install git+https://github.com/Rafiot/officedissector.git
|
2016-12-07 17:29:18 +01:00
|
|
|
# Module dependencies
|
|
|
|
- pip install -r dev-requirements.txt
|
2016-12-09 17:41:19 +01:00
|
|
|
- pip install coveralls codecov
|
2015-11-24 15:03:57 +01:00
|
|
|
# Testing dependencies
|
|
|
|
- sudo apt-get install rar
|
2016-12-07 17:29:18 +01:00
|
|
|
# Prepare tests
|
2016-02-01 11:45:50 +01:00
|
|
|
# Zoo
|
2015-11-03 17:56:42 +01:00
|
|
|
- git clone https://github.com/Rafiot/theZoo.git
|
|
|
|
- pushd theZoo/malwares/Binaries
|
|
|
|
- python unpackall.py
|
2015-11-03 16:26:02 +01:00
|
|
|
- popd
|
2016-12-24 22:46:22 +01:00
|
|
|
- mv theZoo/malwares/Binaries/out tests/src_invalid/
|
2016-12-09 17:41:19 +01:00
|
|
|
# Path traversal
|
|
|
|
- git clone https://github.com/jwilk/path-traversal-samples
|
|
|
|
- pushd path-traversal-samples
|
|
|
|
- pushd zip
|
|
|
|
- make
|
|
|
|
- popd
|
|
|
|
- pushd rar
|
|
|
|
- make
|
|
|
|
- popd
|
|
|
|
- popd
|
2016-12-24 22:46:22 +01:00
|
|
|
- mv path-traversal-samples/zip/*.zip tests/src_invalid/
|
|
|
|
- mv path-traversal-samples/rar/*.rar tests/src_invalid/
|
2016-02-01 11:45:50 +01:00
|
|
|
# Office docs
|
2016-05-16 20:15:38 +02:00
|
|
|
- git clone https://github.com/eea/odfpy.git
|
2016-12-24 22:46:22 +01:00
|
|
|
- mv odfpy/tests/examples/* tests/src_invalid/
|
|
|
|
- pushd tests/src_invalid/
|
2016-05-14 20:03:40 +02:00
|
|
|
- wget https://bitbucket.org/decalage/olefileio_pl/raw/3073963b640935134ed0da34906fea8e506460be/Tests/images/test-ole-file.doc
|
2016-12-07 17:09:11 +01:00
|
|
|
- wget --no-check-certificate https://www.officedissector.com/corpus/fraunhoferlibrary.zip
|
2016-05-09 17:45:21 +02:00
|
|
|
- unzip -o fraunhoferlibrary.zip
|
2016-05-11 10:57:18 +02:00
|
|
|
- rm fraunhoferlibrary.zip
|
2016-05-16 11:39:19 +02:00
|
|
|
- 7z x 42.zip -p42
|
2016-05-16 20:32:56 +02:00
|
|
|
- wget http://www.sample-videos.com/audio/mp3/india-national-anthem.mp3
|
|
|
|
- wget http://www.sample-videos.com/video/mp4/720/big_buck_bunny_720p_1mb.mp4
|
2016-05-16 21:02:55 +02:00
|
|
|
- wget http://thewalter.net/stef/software/rtfx/sample.rtf
|
|
|
|
- echo "blah" > test.obj
|
2016-05-09 17:45:21 +02:00
|
|
|
- popd
|
2015-10-26 17:11:36 +01:00
|
|
|
|
|
|
|
script:
|
2016-12-07 17:29:18 +01:00
|
|
|
- travis_wait 60 py.test --cov=kittengroomer --cov=bin tests/
|
2015-10-26 17:11:36 +01:00
|
|
|
|
2015-11-24 11:32:44 +01:00
|
|
|
notifications:
|
|
|
|
email:
|
|
|
|
on_success: change
|
|
|
|
on_failure: change
|
|
|
|
|
2015-10-26 17:11:36 +01:00
|
|
|
after_success:
|
|
|
|
- coveralls
|
|
|
|
- codecov
|