summary refs log tree commit diff
path: root/jenkins.sh
diff options
context:
space:
mode:
authorDaniel Wagner-Hall <dawagner@gmail.com>2015-11-16 14:30:18 -0500
committerDaniel Wagner-Hall <dawagner@gmail.com>2015-11-16 14:35:57 -0500
commit09bb5cf02fa26ac798ce5f89274eb6a047872bb9 (patch)
tree7598db38196e3ff91d5f277377de7012f6e9ca1c /jenkins.sh
parentMerge pull request #376 from matrix-org/daniel/jenkins (diff)
downloadsynapse-09bb5cf02fa26ac798ce5f89274eb6a047872bb9.tar.xz
Output results files on jenkins
Outputs:
 * results.xml
 * coverage.xml
 * violations.flake8.log
Diffstat (limited to 'jenkins.sh')
-rwxr-xr-xjenkins.sh16
1 files changed, 15 insertions, 1 deletions
diff --git a/jenkins.sh b/jenkins.sh
index 2680d16b42..0a8bde933d 100755
--- a/jenkins.sh
+++ b/jenkins.sh
@@ -1,4 +1,18 @@
 #!/bin/bash -eu
 
 export PYTHONDONTWRITEBYTECODE=yep
-TOXSUFFIX="--reporter=subunit | subunit-1to2 | subunit2junitxml --no-passthrough --output-to=results.xml" tox
+
+# Output test results as junit xml
+export TRIAL_FLAGS="--reporter=subunit"
+export TOXSUFFIX="| subunit-1to2 | subunit2junitxml --no-passthrough --output-to=results.xml"
+
+# Output coverage to coverage.xml
+export DUMP_COVERAGE_COMMAND="coverage xml -o coverage.xml"
+
+# Output flake8 violations to violations.flake8.log
+# Don't exit with non-0 status code on Jenkins,
+# so that the build steps continue and a later step can decided whether to
+# UNSTABLE or FAILURE this build.
+export PEP8SUFFIX="--output-file=violations.flake8.log || echo flake8 finished with status code \$?"
+
+exec tox