jjb: use tox to run lttng-analyses build
authorMichael Jeanson <mjeanson@efficios.com>
Mon, 8 Aug 2016 21:52:04 +0000 (17:52 -0400)
committerMichael Jeanson <mjeanson@efficios.com>
Mon, 8 Aug 2016 21:52:04 +0000 (17:52 -0400)
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
jobs/lttng-analyses.yaml
scripts/lttng-analyses/build.sh

index 2bb45ed9f0e8b7d32a6725f2e4bfd4b7e3a7709e..dc8603987bd2f6c747b09d8958d7dd3a7d670214 100644 (file)
       - timestamps
       - ansicolor:
           colormap: xterm
+      - credentials-binding:
+          - username-password-separated:
+              credential-id: lttng-analyses_codecov_token
+              username: CODECOV_PROJECT_NAME
+              password: CODECOV_TOKEN
 
     scm:
       - git:
@@ -21,6 +26,7 @@
           branches:
             - origin/{version}
           basedir: src/lttng-analyses
+          skip-tag: true
 
     triggers:
       - pollscm:
       - shell:
          !include-raw-escape: scripts/lttng-analyses/build.sh
 
-#    publishers:
+    publishers:
 #      - archive:
 #          artifacts: 'build/**'
 #          allow-empty: false
+      - ircbot:
+          strategy: new-failure-and-fixed
+          matrix-notifier: only-parent
+          channels:
+            - name: '#lttng'
 
 
 - job-template:
index f5b412eac213e8f069e268f61862f0ecea793442..446245625d5076dc38f6255817df910ec4aa4436 100755 (executable)
@@ -15,6 +15,9 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+# Has to be set in the environment
+#CODECOV_TOKEN=""
+
 SRCDIR="src/lttng-analyses"
 
 PYTHON3="python3"
@@ -29,19 +32,31 @@ export PATH="$PATH:$BABELTRACE_DIR/bin"
 PYENV_HOME=$WORKSPACE/.pyenv/
 
 # Delete previously built virtualenv
-if [ -d $PYENV_HOME ]; then
-    rm -rf $PYENV_HOME
+if [ -d "$PYENV_HOME" ]; then
+    rm -rf "$PYENV_HOME"
 fi
 
 # Create virtualenv and install necessary packages
-virtualenv --system-site-packages -p $PYTHON3 $PYENV_HOME
+virtualenv --system-site-packages -p $PYTHON3 "$PYENV_HOME"
 
 set +u
-. $PYENV_HOME/bin/activate
+. "$PYENV_HOME/bin/activate"
 set -u
 
-cd "$SRCDIR"
+pip install --quiet codecov
+pip install --quiet tox
+
+# Hack for path too long in venv wrapper shebang
+TMPDIR=$(mktemp -d)
+cd "$TMPDIR"
+ln -s "$WORKSPACE/$SRCDIR" src
+cd src
+
+# Run base test suites and long regression test suite
+for suite in py3 noutf8 pep8 longregression; do
+       export TOXENV="$suite"
+       tox
+       codecov -e TOXENV
+done
 
-$PYTHON3 setup.py build
-$PYTHON3 setup.py test
-$PYTHON3 setup.py install
+unset TOXENV
This page took 0.024791 seconds and 4 git commands to generate.