[mpich] MPICH primary repository branch, master, updated. v3.2b4-222-gbf23698
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "MPICH primary repository". The branch, master has been updated via bf2369811689b096c7f82046d68c5ecd5d80e6dc (commit) via 2824d828421ad9b5d85e29f7cf14e339b882b27e (commit) from df38c36e7d88d3bc5d87fc2506802a47043fdd96 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://git.mpich.org/mpich.git/commitdiff/bf2369811689b096c7f82046d68c5ecd5d... commit bf2369811689b096c7f82046d68c5ecd5d80e6dc Author: Yanfei Guo <[email protected]> Date: Tue Sep 15 16:13:03 2015 -0500 maint/jenkins: fix a bug in the set-xfail.sh script The condition for sourcing apply-xfail.sh was wrong. This may results incorrectly setting xfails under certain cases. Signed-off-by: Ken Raffenetti <[email protected]> diff --git a/maint/jenkins/set-xfail.sh b/maint/jenkins/set-xfail.sh index 918cfa0..7c4eb46 100755 --- a/maint/jenkins/set-xfail.sh +++ b/maint/jenkins/set-xfail.sh @@ -95,7 +95,7 @@ while read -r line; do fi done < "$XFAIL_CONF" -if [[ -f $XFAIL_CONF ]]; then +if [[ -f $SCRIPT ]]; then source $SCRIPT fi http://git.mpich.org/mpich.git/commitdiff/2824d828421ad9b5d85e29f7cf14e339b8... commit 2824d828421ad9b5d85e29f7cf14e339b882b27e Author: Yanfei Guo <[email protected]> Date: Tue Sep 15 12:57:19 2015 -0500 maint/jenkins: add script to skip tests Skip test is set in maint/jenkins/skip_test.conf. It allows skipping all tests for a given combination of job and configurations including compiler, jenkins_configure, netmod, and SLURM queue. When Jenkins uses maint/jenkins/test-worker.sh to build project, it will execute maint/jenkins/skip_test.sh with the jobname, compiler, configure options, netmod, and queue right before initializing the build environment. maint/jenkins/skip_test.sh will read the skip_test.conf file and generate the summary.junit.xml file based on the conditions set in the skip_test.conf. Signed-off-by: Ken Raffenetti <[email protected]> diff --git a/maint/jenkins/skip_test.conf b/maint/jenkins/skip_test.conf new file mode 100644 index 0000000..5bb79fa --- /dev/null +++ b/maint/jenkins/skip_test.conf @@ -0,0 +1,22 @@ +# Contitional skip test settings +# +# Syntax (similar to a cron file): +# [jobname] [compiler] [jenkins_configure] [netmod] [queue] +# Note that the [jobname] allows partial matches (see examples). Other +# conditions only allows exact matches. +# The actual allowed combinations are depending on the Jenkins job. For +# example, +# mxm * * tcp * +# will have no effect since none of the mxm jobs has tcp netmod in the +# configuration. +# +# Examples: +# mxm gnu debug * * +# This will skip all tests when the job is "mpich-master-mxm" or +# "mpich-review-mxm", the compiler is "gnu", and the jenkins_configure is +# "debug". +# +# master-ubuntu * * * ubuntu32 sed -i "..." +# This will skip all test when the job is "mpich-master-ubuntu" and the +# running queue is "ubuntu32". +# diff --git a/maint/jenkins/skip_test.sh b/maint/jenkins/skip_test.sh new file mode 100755 index 0000000..d832b96 --- /dev/null +++ b/maint/jenkins/skip_test.sh @@ -0,0 +1,112 @@ +#!/bin/zsh + +jobname="" +compiler="" +jenkins_configure="" +queue="" +netmod="" + +SKIP_TEST_CONF="maint/jenkins/skip_test.conf" +TEST_SUMMARY="test/mpi/summary.junit.xml" + +##################################################################### +## Initialization +##################################################################### + +while getopts ":f:j:c:o:q:m:s:" opt; do + case "$opt" in + j) + jobname=$OPTARG ;; + c) + compiler=$OPTARG ;; + o) + jenkins_configure=$OPTARG ;; + q) + queue=$OPTARG ;; + m) + netmod=$OPTARG ;; + f) + SKIP_TEST_CONF=$OPTARG ;; + s) + TEST_SUMMARY=$OPTARG ;; + \?) + echo "Invalid option: -$OPTARG" >&2 + exit 1 + esac +done + +##################################################################### +## Main ( +##################################################################### + +SkipTestCond() { + local job="$1" + local comp="$2" + local option="$3" + local nmod="$4" + local q="$5" + + local state=0 + + if [[ ! "$job" == "*" ]]; then + # clean up jobname and do substring match + if [[ ! "${jobname%%,*}" == *$job* ]]; then state=1; fi + fi + + if [[ ! "$comp" == "*" ]]; then + if [[ ! "$compiler" == "$comp" ]]; then state=1; fi + fi + + if [[ ! "$option" == "*" ]]; then + if [[ ! "$jenkins_configure" == "$option" ]]; then state=1; fi + fi + + if [[ ! "$nmod" == "*" ]]; then + if [[ ! "$netmod" == "$nmod" ]]; then state=1; fi + fi + + if [[ ! "$q" == "*" ]]; then + if [[ ! "$queue" == "$q" ]]; then state=1; fi + fi + + echo "$state" +} + +SkipTest() { + TEST_SUMMARY_DIR=$(dirname $TEST_SUMMARY) + if [[ -d "$TEST_SUMMARY_DIR" ]]; then + mkdir -p "$TEST_SUMMARY_DIR" + fi + cat > "$TEST_SUMMARY" << "EOF" +<testsuites> +<testsuite failures="0" errors="0" skipped="0" tests="1" date="$date" name="summary_junit_xml"> +<testcase name="none"/> +<system-out/> +<system-err/> +</testsuite> +</testsuites> +EOF +} + +if [[ -f "$TEST_SUMMARY" ]]; then + rm "$TEST_SUMMARY" +fi + +while read -r line; do + #clean leading whitespaces + line=$(echo "$line" | sed "s/^ *//g") + line=$(echo "$line" | sed "s/ *$//g") + echo $line + # skip comment line + if test -x "$line" -o "${line:1}" = "#" ; then + continue + fi + + arr=( $(echo $line) ) + if [[ "0" == $(SkipTestCond "${arr[1]}" "${arr[2]}" "${arr[3]}" "${arr[4]}" "${arr[5]}") ]]; then + SkipTest + exit 0 + fi +done < "$SKIP_TEST_CONF" + +exit 0 diff --git a/maint/jenkins/test-worker.sh b/maint/jenkins/test-worker.sh index 435011d..68a5cd2 100755 --- a/maint/jenkins/test-worker.sh +++ b/maint/jenkins/test-worker.sh @@ -45,14 +45,36 @@ done cd $WORKSPACE -TMP_WORKSPACE=$(mktemp -d /sandbox/jenkins.tmp.XXXXXXXX) -SRC=$WORKSPACE -TMP_SRC=$TMP_WORKSPACE - if test "$GIT_BRANCH" = "" ; then BUILD_MODE="nightly" fi +case "$BUILD_MODE" in + "nightly") + if [[ -x mpich-master/maint/jenkins/skip_test.sh ]]; then + ./mpich-master/maint/jenkins/skip_test.sh -j $JOB_NAME -c $compiler -o $jenkins_configure -q $queue -m $_netmod \ + -s mpich-master/test/mpi/summary.junit.xml + if [[ -f mpich-master/test/mpi/summary.junit.xml ]]; then + exit 0 + fi + fi + ;; + "per-commit") + if [[ -x maint/jenkins/skip_test.sh ]]; then + ./maint/jenkins/skip_test.sh -j $JOB_NAME -c $compiler -o $jenkins_configure -q $queue -m $_netmod \ + -s test/mpi/summary.junit.xml + if [[ -f test/mpi/summary.junit.xml ]]; then + exit 0 + fi + fi + ;; +esac + + +TMP_WORKSPACE=$(mktemp -d /sandbox/jenkins.tmp.XXXXXXXX) +SRC=$WORKSPACE +TMP_SRC=$TMP_WORKSPACE + # Preparing the source case "$BUILD_MODE" in "nightly") ----------------------------------------------------------------------- Summary of changes: maint/jenkins/set-xfail.sh | 2 +- maint/jenkins/skip_test.conf | 22 ++++++++++++ maint/jenkins/{set-xfail.sh => skip_test.sh} | 48 +++++++++++++++---------- maint/jenkins/test-worker.sh | 30 ++++++++++++++-- 4 files changed, 78 insertions(+), 24 deletions(-) create mode 100644 maint/jenkins/skip_test.conf copy maint/jenkins/{set-xfail.sh => skip_test.sh} (67%) hooks/post-receive -- MPICH primary repository
participants (1)
-
noreply@mpich.org