Skip to content

Commit 73ac0c4

Browse files
author
Olivier Delaere
committed
Added tests in plone 5.1 ans 5.2
1 parent ac5bc4e commit 73ac0c4

16 files changed

+333
-90
lines changed

.travis.yml

Lines changed: 44 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,61 @@
1+
os:
2+
- linux
3+
dist: bionic
14
language: python
25

3-
sudo: required
4-
56
cache:
7+
pip: true
68
directories:
7-
- buildout-cache
9+
- eggs
10+
- zint-2.8.0
11+
12+
matrix:
13+
include:
14+
- python: "2.7"
15+
env: PLONE_VERSION=4
16+
- python: "2.7"
17+
env: PLONE_VERSION=51
18+
- python: "2.7"
19+
env: PLONE_VERSION=52
20+
- python: "3.7.7"
21+
env: PLONE_VERSION=52
22+
- python: "3.8"
23+
env: PLONE_VERSION=52
824

9-
python:
10-
- 2.7
25+
jobs:
26+
fast_finish: true
1127

1228
before_install:
13-
- sudo apt-get install libpng12-dev cmake libqt4-dev libqt5widgets5 qttools5-dev
14-
- sudo wget -O zint_2.6.0_amd64.deb https://sourceforge.net/projects/zint/files/zint/2.6.0/zint_2.6.0_amd64.deb/download
15-
- sudo dpkg -i zint_2.6.0_amd64.deb
29+
- sudo apt-get update
30+
- sudo apt-get -y install g++ libpng-dev cmake libqt4-dev libqt5widgets5 qttools5-dev
31+
- sudo wget -t 3 -T 60 --waitretry 5 -O zint-2.8.0.tar.gz https://sourceforge.net/projects/zint/files/zint/2.8.0/zint-2.8.0.tar.gz/download
32+
- sudo tar -xf zint-2.8.0.tar.gz
33+
- cd zint-2.8.0
34+
- sudo cmake .
35+
- sudo make
36+
- sudo make install
37+
- cd ..
38+
- virtualenv -p `which python` .
39+
- bin/pip install -r requirements.txt
40+
- cp test_plone$PLONE_VERSION.cfg buildout.cfg
1641

1742
install:
18-
- mkdir -p buildout-cache/{eggs,downloads}
19-
- python bootstrap.py --version=2.11.3 -c travis.cfg
20-
- bin/buildout -c travis.cfg -N annotate
21-
- bin/buildout -c travis.cfg -Nqt 5
43+
- bin/buildout annotate
44+
- bin/buildout
45+
46+
before_script:
47+
- 'export DISPLAY=:99.0'
48+
- Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
49+
- sleep 3
50+
- firefox -v
2251

2352
script:
2453
- bin/test
2554

2655
after_success:
27-
- bin/coverage run bin/test
28-
- pip install -q coveralls==0.5
29-
- coveralls
56+
- bin/createcoverage --output-dir=parts/test/coverage
57+
- bin/pip install -q coveralls
58+
- bin/coveralls
3059

3160
notifications:
3261
email:

Makefile

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
#!/usr/bin/make
22
#
33
all: run
4+
py:=2.7
5+
plone:=52
46

57
.PHONY: bootstrap buildout run test cleanall
68
bootstrap:
7-
virtualenv-2.7 .
8-
./bin/python bootstrap.py --version=2.10.0 --setuptools-version=33.1.1
9+
if [ -f /usr/bin/virtualenv-2.7 ] ; then virtualenv-2.7 -p python$(py) .;else virtualenv -p python$(py) .;fi
10+
bin/pip install -r requirements.txt
11+
./bin/python bootstrap.py --version=2.13.2
912

1013
buildout:
14+
cp test_plone$(plone).cfg buildout.cfg
1115
if ! test -f bin/buildout;then make bootstrap;fi
12-
bin/buildout -Nt 5
16+
bin/buildout
1317

1418
run:
1519
if ! test -f bin/instance;then make buildout;fi
1620
bin/instance fg
1721

18-
test:
19-
if ! test -f bin/test;then make buildout;fi
20-
rm -fr htmlcov
21-
bin/coverage.sh
22+
test: buildout
23+
bin/test
2224

2325
cleanall:
2426
rm -fr bin develop-eggs htmlcov include .installed.cfg lib .mr.developer.cfg parts downloads eggs

