From: Michael Jeanson Date: Tue, 9 Aug 2016 22:03:29 +0000 (-0400) Subject: jjb: Add lttng-ust-java-tests X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=4f5133bef6efe19f0f9b3862c1fb5929d2f62358;p=lttng-ci.git jjb: Add lttng-ust-java-tests Signed-off-by: Michael Jeanson --- diff --git a/jobs/lttng-ust-java-tests.yaml b/jobs/lttng-ust-java-tests.yaml new file mode 100644 index 0000000..e04ec11 --- /dev/null +++ b/jobs/lttng-ust-java-tests.yaml @@ -0,0 +1,164 @@ +- defaults: + name: lttng-ust-java-tests + description: | + Tests for LTTng-UST's Java agent. Runs the master branch of + lttng-ust-java-tests + against the master branches of UST, lttng-tools, and Babeltrace. + +

Job is managed by Jenkins Job Builder.

+ + project-type: freestyle + + wrappers: + - workspace-cleanup + - timestamps + - ansicolor + + scm: + - git: + url: git://github.com/{github_user}/{github_name}.git + browser: githubweb + browser-url: https://github.com/{github_user}/{github_name} + branches: + - origin/{version} + basedir: lttng-ust-java-tests + skip-tag: true + + triggers: + - timed: "@hourly" + + properties: + - build-discarder: + num-to-keep: 2 + - github: + url: https://github.com/{github_user}/{github_name} + + +## Templates +- job-template: + name: lttng-ust-java-tests_{version}_build + defaults: lttng-ust-java-tests + + project-type: matrix + node: 'master' # Applies only to matrix flyweight task + axes: + - axis: + type: slave + name: arch + values: '{obj:arch}' + - axis: + type: user-defined + name: java_version + values: + - 'java-8-openjdk' + - axis: + type: user-defined + name: liburcu_version + values: + - 'master' + - axis: + type: user-defined + name: lttng_ust_version + values: + - 'master' + - axis: + type: user-defined + name: lttng_tools_version + values: + - 'master' + + wrappers: + - workspace-cleanup + - timestamps + - ansicolor + - inject: + properties-content: | + LD_LIBRARY_PATH=${{WORKSPACE}}/deps/build/lib + PATH=${{WORKSPACE}}/deps/build/bin:${{PATH}} + LTTNG_UST_DEBUG=1 + LTTNG_CONSUMERD32_BIN=${{WORKSPACE}}/deps/build/lib/lttng/libexec/lttng-consumerd + LTTNG_CONSUMERD64_BIN=${{WORKSPACE}}/deps/build/lib/lttng/libexec/lttng-consumerd + - env-script: + script-content: + !include-raw-escape: scripts/lttng-ust-java-tests/set-java-home.sh + + builders: + - copyartifact: + project: liburcu_${{liburcu_version}}_build/arch=${{arch}},conf=std,build=std + which-build: last-successful + stable: true + filter: 'build/**' + target: 'deps' + do-not-fingerprint: true + - copyartifact: + project: lttng-ust_${{lttng_ust_version}}_build/liburcu_version=${{liburcu_version}},arch=${{arch}},conf=java-agent,build=std + which-build: last-successful + stable: true + filter: 'build/**' + target: 'deps' + do-not-fingerprint: true + - copyartifact: + project: lttng-tools_${{lttng_tools_version}}_build/babeltrace_version=master,liburcu_version=${{liburcu_version}},arch=${{arch}},conf=java-agent,build=std + which-build: last-successful + stable: true + filter: 'build/**' + target: 'deps' + do-not-fingerprint: true + - copyartifact: + project: babeltrace_master_build/arch=${{arch}},conf=std,build=std + which-build: last-successful + stable: true + filter: 'build/**' + target: 'deps' + do-not-fingerprint: true + - shell: + !include-raw-escape: scripts/lttng-ust-java-tests/start-sessiond.sh + - maven-target: + maven-version: "Maven 3.3.9" + goals: "-version" + private-repository: true + - maven-target: + maven-version: "Maven 3.3.9" + goals: clean verify + pom: 'lttng-ust-java-tests/pom.xml' + properties: + - maven.test.failure.ignore=true + - common-jar-location=${{WORKSPACE}}/deps/build/share/java/lttng-ust-agent-common.jar + - jul-jar-location=${{WORKSPACE}}/deps/build/share/java/lttng-ust-agent-jul.jar + - log4j-jar-location=${{WORKSPACE}}/deps/build/share/java/lttng-ust-agent-log4j.jar + - argLine=-Djava.library.path=${{WORKSPACE}}/deps/build/lib + - shell: + !include-raw-escape: scripts/lttng-ust-java-tests/stop-sessiond.sh + + publishers: + - junit: + results: 'lttng-ust-java-tests/**/target/failsafe-reports/*.xml' + - workspace-cleanup + - email-ext: + recipients: alex@voxpopuli.im + matrix-trigger: only-parent + - ircbot: + strategy: new-failure-and-fixed + matrix-notifier: only-parent + channels: + - name: '#lttng' + + +## Project +- project: + name: lttng-ust-java-tests + github_user: lttng + github_name: lttng-ust-java-tests + version: + - master + liburcu_version: + - master + lttng_ust_version: + - master + lttng_tools_version: + - master + jobs: + - 'lttng-ust-java-tests_{version}_build': + arch: !!python/tuple [x86-32, x86-64] + java_version: !!python/tuple [java-8-openjdk] + diff --git a/scripts/lttng-ust-java-tests/set-java-home.sh b/scripts/lttng-ust-java-tests/set-java-home.sh new file mode 100755 index 0000000..5788cf1 --- /dev/null +++ b/scripts/lttng-ust-java-tests/set-java-home.sh @@ -0,0 +1,14 @@ +# Set the JAVA_HOME to use according to the configuration + +case "$arch" in + "x86-32") + ARCH_SUFFIX="i386" + ;; + "x86-64") + ARCH_SUFFIX="amd64" + ;; + "*") + ARCH_SUFFIX="$arch" +esac + +echo "JAVA_HOME=/usr/lib/jvm/${java_version}-$ARCH_SUFFIX/jre" diff --git a/scripts/lttng-ust-java-tests/start-sessiond.sh b/scripts/lttng-ust-java-tests/start-sessiond.sh new file mode 100755 index 0000000..b5781d4 --- /dev/null +++ b/scripts/lttng-ust-java-tests/start-sessiond.sh @@ -0,0 +1,4 @@ +#!/bin/bash -exu + +# Start the lttng-sessiond +lttng-sessiond -d diff --git a/scripts/lttng-ust-java-tests/stop-sessiond.sh b/scripts/lttng-ust-java-tests/stop-sessiond.sh new file mode 100755 index 0000000..33ee3a3 --- /dev/null +++ b/scripts/lttng-ust-java-tests/stop-sessiond.sh @@ -0,0 +1,4 @@ +#!/bin/bash -exu + +# Kill the sessiond +killall lttng-sessiond