A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix the make distcheck. Again.
[simgrid.git]
/
buildtools
/
jenkins
/
run.sh
diff --git
a/buildtools/jenkins/run.sh
b/buildtools/jenkins/run.sh
index
287c144
..
f726799
100755
(executable)
--- a/
buildtools/jenkins/run.sh
+++ b/
buildtools/jenkins/run.sh
@@
-3,6
+3,16
@@
WORKSPACE=$1
build_mode=$2
WORKSPACE=$1
build_mode=$2
+# usage: die status message...
+die () {
+ local status=${1:-1}
+ shift
+ [ $# -gt 0 ] || set -- "Error - Halting"
+ echo "$@" >&2
+ exit $status
+}
+
+ulimit -c 0
rm -rf $WORKSPACE/build
rm -rf $WORKSPACE/build
@@
-12,46
+22,22
@@
cd $WORKSPACE/build
export PATH=./lib/:../../lib:$PATH
if test "$(uname -o)" = "Msys"
export PATH=./lib/:../../lib:$PATH
if test "$(uname -o)" = "Msys"
-then
+then
#$NUMBER_OF_PROCESSORS should be already set on win
if [ -z "$NUMBER_OF_PROCESSORS" ]; then
NUMBER_OF_PROCESSORS=1
#$NUMBER_OF_PROCESSORS should be already set on win
if [ -z "$NUMBER_OF_PROCESSORS" ]; then
NUMBER_OF_PROCESSORS=1
- fi
-
- cmake -G "MSYS Makefiles" $WORKSPACE
-
- if [ $? -ne 0 ] ; then
- echo "Failed to do the first cmake - Halting"
- exit 1
- fi
-
- make dist
-
- if [ $? -ne 0 ] ; then
- echo "Failed to build dist - Halting"
- exit 2
fi
fi
- cmake -G "MSYS Makefiles" -Denable_
java=ON -Denable_model-checking=OFF -Denable_lua=OFF -Denable_compile_optimizations=ON -Denable_smpi=ON -Denable_smpi_MPICH3_testsuite=ON -Denable_compile_warnings=OFF .
+ cmake -G "MSYS Makefiles" -Denable_
documentation=OFF $WORKSPACE || die 1 "Failed to do the first cmake - Halting"
- if [ $? -ne 0 ] ; then
- echo "Failed to perform the Cmake for $build_mode - Halting"
- exit 5
- fi
-
- make -j$NUMBER_OF_PROCESSORS
+ make dist || die 2 "Failed to build dist - Halting"
- if [ $? -ne 0 ] ; then
- echo "Build failure - Halting"
- exit 5
- fi
+ cmake -G "MSYS Makefiles" -Denable_java=ON -Denable_model-checking=OFF -Denable_lua=OFF -Denable_compile_optimizations=ON -Denable_smpi=ON -Denable_smpi_MPICH3_testsuite=ON -Denable_compile_warnings=OFF -Denable_documentation=OFF . \
+ || die 5 "Failed to perform the Cmake for $build_mode - Halting"
- make
nsis
+ make
-j$NUMBER_OF_PROCESSORS || die 5 "Build failure - Halting"
- if [ $? -ne 0 ] ; then
- echo "Failure while generating the Windows executable - Halting"
- exit 6
- fi
+ make nsis || die 6 "Failure while generating the Windows executable - Halting"
else
# Linux:
else
# Linux:
@@
-60,68
+46,38
@@
else
NUMBER_OF_PROCESSORS=$(grep -c "^processor[[:space:]]*:" ${cpuinfo_file} 2>/dev/null)
[ "0$NUMBER_OF_PROCESSORS" -gt 0 ] || NUMBER_OF_PROCESSORS=1
NUMBER_OF_PROCESSORS=$(grep -c "^processor[[:space:]]*:" ${cpuinfo_file} 2>/dev/null)
[ "0$NUMBER_OF_PROCESSORS" -gt 0 ] || NUMBER_OF_PROCESSORS=1
- cmake $WORKSPACE
-
- if [ $? -ne 0 ] ; then
- echo "Failed to do the first cmake - Halting"
- exit 1
- fi
+ cmake -Denable_documentation=OFF $WORKSPACE || die 1 "Failed to do the first cmake - Halting"
rm Simgrid*.tar.gz
rm Simgrid*.tar.gz
- make dist
+ make dist
|| die 2 "Failed to build dist - Halting"
- if [ $? -ne 0 ] ; then
- echo "Failed to build dist - Halting"
- exit 2
- fi
-
- tar xzf `cat VERSION`.tar.gz
-
- if [ $? -ne 0 ] ; then
- echo "Failed to extract the generated tgz - Halting"
- exit 3
- fi
-
- cd `cat VERSION`
+ tar xzf `cat VERSION`.tar.gz || die 3 "Failed to extract the generated tgz - Halting"
- if [ $? -ne 0 ] ; then
- echo "Path `cat VERSION` cannot be found - Halting"
- exit 4
- fi
+ cd `cat VERSION` || die 4 "Path `cat VERSION` cannot be found - Halting"
if [ "$build_mode" = "Debug" ]
then
if [ "$build_mode" = "Debug" ]
then
- cmake -Denable_
coverage=ON
-Denable_java=ON -Denable_model-checking=OFF -Denable_lua=ON -Denable_compile_optimizations=ON -Denable_smpi=ON -Denable_smpi_MPICH3_testsuite=ON -Denable_compile_warnings=ON .
+ cmake -Denable_
documentation=OFF -Denable_coverage=OFF
-Denable_java=ON -Denable_model-checking=OFF -Denable_lua=ON -Denable_compile_optimizations=ON -Denable_smpi=ON -Denable_smpi_MPICH3_testsuite=ON -Denable_compile_warnings=ON .
fi
if [ "$build_mode" = "ModelChecker" ]
then
fi
if [ "$build_mode" = "ModelChecker" ]
then
- cmake -Denable_
coverage=ON
-Denable_java=ON -Denable_smpi=ON -Denable_model-checking=ON -Denable_lua=ON -Denable_compile_optimizations=OFF -Denable_compile_warnings=ON .
+ cmake -Denable_
documentation=OFF -Denable_coverage=OFF
-Denable_java=ON -Denable_smpi=ON -Denable_model-checking=ON -Denable_lua=ON -Denable_compile_optimizations=OFF -Denable_compile_warnings=ON .
fi
if [ "$build_mode" = "DynamicAnalysis" ]
then
fi
if [ "$build_mode" = "DynamicAnalysis" ]
then
- cmake -Denable_lua=OFF -Denable_java=ON -Denable_tracing=ON -Denable_smpi=ON -Denable_compile_optimizations=OFF -Denable_compile_warnings=ON -Denable_lib_static=OFF -Denable_model-checking=OFF -Denable_latency_bound_tracking=OFF -Denable_gtnets=OFF -Denable_jedule=OFF -Denable_mallocators=OFF -Denable_memcheck=ON .
+ cmake -Denable_
documentation=OFF -Denable_
lua=OFF -Denable_java=ON -Denable_tracing=ON -Denable_smpi=ON -Denable_compile_optimizations=OFF -Denable_compile_warnings=ON -Denable_lib_static=OFF -Denable_model-checking=OFF -Denable_latency_bound_tracking=OFF -Denable_gtnets=OFF -Denable_jedule=OFF -Denable_mallocators=OFF -Denable_memcheck=ON .
fi
fi
- if [ $? -ne 0 ] ; then
- echo "Failed to perform the Cmake for $build_mode - Halting"
- exit 5
- fi
-
- make -j$NUMBER_OF_PROCESSORS
-
- if [ $? -ne 0 ] ; then
- echo "Build failure - Halting"
- exit 6
- fi
+ [ $? -eq 0 ] || die 5 "Failed to perform the Cmake for $build_mode - Halting"
+ make -j$NUMBER_OF_PROCESSORS || die 6 "Build failure - Halting"
fi
fi
-
echo "running tests with $NUMBER_OF_PROCESSORS processors"
echo "running tests with $NUMBER_OF_PROCESSORS processors"
-ctest -T test --no-compress-output --timeout 100 -j$NUMBER_OF_PROCESSORS || true
+ctest -
-output-on-failure -
T test --no-compress-output --timeout 100 -j$NUMBER_OF_PROCESSORS || true
if [ -f Testing/TAG ] ; then
xsltproc $WORKSPACE/buildtools/jenkins/ctest2junit.xsl -o "$WORKSPACE/CTestResults.xml" Testing/`head -n 1 < Testing/TAG`/Test.xml
fi
if [ -f Testing/TAG ] ; then
xsltproc $WORKSPACE/buildtools/jenkins/ctest2junit.xsl -o "$WORKSPACE/CTestResults.xml" Testing/`head -n 1 < Testing/TAG`/Test.xml
fi