base.cfg

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
[buildout]
2+
package-name = imio.helpers
3+
package-extras = [test,pdf]
4+
5+
develop = .
6+
7+
eggs +=
8+
Pillow
9+
10+
parts +=
11+
omelette
12+
test
13+
createcoverage
14+
code-analysis
15+
16+
show-picked-versions = false
17+
allow-picked-versions = false
18+
19+
[omelette]
20+
recipe = collective.recipe.omelette
21+
eggs = ${test:eggs}
22+
23+
[test]
24+
recipe = zc.recipe.testrunner
25+
eggs =
26+
plone.app.upgrade
27+
${buildout:eggs}
28+
${buildout:package-name} ${buildout:package-extras}
29+
defaults = ['-s', '${buildout:package-name}', '--auto-color', '--auto-progress']
30+
31+
[createcoverage]
32+
recipe = zc.recipe.egg
33+
eggs = createcoverage
34+
35+
[code-analysis]
36+
recipe = plone.recipe.codeanalysis
37+
directory = src/imio
38+
flake8-ignore = E123,E124,E501,E126,E127,E128,C901

buildout.cfg

Lines changed: 73 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,74 @@
11
[buildout]
2-
extends = buildout.d/development.cfg
2+
3+
extends =
4+
https://raw.github.com/collective/buildout.plonetest/master/test-4.x.cfg
5+
https://raw.githubusercontent.com/collective/buildout.plonetest/master/qa.cfg
6+
base.cfg
7+
8+
show-picked-versions = true
9+
allow-picked-versions = true
10+
11+
# update-versions-file = test_plone4.cfg
12+
13+
[versions]
14+
setuptools = 42.0.2
15+
zc.buildout = 2.13.2
16+
configparser = 4.0.2
17+
Pillow = 4.0.0
18+
19+
# Added by buildout at 2020-06-22 13:45:36.514713
20+
PyPDF2 = 1.26.0
21+
collective.behavior.talcondition = 0.11
22+
createcoverage = 1.5
23+
flake8 = 3.8.3
24+
mccabe = 0.6.1
25+
plone.recipe.codeanalysis = 3.0.1
26+
pycodestyle = 2.6.0
27+
pyflakes = 2.2.0
28+
reportlab = 3.5.42
29+
zipp = 1.2.0
30+
31+
# Required by:
32+
# plone.recipe.codeanalysis==3.0.1
33+
check-manifest = 0.42
34+
35+
# Required by:
36+
# importlib-metadata==1.6.1
37+
# zipp==1.2.0
38+
contextlib2 = 0.6.0.post1
39+
40+
# Required by:
41+
# flake8==3.8.3
42+
enum34 = 1.1.10
43+
44+
# Required by:
45+
# flake8==3.8.3
46+
functools32 = 3.2.3.post2
47+
48+
# Required by:
49+
# flake8==3.8.3
50+
importlib-metadata = 1.6.1
51+
52+
# Required by:
53+
# Pillow==4.0.0
54+
olefile = 0.46
55+
56+
# Required by:
57+
# importlib-metadata==1.6.1
58+
pathlib2 = 2.3.5
59+
60+
# Required by:
61+
# check-manifest==0.42
62+
pep517 = 0.8.2
63+
64+
# Required by:
65+
# pathlib2==2.3.5
66+
scandir = 1.10.0
67+
68+
# Required by:
69+
# check-manifest==0.42
70+
toml = 0.10.1
71+
72+
# Required by:
73+
# flake8==3.8.3
74+
typing = 3.7.4.1

buildout.d/base.cfg

Lines changed: 0 additions & 15 deletions
This file was deleted.

buildout.d/jenkins.cfg

Lines changed: 0 additions & 24 deletions
This file was deleted.
File renamed without changes.

buildout.d/development.cfg renamed to development.cfg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
[buildout]
22
extends =
3+
https://raw.github.com/collective/buildout.plonetest/master/test-4.3.x.cfg
34
base.cfg
5+
checkouts.cfg
6+
sources.cfg
7+
versions.cfg
48

59
eggs +=
610
plone.reload

jenkins.cfg

Lines changed: 0 additions & 15 deletions
This file was deleted.

requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
setuptools==42.0.2
2+
zc.buildout==2.13.2

0 commit comments

Comments
 (0)