[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.2b4-213-gfe6dd61
Service Account
noreply at mpich.org
Thu Sep 10 13:55:11 CDT 2015
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 fe6dd619711825de9513d72fc9903ab4ef01905e (commit)
from 1e6c4d8e0f3b38ba3d9a9b6eff7602c6960f67cb (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/fe6dd619711825de9513d72fc9903ab4ef01905e
commit fe6dd619711825de9513d72fc9903ab4ef01905e
Author: Yanfei Guo <yguo at anl.gov>
Date: Sat Sep 5 20:36:31 2015 -0500
Add scripts for setting XFAIL
XFAIL is set in maint/jenkins/xfail.conf. It allows an XFAIL to be
applied based on various conditions including jobname, compiler,
jenkins_configure, netmod, and SLURM queue.
When Jenkins uses maint/jenkins/test-worker.sh to build project, it
will execute maint/jenkins/set-xfail.sh with the jobname, compiler,
configure options, netmod, and queue right before executing
./configure”. maint/jenkins/set-xfail.sh will read the xfail.conf
file and apply the XFAIL based on the conditions set in the
xfail.conf. All applied XFAILs will be summarized in apply-xfail.sh.
xfail-apply.sh is added to gitignore to prevent from accidentally
adding the xfail summary to the source.
Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>
diff --git a/.gitignore b/.gitignore
index bb70b76..9f0e903 100644
--- a/.gitignore
+++ b/.gitignore
@@ -105,6 +105,7 @@ summary.xml
summary.junit.xml
summary.tap
tags
+apply-xfail.sh
# the hooks dir shouldn't be accidentally committed
/maint/hooks
diff --git a/maint/jenkins/set-xfail.sh b/maint/jenkins/set-xfail.sh
new file mode 100755
index 0000000..918cfa0
--- /dev/null
+++ b/maint/jenkins/set-xfail.sh
@@ -0,0 +1,102 @@
+#!/bin/zsh
+
+jobname=""
+compiler=""
+jenkins_configure=""
+queue=""
+netmod=""
+
+XFAIL_CONF="maint/jenkins/xfail.conf"
+
+#####################################################################
+## Initialization
+#####################################################################
+
+while getopts ":f:j:c:o:q:m:" opt; do
+ case "$opt" in
+ j)
+ jobname=$OPTARG ;;
+ c)
+ compiler=$OPTARG ;;
+ o)
+ jenkins_configure=$OPTARG ;;
+ q)
+ queue=$OPTARG ;;
+ m)
+ netmod=$OPTARG ;;
+ f)
+ XFAIL_CONF=$OPTARG ;;
+ \?)
+ echo "Invalid option: -$OPTARG" >&2
+ exit 1
+ esac
+done
+
+#####################################################################
+## Main (
+#####################################################################
+
+if test ! -f "$XFAIL_CONF" ; then
+ echo "Cannot find $XFAIL_CONF. No XFAIL will be applied"
+ exit 0
+fi
+
+XFAILCond() {
+ 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"
+}
+
+SCRIPT="apply-xfail.sh"
+if [[ -f $SCRIPT ]]; then
+ rm $SCRIPT
+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" == $(XFAILCond "${arr[1]}" "${arr[2]}" "${arr[3]}" "${arr[4]}" "${arr[5]}") ]]; then
+ echo "${arr[@]:5}" >> $SCRIPT
+ fi
+done < "$XFAIL_CONF"
+
+if [[ -f $XFAIL_CONF ]]; then
+ source $SCRIPT
+fi
+
+exit 0
diff --git a/maint/jenkins/test-worker.sh b/maint/jenkins/test-worker.sh
index 7f94495..bcb9edb 100755
--- a/maint/jenkins/test-worker.sh
+++ b/maint/jenkins/test-worker.sh
@@ -79,6 +79,7 @@ CollectResults() {
# TODO: copy saved test binaries (for failed cases)
find . \
\( -name "filtered-make.txt" -o \
+ -name "apply-xfail.sh" -o \
-name "autogen.log" -o \
-name "config.log" -o \
-name "c.txt" -o \
@@ -418,6 +419,10 @@ if test "$BUILD_MODE" = "per-commit" ; then
./autogen.sh 2>&1 | tee autogen.log
fi
+if [[ -x maint/jenkins/set-xfail.sh ]]; then
+ ./maint/jenkins/set-xfail.sh -j $JOB_NAME -c $compiler -o $jenkins_configure -q $queue -m $_netmod
+fi
+
./configure --prefix="$TMP_SRC/_inst" $(SetNetmod $netmod) $(SetConfigOpt $jenkins_configure) \
--disable-perftest \
2>&1 | tee c.txt
diff --git a/maint/jenkins/xfail.conf b/maint/jenkins/xfail.conf
new file mode 100644
index 0000000..62836e5
--- /dev/null
+++ b/maint/jenkins/xfail.conf
@@ -0,0 +1,26 @@
+# Contitional XFAIL settings
+#
+# Syntax (similar to a cron file):
+# [jobname] [compiler] [jenkins_configure] [netmod] [queue] [sed of XFAIL]
+# 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 * sed -i "..."
+# will have no effect since none of the mxm jobs has tcp netmod in the
+# configuration.
+#
+# Examples:
+# mxm gnu debug * * sed -i "..."
+# This will apply the set the XFAIL 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 apply the set the XFAIL when the job is "mpich-master-ubuntu" and
+# the running queue is "ubuntu32".
+#
+# For each build, all applied XFAILS will be summaried in
+# ${SOURCE}/apply-xfail.sh
+#
+# master-portals * * portals4 * sed -i "s+\(^alltoall .*\)+\1 xfail=ticket0+g" test/mpi/threads/pt2pt/testlist
-----------------------------------------------------------------------
Summary of changes:
.gitignore | 1 +
maint/jenkins/set-xfail.sh | 102 ++++++++++++++++++++++++++++++++++++++++++
maint/jenkins/test-worker.sh | 5 ++
maint/jenkins/xfail.conf | 26 +++++++++++
4 files changed, 134 insertions(+), 0 deletions(-)
create mode 100755 maint/jenkins/set-xfail.sh
create mode 100644 maint/jenkins/xfail.conf
hooks/post-receive
--
MPICH primary repository
More information about the commits
mailing list