瀏覽代碼

contrib: add stage to run make check

Nathalie Furmento 7 年之前
父節點
當前提交
ba56a0a454
共有 2 個文件被更改,包括 99 次插入0 次删除
  1. 38 0
      contrib/ci.inria.fr/Jenkinsfile-basic
  2. 61 0
      contrib/ci.inria.fr/job-1-check.sh

+ 38 - 0
contrib/ci.inria.fr/Jenkinsfile-basic

@@ -20,9 +20,47 @@ pipeline
 					}
 					stash includes: "${env.tarballgz}", name: 'tarballgz'
 					stash includes: "starpu.pdf", name: 'doc'
+					// Stash those scripts because they are not in make dist
+					dir('contrib/ci.inria.fr')
+					{
+						stash includes: "job-1-check.sh", name: 'script-unix-check'
+					}
 					archiveArtifacts artifacts: "${env.tarballgz},starpu.pdf", fingerprint: true, onlyIfSuccessful: true
 				}
 			}
 		}
+		stage('Check')
+		{
+			steps
+			{
+				script
+				{
+					labelToSelect = 'unix'
+					listOfNodeNames = jenkins.model.Jenkins.instance.nodes.collect
+					{
+						node -> node.getLabelString().contains(labelToSelect) ? node.name : null
+					}
+					listOfNodeNames.removeAll(Collections.singleton(null))
+
+					def p = listOfNodeNames.collectEntries
+					{
+						[ (it):
+						{
+							node(it)
+							{
+								dir('check-unix')
+								{
+									unstash 'tarballgz'
+									unstash 'script-unix-check'
+									sh 'chmod 755 job-1-check.sh && ./job-1-check.sh'
+									deleteDir()
+								}
+							}
+						}
+					]}
+					parallel p;
+				}
+			}
+		}
 	}
 }

+ 61 - 0
contrib/ci.inria.fr/job-1-check.sh

@@ -0,0 +1,61 @@
+#!/bin/sh
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2013-2018                                CNRS
+#
+# StarPU is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or (at
+# your option) any later version.
+#
+# StarPU is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+#
+# See the GNU Lesser General Public License in COPYING.LGPL for more details.
+#
+
+set -e
+set -x
+
+export PKG_CONFIG_PATH=/home/ci/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
+export LD_LIBRARY_PATH=/home/ci/usr/local/lib:$LD_LIBRARY_PATH
+
+tarball=$(ls -tr starpu-*.tar.gz | tail -1)
+basename=$(basename $tarball .tar.gz)
+
+export STARPU_HOME=$PWD/$basename/home
+mkdir -p $basename
+cd $basename
+env > $PWD/env
+
+test -d $basename && chmod -R u+rwX $basename && rm -rf $basename
+tar xfz ../$tarball
+cd $basename
+mkdir build
+cd build
+
+export CC=gcc
+
+day=$(date +%u)
+if test $day -le 5
+then
+    ../configure --enable-quick-check --enable-verbose --enable-mpi-check --disable-build-doc $STARPU_CONFIGURE_OPTIONS
+else
+    ../configure --enable-long-check --enable-verbose --enable-mpi-check --disable-build-doc $STARPU_CONFIGURE_OPTIONS
+fi
+
+make
+#make check
+(make -k check || true) > ../check_$$ 2>&1
+cat ../check_$$
+make showcheck
+
+grep "^FAIL:" ../check_$$ || true
+
+make clean
+
+grep "^FAIL:" ../check_$$ || true
+
+exit $(grep "^FAIL:" ../check_$$ | wc -l)
+