65a4371d4d
svn path=/plone.app.discussion/branches/1.x/; revision=47033
183 lines
5.5 KiB
INI
183 lines
5.5 KiB
INI
[buildout]
|
|
extends =
|
|
http://svn.plone.org/svn/collective/buildout/plonetest/plone-4.0.x.cfg
|
|
|
|
package-name = plone.app.discussion
|
|
package-directory = plone/app/discussion
|
|
|
|
parts +=
|
|
omelette
|
|
test
|
|
pycoverage
|
|
coverage
|
|
coverage-plain
|
|
coverage-xml
|
|
coverage-html
|
|
jstestdriver-build
|
|
jstestdriver-build-coverage
|
|
jstestdriver
|
|
pylint
|
|
pylint-test
|
|
zptlint
|
|
zptlint-test
|
|
|
|
[versions]
|
|
zope.schema = 3.6.0
|
|
Sphinx <= 0.7dev
|
|
collective.recipe.sphinxbuilder = 0.6.3.3
|
|
Products.TinyMCE = 1.1.1
|
|
|
|
[omelette]
|
|
recipe = collective.recipe.omelette
|
|
eggs = ${instance:eggs}
|
|
packages = ${instance:location}/lib/python ./
|
|
|
|
[test]
|
|
recipe = collective.xmltestreport
|
|
eggs = ${buildout:package-name} [test]
|
|
defaults = ['--auto-color', '--auto-progress']
|
|
|
|
[pycoverage]
|
|
recipe = zc.recipe.egg
|
|
eggs = coverage
|
|
scripts = coverage=pycoverage
|
|
|
|
[coverage]
|
|
recipe = zc.recipe.egg
|
|
eggs = coverage
|
|
initialization =
|
|
sys.argv = sys.argv[:] + ['run', 'bin/test', '-k', '-q', '--xml']
|
|
|
|
[coverage-plain]
|
|
recipe = zc.recipe.egg
|
|
eggs = coverage
|
|
scripts = coverage=coverage-plain
|
|
initialization =
|
|
exclude = '--omit=' + '${buildout:package-directory}/tests/*'
|
|
include = '--include=' + '${buildout:package-directory}/*.py'
|
|
sys.argv = sys.argv[:] + ['report', '-i', include, exclude]
|
|
|
|
[coverage-xml]
|
|
recipe = zc.recipe.egg
|
|
eggs = coverage
|
|
scripts = coverage=coverage-xml
|
|
initialization =
|
|
exclude = '--omit=' + '${buildout:package-directory}/tests/*'
|
|
include = '--include=' + '${buildout:package-directory}/*.py'
|
|
sys.argv = sys.argv[:] + ['xml', '-i', include, exclude]
|
|
|
|
[coverage-html]
|
|
recipe = zc.recipe.egg
|
|
eggs = coverage
|
|
scripts = coverage=coverage-html
|
|
initialization =
|
|
exclude = '--omit=' + '${buildout:package-directory}/tests/*'
|
|
include = '--include=' + '${buildout:package-directory}/*.py'
|
|
sys.argv = sys.argv[:] + ['html', '-i', include, exclude]
|
|
|
|
[jstestdriver-build]
|
|
recipe = hexagonit.recipe.download
|
|
url = http://js-test-driver.googlecode.com/files/JsTestDriver-1.2.2.jar
|
|
download-only = True
|
|
destination = parts/jstestdriver
|
|
filename = JsTestDriver.jar
|
|
|
|
[jstestdriver-build-coverage]
|
|
recipe = hexagonit.recipe.download
|
|
url = http://js-test-driver.googlecode.com/files/coverage-1.2.2.jar
|
|
download-only = True
|
|
destination = parts/jstestdriver
|
|
filename = coverage.jar
|
|
|
|
[jstestdriver]
|
|
recipe = collective.recipe.template
|
|
input = inline:
|
|
#!/bin/sh
|
|
java -jar ${buildout:directory}/parts/jstestdriver/JsTestDriver.jar --port 9876 --config ${buildout:package-directory}/tests/jsTestDriver.conf --browser /usr/bin/firefox --tests all --verbose
|
|
output = ${buildout:directory}/bin/jstestdriver
|
|
mode = 755
|
|
|
|
[pylint]
|
|
recipe = zc.recipe.egg
|
|
eggs = logilab.pylintinstaller
|
|
extra-paths = ${instance:location}/lib/python
|
|
entry-points = pylint=pylint.lint:Run
|
|
arguments = sys.argv[1:]
|
|
arguments = [
|
|
'--output-format=parseable',
|
|
'--zope=y',
|
|
'--reports=y',
|
|
'--disable-msg=E0611,F0401,W0232,E1101,C0103,C0111,R0201,W0201,R0911,R0904,F0220,E1103,R0901,E0211,E0213,E1002,W0622',
|
|
'--generated-members=objects',
|
|
] + sys.argv[1:]
|
|
|
|
# Disable messages:
|
|
#
|
|
# E0611: No name %r in module %r. Used when a name cannot be found in a module.
|
|
# F0401: Unable to import %r (%s). Used when pylint has been unable to import a module.
|
|
# W0232: Class has no __init__ method. Used when a class has no __init__ method, neither its parent classes.
|
|
# C0103: Invalid name "%s" (should match %s). Used when the name doesn't match the regular expression associated to its type (constant, variable, class...).
|
|
# C0111: Message Missing docstring Description Used when a module, function, class or method has no docstring. Some special methods like init don't necessary require a docstring. Explanation…
|
|
# R0201: Method could be a function
|
|
# W0201: Attribute %r defined outside __init__
|
|
# R0911: Too many return statements (%s/%s)
|
|
|
|
# E0211: Method has no argument
|
|
# - Reason: raises an error on zope.interface definitions
|
|
# E0213 Method should have "self" as first argument
|
|
# - Reason: raises an error on zope.interface definitions
|
|
# E1121 Too many positional arguments for function call
|
|
# - Reason: ???
|
|
# E1002 Use super on an old style class
|
|
# - Reason: super(CommentsViewlet, self).update() raises an error
|
|
# W0622 total_comments: Redefining built-in 'object'
|
|
# - Reason: top level def function will not work (e.g. for catalog indexers)
|
|
# ...
|
|
# See http://pylint-messages.wikidot.com/all-messages for a full list.
|
|
|
|
[pylint-test]
|
|
recipe = collective.recipe.template
|
|
input = inline:
|
|
#!/bin/sh
|
|
if [ -s pylint.log ]; then
|
|
rm pylint.log
|
|
echo "Old pylint.log file removed"
|
|
fi
|
|
echo "Running pylint"
|
|
find -L ${buildout:package-directory} -regex ".*\.[c]?py" | xargs bin/pylint >> pylint.log
|
|
echo "finish"
|
|
output = ${buildout:directory}/bin/pylint-test
|
|
mode = 755
|
|
|
|
[zptlint]
|
|
recipe = zc.recipe.egg
|
|
eggs =
|
|
zptlint
|
|
entry-points = zptlint=zptlint:run
|
|
|
|
[zptlint-test]
|
|
recipe = collective.recipe.template
|
|
input = inline:
|
|
#!/bin/sh
|
|
if [ -e zptlint.log ]; then
|
|
echo "Old zptlint.log file removed"
|
|
rm zptlint.log
|
|
fi
|
|
echo "Running zptlint-test"
|
|
TMPL=$(find ${buildout:package-directory} -regex ".*\.[c|z]?pt")
|
|
echo "Checking"
|
|
echo $TMPL
|
|
find ${buildout:package-directory} -regex ".*\.[c|z]?pt" | xargs bin/zptlint > zptlint.log
|
|
if [ -s zptlint.log ]; then
|
|
echo "Errors were found:"
|
|
cat zptlint.log
|
|
echo "Errors were written to zptlint.log"
|
|
exit 1;
|
|
else
|
|
echo "No errors found"
|
|
rm zptlint.log
|
|
fi
|
|
output = ${buildout:directory}/bin/zptlint-test
|
|
mode = 755
|
|
|