From: Michael Jeanson Date: Tue, 13 Feb 2018 16:21:53 +0000 (-0500) Subject: jjb: Add linux-rseq coverity job X-Git-Url: http://git.lttng.org./?a=commitdiff_plain;h=c0eca50d6b7e28fbc9ef5bbf6e9dc38c365ba408;hp=ed1b16cda52a475137d85900a2d3b0839788d1b8;p=lttng-ci.git jjb: Add linux-rseq coverity job Signed-off-by: Michael Jeanson --- diff --git a/jobs/linux-rseq.yaml b/jobs/linux-rseq.yaml new file mode 100644 index 0000000..d9c7028 --- /dev/null +++ b/jobs/linux-rseq.yaml @@ -0,0 +1,82 @@ +- defaults: + name: linux-rseq + description: | + +

Job is managed by Jenkins Job Builder.

+ + project-type: freestyle + + wrappers: + - ansicolor + - timeout: + timeout: 90 + fail: true + type: absolute + - timestamps + - workspace-cleanup: + clean-if: + - failure: false + + scm: + - git: + url: git://git-mirror.internal.efficios.com/kernel/rseq/linux-rseq.git + branches: + - origin/rseq/dev + basedir: src/linux-rseq + skip-tag: true + + triggers: + - pollscm: + cron: "@hourly" + + properties: + - inject: + properties-content: | + PROJECT_NAME=linux-rseq + - build-discarder: + num-to-keep: 2 + + +- job-template: + name: linux-rseq_master_coverity + defaults: linux-rseq + node: 'x86-64' + + triggers: + - pollscm: + cron: "@daily" + + wrappers: + - ansicolor + - timeout: + timeout: 180 + fail: true + type: absolute + - timestamps + - workspace-cleanup: + clean-if: + - failure: false + - credentials-binding: + - username-password-separated: + credential-id: linux-rseq_coverity_token + username: COVERITY_SCAN_PROJECT_NAME + password: COVERITY_SCAN_TOKEN + + builders: + - shell: + !include-raw-escape: scripts/common/coverity.sh + + publishers: + - workspace-cleanup + - archive: + artifacts: 'analysis-results.tgz,cov-int/**' + allow-empty: false + + +## Project +- project: + name: linux-rseq + email_to: 'ci-notification@lists.lttng.org, cc:mathieu.desnoyers@efficios.com' + jobs: + - 'linux-rseq_master_coverity' + diff --git a/scripts/common/coverity.sh b/scripts/common/coverity.sh index dae6b54..0a760bd 100755 --- a/scripts/common/coverity.sh +++ b/scripts/common/coverity.sh @@ -76,6 +76,10 @@ lttng-scope|ctf-java|libdelorean-java|jabberwocky) BUILD_TYPE="maven" MVN_BIN="$HOME/tools/hudson.tasks.Maven_MavenInstallation/default/bin/mvn" ;; +linux-rseq) + CONF_OPTS="" + BUILD_TYPE="linux-rseq" + ;; *) echo "Generic project, no configure options." CONF_OPTS="" @@ -152,12 +156,6 @@ cd "$SRCDIR" COVERITY_SCAN_VERSION=$(git describe --always | sed 's|-|.|g') -# Prepare build dir for autotools based projects -if [ -f "./bootstrap" ]; then - ./bootstrap - ./configure $CONF_OPTS -fi - # Build echo -e "\033[33;1mRunning Coverity Scan Analysis Tool...\033[0m" case "$BUILD_TYPE" in @@ -173,8 +171,18 @@ maven) clean verify ;; autotools) + # Prepare build dir for autotools based projects + if [ -f "./bootstrap" ]; then + ./bootstrap + ./configure $CONF_OPTS + fi + cov-build --dir "$RESULTS_DIR" $COVERITY_SCAN_BUILD_OPTIONS make -j"$NPROC" V=1 ;; +linux-rseq) + make defconfig + cov-build --dir "$RESULTS_DIR" $COVERITY_SCAN_BUILD_OPTIONS make -j"$NPROC" kernel/rseq.o kernel/cpu_opv.o V=1 + ;; *) echo "Unsupported build type: $BUILD_TYPE" exit 1