X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9154f5e4e00fdd0ed3ea750235f245f85b813b18..5ed3e0f2c9aa074fe4194055433be38e316659b2:/tools/jenkins/Flags.sh diff --git a/tools/jenkins/Flags.sh b/tools/jenkins/Flags.sh index 44ffae8a10..046a5ad045 100755 --- a/tools/jenkins/Flags.sh +++ b/tools/jenkins/Flags.sh @@ -2,6 +2,8 @@ set -e +echo "Starting Flags.sh $*" + die() { echo "$@" exit 1 @@ -16,11 +18,11 @@ onoff() { fi } -[ $# -eq 4 ] || die "Needs 4 arguments : JAVA MC SMPI DEBUG" +[ $# -eq 5 ] || die "Needs 5 arguments : JAVA MC SMPI DEBUG MSG" ### Cleanup previous runs -! [ -z "$WORKSPACE" ] || die "No WORKSPACE" +[ -n "$WORKSPACE" ] || die "No WORKSPACE" [ -d "$WORKSPACE" ] || die "WORKSPACE ($WORKSPACE) does not exist" do_cleanup() { @@ -38,48 +40,59 @@ do_cleanup "$WORKSPACE/build" NUMPROC="$(nproc)" || NUMPROC=1 -cd $WORKSPACE/build +cd "$WORKSPACE"/build #we can't just receive ON or OFF as values as display is bad in the resulting jenkins matrix -if [ $1 = "JAVA" ] +if [ "$1" = "JAVA" ] then buildjava="ON" else buildjava="OFF" fi -if [ $2 = "MC" ] +if [ "$2" = "MC" ] then buildmc="ON" else buildmc="OFF" fi -if [ $3 = "SMPI" ] +if [ "$3" = "SMPI" ] then buildsmpi="ON" else buildsmpi="OFF" fi -if [ $4 = "DEBUG" ] +if [ "$4" = "DEBUG" ] then builddebug="ON" else builddebug="OFF" fi +if [ "$5" = "MSG" ] +then + buildmsg="ON" +else + buildmsg="OFF" +fi -echo "Step ${STEP}/${NSTEPS} - Building with java=${buildjava}, debug=${builddebug}, SMPI=${buildsmpi}, MC=${buildmc}" -cmake -Denable_documentation=OFF -Denable_lua=ON -Denable_java=${buildjava} \ +if [ $buildmsg = "OFF" ] && [ $buildjava = "ON" ] +then + echo "Don't even try to build Java without MSG" + exit 0 +fi + +echo "Step ${STEP}/${NSTEPS} - Building with java=${buildjava}, debug=${builddebug}, SMPI=${buildsmpi}, MC=${buildmc}, MSG=${buildmsg}" +cmake -Denable_documentation=OFF -Denable_java=${buildjava} -Denable_msg=${buildmsg} \ -Denable_compile_optimizations=OFF -Denable_compile_warnings=ON \ - -Denable_jedule=ON -Denable_mallocators=ON -Denable_debug=${builddebug} \ + -Denable_mallocators=ON -Denable_debug=${builddebug} \ -Denable_smpi=${buildsmpi} -Denable_smpi_MPICH3_testsuite=${buildsmpi} -Denable_model-checking=${buildmc} \ - -Denable_memcheck=OFF -Denable_memcheck_xml=OFF -Denable_smpi_ISP_testsuite=OFF \ - -Denable_ns3=$(onoff test "$buildmc" != "ON") -Denable_coverage=OFF $WORKSPACE + -Denable_memcheck=OFF -Denable_memcheck_xml=OFF -Denable_smpi_MBI_testsuite=OFF \ + -Denable_ns3=$(onoff test "$buildmc" != "ON") -Denable_coverage=OFF -DLTO_EXTRA_FLAG="auto" "$WORKSPACE" make -j$NUMPROC tests -make clean - - +cd .. +rm -rf build