Skip to content

Commit

Permalink
Merge pull request #238 from plone/no-jenkins-xvfb
Browse files Browse the repository at this point in the history
Delegate ports and xvfb to job code
  • Loading branch information
gforcada committed Oct 4, 2018
2 parents 3cdfa2c + 7e8d6db commit d23f28b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 15 deletions.
14 changes: 6 additions & 8 deletions jobs/jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,12 @@

<<: *plone-basic

- job-template: &plone-xvfb
name: 'generic plone plus xvfb on it'
- job-template: &plone-no-ports-no-xvfb
name: 'generic plone without ports allocation nor xvfb'

wrappers:
- custom-workspace-cleanup
- custom-timeout
- custom-port-allocator
- custom-xvfb
- build-user-vars
- custom-github-api-key

Expand Down Expand Up @@ -314,7 +312,7 @@
other-files:
- robot_*.png

<<: *plone-xvfb
<<: *plone-no-ports-no-xvfb


- job-template:
Expand Down Expand Up @@ -541,7 +539,7 @@
body:
!include-raw: scripts/plips.email

<<: *plone-xvfb
<<: *plone-no-ports-no-xvfb


- job:
Expand Down Expand Up @@ -732,7 +730,7 @@
body:
!include-raw: scripts/pr.email

<<: *plone-xvfb
<<: *plone-no-ports-no-xvfb

- job-template:
name: 'pull-request-{python-version}'
Expand Down Expand Up @@ -806,7 +804,7 @@
body:
!include-raw: scripts/pr.email

<<: *plone-xvfb
<<: *plone-no-ports-no-xvfb

- job-template:
name: 'test-addon-{plone-version}'
Expand Down
2 changes: 1 addition & 1 deletion jobs/scripts/4.3-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
bin/buildout -c jenkins.cfg

ROBOT_BROWSER=chrome
bin/jenkins-alltests -1
xvfb-run -a --server-args='-screen 0 1920x1200x24' bin/jenkins-alltests -1
4 changes: 2 additions & 2 deletions jobs/scripts/plips.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ buildout -c {buildout}
return_code="all_right"
ROBOT_BROWSER=chrome

bin/alltests --xml --all || return_code=$?
bin/alltests-at --xml || return_code=$?
xvfb-run -a --server-args='-screen 0 1920x1200x24' bin/alltests --xml --all || return_code=$?
xvfb-run -a --server-args='-screen 0 1920x1200x24' bin/alltests-at --xml || return_code=$?

if [ $return_code = "all_right" ]; then
return_code=$?
Expand Down
6 changes: 3 additions & 3 deletions jobs/scripts/pr-tests-py2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ return_code="all_right"

ROBOT_BROWSER="chrome"
if [ "{plone-version}" = "4.3" ]; then
bin/jenkins-alltests -1 || return_code=$?
xvfb-run -a --server-args='-screen 0 1920x1200x24' bin/jenkins-alltests -1 || return_code=$?
else
bin/alltests --xml --all || return_code=$?
bin/alltests-at --xml || return_code=$?
xvfb-run -a --server-args='-screen 0 1920x1200x24' bin/alltests --xml --all || return_code=$?
xvfb-run -a --server-args='-screen 0 1920x1200x24' bin/alltests-at --xml || return_code=$?
fi

if [ $return_code = "all_right" ]; then
Expand Down
2 changes: 1 addition & 1 deletion jobs/scripts/pr-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pip install -r requirements.txt
buildout -c py3.cfg

return_code="all_right"
./bin/test --xml -vvv || return_code=$?
xvfb-run -a --server-args='-screen 0 1920x1200x24' bin/test --xml -vvv || return_code=$?

if [ $return_code = "all_right" ]; then
return_code=$?
Expand Down

0 comments on commit d23f28b

Please sign in to comment.