+++ /dev/null
-- defaults:
- name: lttng-ust-java-tests
- description: |
- Tests for LTTng-UST's Java agent. Runs the master branch of
- <a href="https://github.com/lttng/lttng-ust-java-tests">lttng-ust-java-tests</a>
- against the master branches of UST, lttng-tools, and Babeltrace.
-
- <p>Job is managed by Jenkins Job Builder.</p>
-
- project-type: freestyle
-
- wrappers:
- - workspace-cleanup
- - timestamps
- - ansicolor
-
- scm:
- - git:
- url: https://github.com/{github_user}/{github_name}.git
- browser: githubweb
- browser-url: https://github.com/{github_user}/{github_name}
- branches:
- - origin/master
- basedir: lttng-ust-java-tests
- skip-tag: true
-
- triggers:
- - timed: "@daily"
-
- properties:
- - build-discarder:
- num-to-keep: 10
- artifact-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: platform
- values: '{obj:platforms}'
- - axis:
- type: user-defined
- name: java_version
- values: '{obj:java_version}'
-
- wrappers:
- - workspace-cleanup
- - timestamps
- - ansicolor
- - inject:
- properties-content: |
- JAVA_HOME=/usr/lib/jvm/${{java_version}}-amd64
- 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
- LTTNG_SESSION_CONFIG_XSD_PATH=${{WORKSPACE}}/deps/build/share/xml/lttng
- BABELTRACE_PLUGIN_PATH=$WORKSPACE/deps/build/lib/babeltrace2/plugins
- LIBBABELTRACE2_PLUGIN_PROVIDER_DIR=$WORKSPACE/deps/build/lib/babeltrace2/plugin-providers
-
- builders:
- - copyartifact:
- project: liburcu_{liburcu_version}_build/platform=${{platform}},conf=std,build=std
- which-build: last-successful
- stable: false
- filter: 'build/**'
- target: 'deps'
- do-not-fingerprint: true
- - copyartifact:
- project: lttng-ust_{version}_build/liburcu_version={liburcu_version},platform=${{platform}},conf=agents,build=std
- which-build: last-successful
- stable: false
- filter: 'build/**'
- target: 'deps'
- do-not-fingerprint: true
- - copyartifact:
- project: lttng-tools_{version}_build/babeltrace_version={babeltrace_version},liburcu_version={liburcu_version},platform=${{platform}},conf=agents,build=std
- which-build: last-successful
- stable: false
- filter: 'build/**'
- target: 'deps'
- do-not-fingerprint: true
- - copyartifact:
- project: babeltrace_{babeltrace_version}_build/platform=${{platform}},conf=std,build=std
- which-build: last-successful
- stable: false
- filter: 'build/**'
- target: 'deps'
- do-not-fingerprint: true
- - shell:
- !include-raw-escape: scripts/lttng-ust-java-tests/start-sessiond.sh
- - maven-target:
- maven-version: "default"
- goals: "-version"
- private-repository: true
- - maven-target:
- maven-version: "default"
- 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
- - log4j2-jar-location=${{WORKSPACE}}/deps/build/share/java/lttng-ust-agent-log4j2.jar
- - argLine=-Djava.library.path=${{WORKSPACE}}/deps/build/lib
- - groups={groups}
- - shell:
- !include-raw-escape: scripts/lttng-ust-java-tests/stop-sessiond.sh
-
- publishers:
- - archive:
- artifacts: 'lttng-sessiond.log'
- allow-empty: false
- - junit:
- results: 'lttng-ust-java-tests/**/target/failsafe-reports/*.xml'
- - workspace-cleanup
- - ircbot: <tng-ust-java-tests_publisher_ircbot_defaults
- strategy: statechange-only
- message-type: summary
- matrix-notifier: only-parent
- - email-ext:
- recipients: '{obj:email_for_all_failure}'
- always: false
- unstable: true
- first-failure: false
- first-unstable: false
- not-built: false
- aborted: false
- regression: false
- failure: true
- second-failure: false
- improvement: false
- still-failing: false
- success: false
- fixed: false
- fixed-unhealthy: true
- still-unstable: false
- pre-build: false
- matrix-trigger: only-parent
- send-to:
- - recipients
-
-## Project
-- project:
- name: lttng-ust-java-tests
- github_user: lttng
- github_name: lttng-ust-java-tests
- email_to: 'ci-notification@lists.lttng.org, cc:mathieu.desnoyers@efficios.com'
- email_for_all_failure: 'mathieu.desnoyers@efficios.com'
- babeltrace_version: stable-2.0
- jobs:
- - 'lttng-ust-java-tests_{version}_build':
- version: master
- liburcu_version: master
- platforms: !!python/tuple [bionic-amd64]
- java_version: !!python/tuple [java-11-openjdk]
- groups: '!domain:log4j2' # Remove once the log4j2 domain is merged in master
- - 'lttng-ust-java-tests_{version}_build':
- version: stable-2.13
- liburcu_version: stable-0.13
- platforms: !!python/tuple [bionic-amd64]
- java_version: !!python/tuple [java-11-openjdk]
- groups: '!domain:log4j2'
- - 'lttng-ust-java-tests_{version}_build':
- version: stable-2.12
- liburcu_version: stable-0.13
- platforms: !!python/tuple [bionic-amd64]
- java_version: !!python/tuple [java-11-openjdk]
- groups: '!domain:log4j2'
-
LTTNG_TOOLS_GEN_COMPILE_COMMANDS="${LTTNG_TOOLS_GEN_COMPILE_COMMANDS:-no}"
LTTNG_TOOLS_RUN_TESTS="${LTTNG_TOOLS_RUN_TESTS:-yes}"
LTTNG_TOOLS_RUN_TESTS_LONG_REGRESSION="${LTTNG_TOOLS_RUN_TESTS_LONG_REGRESSION:-no}"
+LTTNG_TOOLS_RUN_UST_JAVA_TESTS="${LTTNG_TOOLS_RUN_UST_JAVA_TESTS:-yes}"
LTTNG_TOOLS_CLANG_TIDY="${LTTNG_TOOLS_CLANG_TIDY:-no}"
SRCDIR="$WORKSPACE/src/lttng-tools"
make --keep-going check || exit_status=1
- # Copy tap logs for the jenkins tap parser before cleaning the build dir
+ # Copy tap logs for the jenkins tap parser before cleaning the build dir
rsync -a --exclude 'test-suite.log' --include '*/' --include '*.log' --exclude='*' tests/ "$TAPDIR"
# Copy the test suites top-level log which includes all tests failures
prove --merge -v --exec '' - < long_regression --archive "$TAPDIR/long_regression/" || exit_status=1
cd ..
fi
+
+ if [ "$LTTNG_TOOLS_RUN_UST_JAVA_TESTS" = "yes" ] && [ "$conf" = "agents" ] && \
+ [ "$platform" = "bionic-amd64" ] && [ "$LTTNG_TOOLS_MAKE_INSTALL" = "yes" ] ; then
+ print_header "Run lttng-ust-java-tests"
+ # Git Source
+ LTTNG_UST_JAVA_TESTS_GIT_SOURCE="${LTTNG_UST_JAVA_TESTS_GIT_SOURCE:-https://github.com/lttng/lttng-ust-java-tests.git}"
+ LTTNG_UST_JAVA_TESTS_GIT_BRANCH="${LTTNG_UST_JAVA_TESTS_GIT_BRANCH:-master}"
+
+ OWD="$(pwd)"
+ cd ..
+ git clone -b "${LTTNG_UST_JAVA_TESTS_GIT_BRANCH}" "${LTTNG_UST_JAVA_TESTS_GIT_SOURCE}" lttng-ust-java-tests
+ cd lttng-ust-java-tests
+
+ LTTNG_UST_JAVA_TESTS_ENV=(
+ "JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/"
+ PATH="${WORKSPACE}/build/bin/:$PATH"
+ LD_LIBRARY_PATH="${WORKSPACE}/build/lib:$LD_LIBRARY_PATH"
+ LTTNG_UST_DEBUG=1
+ LTTNG_CONSUMERD32_BIN="${WORKSPACE}/build/lib/lttng/libexec/lttng-consumerd"
+ LTTNG_CONSUMERD64_BIN="${WORKSPACE}/build/lib/lttng/libexec/lttng-consumerd"
+ LTTNG_SESSION_CONFIG_XSD_PATH="${WORKSPACE}/build/share/xml/lttng"
+ BABELTRACE_PLUGIN_PATH="${WORKSPACE}/deps/build/lib/babeltrace2/plugins"
+ LIBBABELTRACE2_PLUGIN_PROVIDER_DIR="${WORKSPACE}/deps/build/lib/babeltrace2/plugin-providers"
+ )
+ LTTNG_UST_JAVA_TESTS_MAVEN_OPTS=(
+ "-Dmaven.test.failure.ignore=true"
+ "-Dcommon-jar-location=${WORKSPACE}/deps/build/share/java/lttng-ust-agent-common.jar"
+ "-Djul-jar-location=${WORKSPACE}/deps/build/share/java/lttng-ust-agent-jul.jar"
+ "-Dlog4j-jar-location=${WORKSPACE}/deps/build/share/java/lttng-ust-agent-log4j.jar"
+ "-Dlog4j2-jar-location=${WORKSPACE}/deps/build/share/java/lttng-ust-agent-log4j2.jar"
+ "-DargLine=-Djava.library.path=${WORKSPACE}/deps/build/lib"
+ '-Dgroups=!domain:log4j2'
+ )
+ env "${LTTNG_UST_JAVA_TESTS_ENV[@]}" mvn -version
+ env "${LTTNG_UST_JAVA_TESTS_ENV[@]}" lttng-sessiond -b -vvv 1>"${WORKSPACE}/log/lttng-ust-java-tests-lttng-sessiond.log" 2>&1
+ env "${LTTNG_UST_JAVA_TESTS_ENV[@]}" mvn "${LTTNG_UST_JAVA_TESTS_MAVEN_OPTS[@]}" clean verify || exit_status=1
+ killall lttng-sessiond
+
+ cd "${OWD}"
+ fi
fi
if [ "$LTTNG_TOOLS_RUN_TESTS" = "yes" ] && [[ "$conf" =~ (no-ust|relayd-only) ]]; then