Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 114 lines (106 sloc) 4.728 kb
8b2274f Comments for main sections added.
Timo Stollenwerk authored
1 # -----------------------------------------------------------------------------
2 # JENKINS BUILDOUT FOR PLONE PROJECTS
3 # -----------------------------------------------------------------------------
9e2a1c3 Allow testing of multiple packages. Rename package-name to jenkins-test-...
tisto authored
4 # This buildout needs to be extended by overriding the
5 # jenkins-test-eggs variable. See README.txt for more details.
6 # -----------------------------------------------------------------------------
97d6bbc Copy hudson.cfg from collective.
Timo Stollenwerk authored
7 [buildout]
1f6752e Whitespace
Timo Stollenwerk authored
8 parts +=
5733313 Simplify coverage section.
Timo Stollenwerk authored
9 zopepy
ffa347f Rename xmltest into jenkins-test.
Timo Stollenwerk authored
10 jenkins-test
3c54e90 @garbas robot tests should be ran separatly
garbas authored
11 jenkins-test-robot
8647821 Rename coverage script to jenkins-test-coverage; comments added;
Timo Stollenwerk authored
12 jenkins-test-coverage
4a80476 Fix code coverage.
Timo Stollenwerk authored
13 coverage
97d6bbc Copy hudson.cfg from collective.
Timo Stollenwerk authored
14
9e2a1c3 Allow testing of multiple packages. Rename package-name to jenkins-test-...
tisto authored
15 # This value needs to be overridden in the buildout file that extends this
799ffd8 Remove unused report section. Jenkins takes care of generating a report.
Timo Stollenwerk authored
16 # buildout.
9e2a1c3 Allow testing of multiple packages. Rename package-name to jenkins-test-...
tisto authored
17 jenkins-test-eggs =
0e1ded3 Rename jenkins-code-analysis-directories to jenkins-test-directories (si...
tisto authored
18 jenkins-test-directories =
9e2a1c3 Allow testing of multiple packages. Rename package-name to jenkins-test-...
tisto authored
19
5733313 Simplify coverage section.
Timo Stollenwerk authored
20 [zopepy]
21 recipe = zc.recipe.egg
9e2a1c3 Allow testing of multiple packages. Rename package-name to jenkins-test-...
tisto authored
22 eggs = ${buildout:jenkins-test-eggs}
5733313 Simplify coverage section.
Timo Stollenwerk authored
23 interpreter = zopepy
24 scripts = zopepy
25
8b2274f Comments for main sections added.
Timo Stollenwerk authored
26 # -----------------------------------------------------------------------------
27 # JENKINS TESTS
28 # -----------------------------------------------------------------------------
1f6752e Whitespace
Timo Stollenwerk authored
29 # Creates a "jenkins-test" script in the bin directory of the buildout that
8647821 Rename coverage script to jenkins-test-coverage; comments added;
Timo Stollenwerk authored
30 # runs the tests and outputs the results in an XML format that Jenkins can read
31 # and process.
1f6752e Whitespace
Timo Stollenwerk authored
32 #
33 # The output files can be included in Jenkins by enabling the
34 # "Publish JUnit test result report" setting in the "Post-build Actions"
8647821 Rename coverage script to jenkins-test-coverage; comments added;
Timo Stollenwerk authored
35 # section of the Job configuration. The "Test report XMLs" field needs to point
d810151 Store coverage report in parts.
Timo Stollenwerk authored
36 # to "parts/jenkins-test/testreports/*.xml".
8647821 Rename coverage script to jenkins-test-coverage; comments added;
Timo Stollenwerk authored
37 # -----------------------------------------------------------------------------
ffa347f Rename xmltest into jenkins-test.
Timo Stollenwerk authored
38 [jenkins-test]
97d6bbc Copy hudson.cfg from collective.
Timo Stollenwerk authored
39 recipe = collective.xmltestreport
c081094 @garbas zope.app.testing shouldn't be there
garbas authored
40 eggs = ${buildout:jenkins-test-eggs}
ffa347f Rename xmltest into jenkins-test.
Timo Stollenwerk authored
41 script = jenkins-test
f11bb4a Revert "Revert "make sure translations get compiled so the translation d...
Timo Stollenwerk authored
42 environment = jenkins-test-env
4c53fda @mpeeters Activate the relative-paths option to avoid errors with shared workspace...
mpeeters authored
43 relative-paths = true
3ea2e59 Run robot tests together with all other tests.
Timo Stollenwerk authored
44 # XXX: For now we run robot tests together with all other tests
45 #defaults = ['--auto-color', '--auto-progress', '--xml', '-t', '!robot_']
ec3aa43 @davisagli don't scan js packages for python tests
davisagli authored
46 defaults = ['--auto-color', '--auto-progress', '--xml', '--ignore_dir=bower_components', '--ignore_dir=node_modules']
97d6bbc Copy hudson.cfg from collective.
Timo Stollenwerk authored
47
f11bb4a Revert "Revert "make sure translations get compiled so the translation d...
Timo Stollenwerk authored
48 [jenkins-test-env]
49 zope_i18n_compile_mo_files = true
ddb5315 Use uppercase BUILDOUT_DIR var.
Timo Stollenwerk authored
50 BUILDOUT_DIR = ${buildout:directory}
01e7a09 @datakurre Set ROBOTSUITE_LOGLEVEL = ERROR to filter out warning bloat from robot l...
datakurre authored
51 ROBOTSUITE_LOGLEVEL = ERROR
3c54e90 @garbas robot tests should be ran separatly
garbas authored
52
53 # -----------------------------------------------------------------------------
3ea2e59 Run robot tests together with all other tests.
Timo Stollenwerk authored
54 # JENKINS ROBOT TESTS: XXX: Not working yet!!!
3c54e90 @garbas robot tests should be ran separatly
garbas authored
55 # -----------------------------------------------------------------------------
56 # Creates a "jenkins-test-robot" script in the bin directory of the buildout that
57 # runs the tests and outputs the results in an XML format that Jenkins can read
58 # and process.
59 #
60 # The output files can be included in Jenkins by enabling the
61 # "Publish Robot Framework test results" setting in the "Post-build Actions"
62 # section of the Job configuration. You then have to set fields as shown below:
63 # - Directory of Robot output: parts/test
64 # - Log/Report link: robot_log.html
65 # - Output xml name: robot_output.xml
66 # - Report html name: robott_report.html
67 # - Log html name: robot_log.html
68 # -----------------------------------------------------------------------------
69 [jenkins-test-robot]
0bf11a8 @garbas passing of arguments was wrong
garbas authored
70 <= jenkins-test
3c54e90 @garbas robot tests should be ran separatly
garbas authored
71 script = jenkins-test-robot
72 environment = jenkins-test-env
ec3aa43 @davisagli don't scan js packages for python tests
davisagli authored
73 defaults = ['--auto-color', '--auto-progress', '--xml', '-t', 'robot_', '--ignore_dir=bower_components', '--ignore_dir=node_modules']
3c54e90 @garbas robot tests should be ran separatly
garbas authored
74
8b2274f Comments for main sections added.
Timo Stollenwerk authored
75 # -----------------------------------------------------------------------------
76 # JENKINS TEST COVERAGE
77 # -----------------------------------------------------------------------------
8647821 Rename coverage script to jenkins-test-coverage; comments added;
Timo Stollenwerk authored
78 # Creates a "jenkins-test-coverage" script in the bin directory of the buildout
4a80476 Fix code coverage.
Timo Stollenwerk authored
79 # that runs a code coverage analysis and creates a report in an XML format that
5733313 Simplify coverage section.
Timo Stollenwerk authored
80 # Jenkins can read and process. There is no need to run "bin/jenkins-test"
81 # before
4a80476 Fix code coverage.
Timo Stollenwerk authored
82 [jenkins-test-coverage]
83 recipe = collective.recipe.template
84 input = inline:
85 #!/bin/sh
75971aa Refactor jenkins-test-coverage to work with multiple source directories.
tisto authored
86 # Remove old results
87 echo "Erase old coverage results."
88 bin/coverage erase
89 # Collect test coverage results for all packages
90 echo "Run test coverage analysis for all packages."
0e1ded3 Rename jenkins-code-analysis-directories to jenkins-test-directories (si...
tisto authored
91 DIRECTORIES="${buildout:jenkins-test-directories}"
75971aa Refactor jenkins-test-coverage to work with multiple source directories.
tisto authored
92 for pkgdir in $DIRECTORIES
93 do
94 # Runs a code coverage analysis on top of the "jenkins-test" script for
95 # all packages. The data will be collected in a ".coverage" output file
96 # in the buildout directory.
97 echo "Analyse $pkgdir"
98 bin/coverage run -p --source=$pkgdir bin/jenkins-test --all
99 done
100 echo "Create test coverage report."
101 # Combine all package analysis
102 bin/coverage combine
5733313 Simplify coverage section.
Timo Stollenwerk authored
103 # Generates a "coverage.xml" file that Jenkins can read and process from the
104 # ".coverage" file that the coverage report created.
d810151 Store coverage report in parts.
Timo Stollenwerk authored
105 bin/coverage xml -i -o ${buildout:directory}/parts/jenkins-test/coverage.xml
5733313 Simplify coverage section.
Timo Stollenwerk authored
106 echo "Test coverage report finished."
4a80476 Fix code coverage.
Timo Stollenwerk authored
107 output = ${buildout:directory}/bin/jenkins-test-coverage
108 mode = 755
109
8a67a71 Fix code coverage report.
Timo Stollenwerk authored
110 [coverage]
111 recipe = zc.recipe.egg
112 eggs = coverage
5733313 Simplify coverage section.
Timo Stollenwerk authored
113 interpreter = ${buildout:directory}/bin/zopepy
Something went wrong with that request. Please try again.