Add coverage, update logging

pull/44/head
Raphaël Vinot 2016-08-12 14:51:26 +02:00
parent 0089983661
commit b24b16b30a
4 changed files with 25 additions and 14 deletions

View File

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

View File

@ -1,6 +1,8 @@
# MISP modules # MISP modules
[![Build Status](https://travis-ci.org/MISP/misp-modules.svg?branch=master)](https://travis-ci.org/MISP/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). 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 listen = args.l
log = init_logger() log = init_logger()
if args.s: if args.s:
log.info('Launch MISP modules server from package.')
load_package_helpers() load_package_helpers()
mhandlers, loaded_modules = load_package_modules() mhandlers, loaded_modules = load_package_modules()
else: else:
log.info('Launch MISP modules server from current directory.')
os.chdir(os.path.dirname(__file__)) os.chdir(os.path.dirname(__file__))
modulesdir = 'modules' modulesdir = 'modules'
helpersdir = 'helpers' helpersdir = 'helpers'

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