-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
138 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#usr/bin/env bash | ||
|
||
source venv/bin/activate | ||
|
||
pip install -r requirements.txt | ||
|
||
flake8 --output-file reports/flake8.txt --benchmark --count --statistics fuzzing run_fuzzer.py | ||
|
||
nosetests --with-coverage --cover-branches --cover-inclusive --cover-html --cover-html-dir=reports/coverage --cover-xml --cover-xml-file=reports/coverage.xml tests/ | ||
|
||
paver docs | ||
|
||
paver sdist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
""" Provide tasks for build and deployment. | ||
This file provides tasks for paver. | ||
""" | ||
|
||
from paver.easy import * | ||
from paver.doctools import html, doc_clean | ||
from paver.setuputils import setup | ||
from setuptools import setup, find_packages | ||
from setuptools.command.test import test as TestCommand | ||
|
||
import sys | ||
|
||
|
||
sys.path.insert(0, './') | ||
|
||
|
||
class PyTest(TestCommand): | ||
"""This is a plug-in for setuptools. | ||
It will invoke py.test when you run python setup.py test | ||
""" | ||
def finalize_options(self): | ||
"""Configure.""" | ||
TestCommand.finalize_options(self) | ||
self.test_args = [] | ||
self.test_suite = True | ||
|
||
def run_tests(self): | ||
"""Execute tests.""" | ||
import pytest # import here, because outside the required eggs aren't loaded yet | ||
sys.exit(pytest.main(self.test_args)) | ||
|
||
|
||
version = '0.3.3' | ||
|
||
setup(name="fuzzing", | ||
version=version, | ||
description="Tools for stress testing applications.", | ||
long_description=open("README.rst").read(), | ||
classifiers=[ # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers | ||
'Development Status :: 4 - Beta', | ||
'Intended Audience :: Developers', | ||
'License :: OSI Approved :: MIT License', | ||
'Programming Language :: Python', | ||
'Programming Language :: Python :: 3.4', | ||
'Programming Language :: Python :: 3.5', | ||
'Programming Language :: Python :: 3.6', | ||
'Programming Language :: Python :: 3 :: Only', | ||
'Programming Language :: Python :: Implementation :: CPython', | ||
'Programming Language :: Python :: Implementation :: PyPy', | ||
'Topic :: Software Development :: Libraries :: Python Modules', | ||
'Topic :: Software Development :: Testing' | ||
], | ||
keywords="development tools", # Separate with spaces | ||
author="Stefan Braun", | ||
author_email="sb@action.ms", | ||
url="https://github.com/stbraun/fuzzing", | ||
license="MIT", | ||
packages=find_packages(exclude=['examples', 'tests']), | ||
include_package_data=True, | ||
zip_safe=False, | ||
tests_require=['pytest', 'behave>=1.2.4'], | ||
cmdclass={'test': PyTest}, | ||
scripts=['run_fuzzer.py', ], | ||
|
||
# List of packages that this one depends upon: | ||
install_requires=['sphinx', 'wrapt', 'PyYAML', 'argh', 'pathtools', 'setuptools'], | ||
requires=['sphinx', 'wrapt', 'PyYAML', 'argh', 'pathtools', 'setuptools'], | ||
provides=['fuzzing', 'gp_decorators'], | ||
# entry_points={ | ||
# 'console_scripts': | ||
# ['fuzzing=fuzzing:main'] | ||
# } | ||
) | ||
|
||
|
||
options( | ||
sphinx=Bunch( | ||
builddir="build", | ||
sourcedir="source", | ||
) | ||
) | ||
|
||
|
||
@task | ||
def clean(): | ||
"""Remove build artifacts.""" | ||
sh('rm -rf build dist') | ||
|
||
|
||
@task | ||
def test_coverage(): | ||
"""Run nosetests with coverage.""" | ||
sh('nosetests --with-coverage --cover-branches --cover-inclusive --cover-html --cover-html-dir=reports/coverage --cover-xml --cover-xml-file=reports/coverage.xml tests/ ') | ||
|
||
|
||
@task | ||
def analyze(): | ||
"""Analyze project using flake8.""" | ||
sh("rm -f reports/flake8.txt") | ||
sh("flake8 --output-file reports/flake8.txt --benchmark --count --statistics fuzzing run_fuzzer.py") | ||
|
||
|
||
@task | ||
@needs('generate_setup', 'minilib', 'setuptools.command.sdist') | ||
def sdist(): | ||
"""Overrides sdist to make sure that our setup.py is generated.""" | ||
pass | ||
|
||
|
||
@task | ||
@needs('doc_clean', 'html') | ||
def docs(): | ||
"""Rebuild documentation.""" | ||
pass | ||
|
||
|
||
@task | ||
@needs('clean', 'test_coverage', 'analyze', 'sdist', 'docs') | ||
def build(): | ||
"""Perform a complete build.""" | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,5 @@ watchdog>=0.8.2 | |
Sphinx | ||
behave | ||
setuptools | ||
Paver | ||
pylint |