From: Michael Jeanson Date: Fri, 28 Oct 2016 19:27:17 +0000 (-0400) Subject: jjb: Merge java and python agent axis X-Git-Url: http://git.lttng.org./?a=commitdiff_plain;h=67122b969e7777215709ea1c15b9cd96630d27d2;hp=4b9bec35c5509eff42dc1f516ef956cc6e92127a;p=lttng-ci.git jjb: Merge java and python agent axis Signed-off-by: Michael Jeanson --- diff --git a/jobs/lttng-tools.yaml b/jobs/lttng-tools.yaml index 7a02939..e03b46a 100644 --- a/jobs/lttng-tools.yaml +++ b/jobs/lttng-tools.yaml @@ -14,6 +14,10 @@ - workspace-cleanup - timestamps - ansicolor + - timeout: + timeout: 60 + fail: true + type: absolute scm: - git: @@ -115,7 +119,7 @@ - conditional-step: condition-kind: regex-match label: '$conf' - regex: (python-bindings|no-ust) + regex: no-ust on-evaluation-failure: run steps: - copyartifact: @@ -142,7 +146,7 @@ - conditional-step: condition-kind: regex-match label: '$conf' - regex: (java-agent|python-agent) + regex: agents on-evaluation-failure: run steps: - copyartifact: @@ -362,7 +366,7 @@ builders: - copyartifact: - project: lttng-tools-{version}/arch=x86-64,build=std,conf=python-agent + project: lttng-tools-{version}/arch=x86-64,build=std,conf=agents which-build: last-successful stable: true filter: 'build/**' @@ -408,7 +412,7 @@ ustversion: master arch: !!python/tuple [x86-32, x86-64] build: !!python/tuple [std, oot, dist] - conf: !!python/tuple [std, no-ust, python-bindings, java-agent, python-agent] + conf: !!python/tuple [std, no-ust, agents] urcuversion: !!python/tuple [master] babelversion: !!python/tuple [master] - 'lttng-tools_{version}_{buildtype}': @@ -417,7 +421,7 @@ ustversion: master arch: !!python/tuple [armhf, arm64, powerpc, ppc64el] build: !!python/tuple [std] - conf: !!python/tuple [std, no-ust, python-bindings, java-agent, python-agent] + conf: !!python/tuple [std, no-ust, agents] urcuversion: !!python/tuple [master] babelversion: !!python/tuple [master] - 'lttng-tools_{version}_{buildtype}': @@ -453,7 +457,7 @@ ustversion: stable-2.9 arch: !!python/tuple [x86-32, x86-64] build: !!python/tuple [std, oot, dist] - conf: !!python/tuple [std, no-ust, python-bindings, java-agent, python-agent] + conf: !!python/tuple [std, no-ust, agents] urcuversion: !!python/tuple [stable-0.9] babelversion: !!python/tuple [stable-1.4] - 'lttng-tools_{version}_{buildtype}': @@ -462,7 +466,7 @@ ustversion: stable-2.9 arch: !!python/tuple [armhf, arm64, powerpc, ppc64el] build: !!python/tuple [std] - conf: !!python/tuple [std, no-ust, python-bindings, java-agent, python-agent] + conf: !!python/tuple [std, no-ust, agents] urcuversion: !!python/tuple [stable-0.9] babelversion: !!python/tuple [stable-1.4] - 'lttng-tools_{version}_{buildtype}': @@ -480,7 +484,7 @@ ustversion: stable-2.8 arch: !!python/tuple [x86-32, x86-64] build: !!python/tuple [std, oot, dist] - conf: !!python/tuple [std, no-ust, python-bindings, java-agent, python-agent] + conf: !!python/tuple [std, no-ust, agents] urcuversion: !!python/tuple [stable-0.9] babelversion: !!python/tuple [stable-1.4] - 'lttng-tools_{version}_{buildtype}': @@ -489,7 +493,7 @@ ustversion: stable-2.8 arch: !!python/tuple [armhf, arm64, powerpc, ppc64el] build: !!python/tuple [std] - conf: !!python/tuple [std, no-ust, python-bindings, java-agent, python-agent] + conf: !!python/tuple [std, no-ust, agents] urcuversion: !!python/tuple [stable-0.9] babelversion: !!python/tuple [stable-1.4] - 'lttng-tools_{version}_{buildtype}': @@ -507,7 +511,7 @@ ustversion: stable-2.7 arch: !!python/tuple [x86-32, x86-64] build: !!python/tuple [std, oot, dist] - conf: !!python/tuple [std, no-ust, python-bindings, java-agent, python-agent] + conf: !!python/tuple [std, no-ust, agents] urcuversion: !!python/tuple [stable-0.9] babelversion: !!python/tuple [stable-1.3] - 'lttng-tools_{version}_{buildtype}': @@ -516,7 +520,7 @@ ustversion: stable-2.7 arch: !!python/tuple [armhf, arm64, powerpc] build: !!python/tuple [std] - conf: !!python/tuple [std, no-ust, python-bindings, java-agent, python-agent] + conf: !!python/tuple [std, no-ust, agents] urcuversion: !!python/tuple [stable-0.9] babelversion: !!python/tuple [stable-1.3] - 'dev_{user}_lttng-tools_{version}_{buildtype}': @@ -528,7 +532,7 @@ ustversion: master arch: !!python/tuple [x86-32, x86-64] build: !!python/tuple [std, oot, dist] - conf: !!python/tuple [std, no-ust, python-bindings, java-agent, python-agent] + conf: !!python/tuple [std, no-ust, agents] urcuversion: !!python/tuple [master] babelversion: !!python/tuple [master] - 'dev_{user}_lttng-tools_{version}_{buildtype}': @@ -540,7 +544,7 @@ ustversion: stable-2.9 arch: !!python/tuple [x86-32, x86-64] build: !!python/tuple [std, oot, dist] - conf: !!python/tuple [std, no-ust, python-bindings, java-agent, python-agent] + conf: !!python/tuple [std, no-ust, agents] urcuversion: !!python/tuple [stable-0.9] babelversion: !!python/tuple [stable-1.4] - 'dev_{user}_lttng-tools_{version}_{buildtype}': @@ -552,7 +556,7 @@ ustversion: stable-2.8 arch: !!python/tuple [x86-32, x86-64] build: !!python/tuple [std, oot, dist] - conf: !!python/tuple [std, no-ust, python-bindings, java-agent, python-agent] + conf: !!python/tuple [std, no-ust, agents] urcuversion: !!python/tuple [stable-0.9] babelversion: !!python/tuple [stable-1.4] - 'dev_{user}_lttng-tools_{version}_{buildtype}': @@ -564,7 +568,7 @@ ustversion: stable-2.7 arch: !!python/tuple [x86-32, x86-64] build: !!python/tuple [std, oot, dist] - conf: !!python/tuple [std, no-ust, python-bindings, java-agent, python-agent] + conf: !!python/tuple [std, no-ust, agents] urcuversion: !!python/tuple [stable-0.9] babelversion: !!python/tuple [stable-1.3] - 'dev_{user}_lttng-tools_{version}_{buildtype}': @@ -576,7 +580,7 @@ ustversion: master arch: !!python/tuple [armhf, arm64, powerpc, ppc64el] build: !!python/tuple [std] - conf: !!python/tuple [std, no-ust, python-bindings, java-agent, python-agent] + conf: !!python/tuple [std, no-ust, agents] urcuversion: !!python/tuple [master] babelversion: !!python/tuple [master] - 'dev_{user}_lttng-tools_{version}_{buildtype}': @@ -588,7 +592,7 @@ ustversion: stable-2.9 arch: !!python/tuple [armhf, arm64, powerpc, ppc64el] build: !!python/tuple [std] - conf: !!python/tuple [std, no-ust, python-bindings, java-agent, python-agent] + conf: !!python/tuple [std, no-ust, agents] urcuversion: !!python/tuple [stable-0.9] babelversion: !!python/tuple [stable-1.4] - 'dev_{user}_lttng-tools_{version}_{buildtype}': @@ -600,7 +604,7 @@ ustversion: stable-2.8 arch: !!python/tuple [armhf, arm64, powerpc, ppc64el] build: !!python/tuple [std] - conf: !!python/tuple [std, no-ust, python-bindings, java-agent, python-agent] + conf: !!python/tuple [std, no-ust, agents] urcuversion: !!python/tuple [stable-0.9] babelversion: !!python/tuple [stable-1.4] - 'dev_{user}_lttng-tools_{version}_{buildtype}': @@ -612,7 +616,7 @@ ustversion: stable-2.7 arch: !!python/tuple [armhf, arm64, powerpc, ppc64el] build: !!python/tuple [std] - conf: !!python/tuple [std, no-ust, python-bindings, java-agent, python-agent] + conf: !!python/tuple [std, no-ust, agents] urcuversion: !!python/tuple [stable-0.9] babelversion: !!python/tuple [stable-1.3] - 'dev_{user}_lttng-tools_{version}_{buildtype}': diff --git a/jobs/lttng-ust-java-tests.yaml b/jobs/lttng-ust-java-tests.yaml index e04ec11..12ef2b6 100644 --- a/jobs/lttng-ust-java-tests.yaml +++ b/jobs/lttng-ust-java-tests.yaml @@ -91,14 +91,14 @@ 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 + project: lttng-ust_${{lttng_ust_version}}_build/liburcu_version=${{liburcu_version}},arch=${{arch}},conf=agents,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 + project: lttng-tools_${{lttng_tools_version}}_build/babeltrace_version=master,liburcu_version=${{liburcu_version}},arch=${{arch}},conf=agents,build=std which-build: last-successful stable: true filter: 'build/**' diff --git a/jobs/lttng-ust.yaml b/jobs/lttng-ust.yaml index 0e7d693..e842aa0 100644 --- a/jobs/lttng-ust.yaml +++ b/jobs/lttng-ust.yaml @@ -206,7 +206,7 @@ builders: - copyartifact: - project: lttng-ust-{version}/arch=x86-64,build=std,conf=python-agent + project: lttng-ust-{version}/arch=x86-64,build=std,conf=agents which-build: last-successful stable: true filter: 'build/**' @@ -249,13 +249,13 @@ - 'lttng-ust_{version}_{buildtype}': buildtype: build arch: !!python/tuple [x86-32, x86-64] - build: !!python/tuple [std, oot, dist] - conf: !!python/tuple [std, java-agent, python-agent] + build: !!python/tuple [std, dist, oot, oot-dist] + conf: !!python/tuple [std, agents] - 'lttng-ust_{version}_{buildtype}': buildtype: portbuild arch: !!python/tuple [armhf, arm64, powerpc, ppc64el] build: !!python/tuple [std] - conf: !!python/tuple [std, java-agent, python-agent] + conf: !!python/tuple [std, agents] - 'lttng-ust_{version}_cppcheck' - 'lttng-ust_{version}_scan-build' - 'lttng-ust_{version}_coverity': diff --git a/scripts/lttng-tools/build.sh b/scripts/lttng-tools/build.sh index 34c04c9..2c436ad 100755 --- a/scripts/lttng-tools/build.sh +++ b/scripts/lttng-tools/build.sh @@ -75,16 +75,16 @@ conf=${conf:-} build=${build:-} SRCDIR="$WORKSPACE/src/lttng-tools" -TMPDIR="$WORKSPACE/tmp" +#TMPDIR="$WORKSPACE/tmp" PREFIX="$WORKSPACE/build" TAPDIR="$WORKSPACE/tap" # Create build and tmp directories -rm -rf "$PREFIX" "$TMPDIR" "$TAPDIR" -mkdir -p "$PREFIX" "$TMPDIR" "$TAPDIR" +rm -rf "$PREFIX" "$TAPDIR" +mkdir -p "$PREFIX" "$TAPDIR" -export TMPDIR +#export TMPDIR # liburcu URCU_INCS="$WORKSPACE/deps/liburcu/build/include/" @@ -200,30 +200,26 @@ static) CONF_OPTS="--enable-static --disable-shared" ;; -python-bindings) - echo "Build with python bindings" - # We only support bindings built with Python 3 - export PYTHON="python3" - export PYTHON_CONFIG="/usr/bin/python3-config" - CONF_OPTS="--enable-python-bindings" - ;; - no-ust) echo "Build without UST support" CONF_OPTS="$NO_UST" ;; -java-agent) - echo "Build with Java Agents" +agents) + echo "Enable Java Agents" export JAVA_HOME="/usr/lib/jvm/default-java" export CLASSPATH="$UST_JAVA/*:/usr/share/java/*" - CONF_OPTS="--enable-test-java-agent-all" - ;; + CONF_OPTS+=" --enable-test-java-agent-all" -python-agent) - echo "Build with python agents" + echo "Enable Python agents" export PYTHONPATH="$UST_PYTHON2:$UST_PYTHON3" - CONF_OPTS="--enable-test-python-agent-all" + CONF_OPTS+=" --enable-test-python-agent-all" + + echo "Enable Python bindings" + # We only support bindings built with Python 3 + export PYTHON="python3" + export PYTHON_CONFIG="/usr/bin/python3-config" + CONF_OPTS+=" --enable-python-bindings" ;; relayd-only) @@ -239,9 +235,10 @@ esac # Build type -# oot : out-of-tree build -# dist: build via make dist -# * : normal tree build +# oot : out-of-tree build +# dist : build via make dist +# oot-dist: build via make dist out-of-tree +# * : normal tree build # # Make sure to move to the build_path and run configure # before continuing @@ -256,23 +253,46 @@ case "$build" in ;; dist) - echo "Distribution out of tree build" - BUILD_PATH="$(mktemp -d)" + echo "Distribution tarball in-tree build" # Initial configure and generate tarball MAKE=$MAKE BISON="$BISON" YACC="$YACC" CFLAGS="$CFLAGS" "$SRCDIR/configure" $CONF_OPTS --enable-build-man-pages $MAKE dist - mkdir -p "$BUILD_PATH" + BUILD_PATH="$(mktemp -d)" cp ./*.tar.* "$BUILD_PATH/" cd "$BUILD_PATH" # Ignore level 1 of tar $TAR xvf ./*.tar.* --strip 1 + # Build in extracted source tree MAKE=$MAKE BISON="$BISON" YACC="$YACC" CFLAGS="$CFLAGS" "$BUILD_PATH/configure" --prefix="$PREFIX" $CONF_OPTS ;; + oot-dist) + echo "Distribution tarball out of tree build" + BUILD_PATH="$(mktemp -d)" + cd "$BUILD_PATH" + + # Initial configure and generate tarball + MAKE=$MAKE BISON="$BISON" YACC="$YACC" CFLAGS="$CFLAGS" "$SRCDIR/configure" $CONF_OPTS --enable-build-man-pages + $MAKE dist + + NEWSRC_PATH="$(mktemp -d)" + cp ./*.tar.* "$NEWSRC_PATH/" + cd "$NEWSRC_PATH" + + # Ignore level 1 of tar + $TAR xvf ./*.tar.* --strip 1 + + BUILD_PATH="$(mktemp -d)" + cd "$BUILD_PATH" + + # Build oot from extracted sources + MAKE=$MAKE BISON="$BISON" YACC="$YACC" CFLAGS="$CFLAGS" "$NEWSRC_PATH/configure" --prefix="$PREFIX" $CONF_OPTS + ;; + *) echo "Standard tree build" MAKE=$MAKE BISON="$BISON" YACC="$YACC" CFLAGS="$CFLAGS" "$BUILD_PATH/configure" --prefix="$PREFIX" $CONF_OPTS diff --git a/scripts/lttng-ust/build.sh b/scripts/lttng-ust/build.sh index 733e9d0..80488e4 100755 --- a/scripts/lttng-ust/build.sh +++ b/scripts/lttng-ust/build.sh @@ -63,15 +63,13 @@ static) CONF_OPTS="--enable-static --disable-shared" ;; -java-agent) - echo "Java agent build" +agents) + echo "Enable Java agent build" export CLASSPATH="/usr/share/java/log4j-1.2.jar" - CONF_OPTS="--enable-java-agent-all" - ;; + CONF_OPTS+=" --enable-java-agent-all --enable-jni-interface" -python-agent) - echo "Python agent build" - CONF_OPTS="--enable-python-agent" + echo "Enable Python agent build" + CONF_OPTS+=" --enable-python-agent" ;; *) @@ -88,9 +86,10 @@ cd "$SRCDIR" # Build type -# oot : out-of-tree build -# dist: build via make dist -# * : normal tree build +# oot : out-of-tree build +# dist : build via make dist +# oot-dist: build via make dist out-of-tree +# * : normal tree build # # Make sure to move to the build_path and configure # before continuing @@ -99,29 +98,54 @@ case "$build" in oot) echo "Out of tree build" BUILD_PATH=$WORKSPACE/oot + mkdir -p "$BUILD_PATH" cd "$BUILD_PATH" + "$SRCDIR/configure" --prefix="$PREFIX" $CONF_OPTS ;; dist) - echo "Distribution out of tree build" - BUILD_PATH="$(mktemp -d)" + echo "Distribution tarball in-tree build" # Initial configure and generate tarball "$SRCDIR/configure" $MAKE dist - mkdir -p "$BUILD_PATH" + BUILD_PATH="$(mktemp -d)" cp ./*.tar.* "$BUILD_PATH/" cd "$BUILD_PATH" # Ignore level 1 of tar $TAR xvf ./*.tar.* --strip 1 + # Build in extracted source tree "$BUILD_PATH/configure" --prefix="$PREFIX" $CONF_OPTS ;; +oot-dist) + echo "Distribution tarball out of tree build" + BUILD_PATH="$(mktemp -d)" + cd "$BUILD_PATH" + + # Initial configure and generate tarball + "$SRCDIR/configure" + $MAKE dist + + NEWSRC_PATH="$(mktemp -d)" + cp ./*.tar.* "$NEWSRC_PATH/" + cd "$NEWSRC_PATH" + + # Ignore level 1 of tar + $TAR xvf ./*.tar.* --strip 1 + + BUILD_PATH="$(mktemp -d)" + cd "$BUILD_PATH" + + # Build oot from extracted sources + "$NEWSRC_PATH/configure" --prefix="$PREFIX" $CONF_OPTS + ;; + *) echo "Standard in-tree build" "$BUILD_PATH/configure" --prefix="$PREFIX" $CONF_OPTS