Merge pull request #44 from Rafiot/travis

Add coverage, update logging
pull/46/head
Alexandre Dulaunoy 2016-08-12 15:20:26 +02:00 committed by GitHub
commit d499ac0ce6
4 changed files with 25 additions and 14 deletions

View File

@ -5,28 +5,35 @@ cache: pip
services:
- redis-server
addons:
apt:
packages:
- libpq5
python:
- "3.3"
- "3.4"
- "3.5"
- "3.5-dev"
- "nightly"
install:
- python setup.py install
- pip install -U nose
- pip install coveralls
- pip install codecov
- pip install -U -r REQUIREMENTS
- pip install .
script:
- misp-modules &
- sleep 15
- python setup.py test
- pkill misp-modules
- coverage run -m --parallel-mode --source=misp_modules misp_modules.__init__ &
- pid=$!
- sleep 5
- nosetests --with-coverage --cover-package=misp_modules
- kill -s INT $pid
- pushd ~/
- misp-modules -s &
- coverage run -m --parallel-mode --source=misp_modules misp_modules.__init__ -s &
- pid=$!
- popd
- sleep 15
- python setup.py test
- pkill misp-modules
- sleep 5
- nosetests --with-coverage --cover-package=misp_modules
- kill -s INT $pid
after_success:
- coverage combine .coverage*
- codecov
- coveralls

View File

@ -1,6 +1,8 @@
# MISP modules
[![Build Status](https://travis-ci.org/MISP/misp-modules.svg?branch=master)](https://travis-ci.org/MISP/misp-modules)
[![Coverage Status](https://coveralls.io/repos/github/MISP/misp-modules/badge.svg?branch=master)](https://coveralls.io/github/MISP/misp-modules?branch=master)
[![codecov](https://codecov.io/gh/MISP/misp-modules/branch/master/graph/badge.svg)](https://codecov.io/gh/MISP/misp-modules)
MISP modules are autonomous modules that can be used for expansion and other services in [MISP](https://github.com/MISP/MISP).

View File

@ -188,9 +188,11 @@ def main():
listen = args.l
log = init_logger()
if args.s:
log.info('Launch MISP modules server from package.')
load_package_helpers()
mhandlers, loaded_modules = load_package_modules()
else:
log.info('Launch MISP modules server from current directory.')
os.chdir(os.path.dirname(__file__))
modulesdir = 'modules'
helpersdir = 'helpers'

0
tests/test.py Executable file → Normal file
View File