From 91e6b8531944620d82e9564e4f307b0618b5e320 Mon Sep 17 00:00:00 2001 From: Dan Puttick Date: Wed, 7 Dec 2016 11:29:18 -0500 Subject: [PATCH] Updated .travis.yml to make build pass + added pytest-cov --- .travis.yml | 23 ++++++++++++----------- dev-requirements.txt | 1 + 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 71e9bc5..b3d88a4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -48,23 +48,24 @@ install: if [[ "$TRAVIS_PYTHON_VERSION" == "2.7_with_system_site_packages" ]]; then sudo pip install -U pip lxml exifread pillow sudo pip install -U git+https://github.com/Rafiot/officedissector.git - sudo pip install -U oletools olefile coveralls codecov + sudo pip install -U oletools olefile coveralls codecov pytest-cov else pip install -U pip lxml exifread pillow pip install -U git+https://github.com/Rafiot/officedissector.git - pip install -U coveralls codecov + pip install -U coveralls codecov pytest-cov fi - - python setup.py -q install + # Module dependencies + - pip install -r dev-requirements.txt # Testing dependencies - sudo apt-get install rar - # Prepare testings + # Prepare tests # Zoo - git clone https://github.com/Rafiot/theZoo.git - pushd theZoo/malwares/Binaries - python unpackall.py - popd - - mv theZoo/malwares/Binaries/out tests/src/ - # path transversal + - mv theZoo/malwares/Binaries/out tests/src_complex/ + # path traversal # - hg clone https://bitbucket.org/jwilk/path-traversal-samples # - pushd path-traversal-samples # - pushd zip @@ -74,12 +75,12 @@ install: # - make # - popd # - popd - # - mv path-traversal-samples/zip/*.zip tests/src/ - # - mv path-traversal-samples/rar/*.rar tests/src/ + # - mv path-traversal-samples/zip/*.zip tests/src_complex/ + # - mv path-traversal-samples/rar/*.rar tests/src_complex/ # Office docs - git clone https://github.com/eea/odfpy.git - - mv odfpy/tests/examples/* tests/src/ - - pushd tests/src/ + - mv odfpy/tests/examples/* tests/src_complex/ + - pushd tests/src_complex/ - wget https://bitbucket.org/decalage/olefileio_pl/raw/3073963b640935134ed0da34906fea8e506460be/Tests/images/test-ole-file.doc - wget --no-check-certificate https://www.officedissector.com/corpus/fraunhoferlibrary.zip - unzip -o fraunhoferlibrary.zip @@ -92,7 +93,7 @@ install: - popd script: - - travis_wait 60 coverage run --source=bin,kittengroomer setup.py test + - travis_wait 60 py.test --cov=kittengroomer --cov=bin tests/ notifications: email: diff --git a/dev-requirements.txt b/dev-requirements.txt index 01bdf1b..8c42eaa 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,3 +1,4 @@ twiggy python-magic pytest +pytest-cov