diff options
Diffstat (limited to 'tools/pipol/nightly/multiopt')
-rwxr-xr-x | tools/pipol/nightly/multiopt | 248 |
1 files changed, 0 insertions, 248 deletions
diff --git a/tools/pipol/nightly/multiopt b/tools/pipol/nightly/multiopt deleted file mode 100755 index c897c62..0000000 --- a/tools/pipol/nightly/multiopt +++ /dev/null @@ -1,248 +0,0 @@ -#!/bin/bash -SCRIPTS_DIR=$PIPOL_HOMEDIR/.pipol/scripts - -# Return value (set it to 1 if a script fails) -RET=0 - -# -# Set RANDOM_OPT to random compiler options -# [no parameter] -# -function random_opt() -{ -CONFIGURE_OPTIONS=(\ - --enable-assert=full \ - --disable-shared) -# some options are not available everywhere -case $PIPOL_IMAGE in - *mac*) - : ;; - *linux*) - CONFIGURE_OPTIONS[${#CONFIGURE_OPTIONS[*]}] = --enable-thread-safe - ;; -esac - -# we did already compile with --enable-assert=full, so don't use zero value -local number=${RANDOM:-3} - -unset RANDOM_OPT -for ((i=0; i < ${#CONFIGURE_OPTIONS[*]}; i++)); do - if [ $(($((2**i)) & number)) -ne 0 ]; then - RANDOM_OPT+=" "${CONFIGURE_OPTIONS[$i]} - fi -done - -unset CFLAGS_OPT -CFLAGS_OPTIONS=(\ - -O3 \ - -ansi \ - -std=c99 \ - -fno-common) -# some options are not available everywhere -case $PIPOL_IMAGE in - *mac*) - : ;; - *linux*) - CFLAGS_OPTIONS[${#CFLAGS_OPTIONS[*]}]="-D_FORTIFY_SOURCE=2" - CFLAGS_OPTIONS[${#CFLAGS_OPTIONS[*]}]="-D_XOPEN_SOURCE=500" - ;; -esac - -for ((i=0; i < ${#CFLAGS_OPTIONS[*]}; i++)); do - j=$i+${#CONFIGURE_OPTIONS[*]} - if [ $(($((2**j)) & number)) -ne 0 ]; then - CFLAGS_OPT+=${CFLAGS_OPTIONS[$i]}" " - fi -done -if [ -n "$CFLAGS_OPT" ]; then - RANDOM_OPT+=" CFLAGS=\"$CFLAGS_OPT\"" -fi -} - -# -# Write script result in LOG_FILE -# [first parameter: command to be executed while logging results] -# [optional other parameters: command parameters] -# -LOG_FILE=$PIPOL_HOMEDIR/.pipol/log/`date +%y%m%d`-`basename $0` - -function log() -{ -# execute and log in a temp file -if $* >$PIPOL_WDIR/execution.tmp; then - RESULT="OK: " -else - # something wrong happened: record execution log - cat $PIPOL_WDIR/execution.tmp - RESULT="FAILED:" - RET=1 -fi; -# write result in images global file -SCRIPT_NAME=`basename $1` -shift -echo $RESULT $REVISION $PIPOL_IMAGE $PIPOL_JOB_ID $SCRIPT_NAME $* >>$LOG_FILE -} - -# -# Set REVISION to the current revision number of the parameter -# [parameter: svn directory] -# -function get_revision() -{ -REVISION=$(cd $1; svn info|sed -n 's/Revision: // p') -} - -# -# Make clean in compile directory without changing current working dir -# [parameter: build directory] -# -function clean_compile_dir() -{ -( - cd $1; - make clean >$PIPOL_WDIR/clean.tmp - if [ $? != 0 ]; then - # something wrong happened: save log file - cat $PIPOL_WDIR/clean.tmp - fi -) -} - - -### - -# -# Deploy images -# -#PIPOL esn amd64-linux-fedora-core9.dd.gz none 02:00 --silent --user -#PIPOL esn i386-linux-fedora-core9.dd.gz none 02:00 --silent --user -#PIPOL esn ia64-linux-fedora-core9.dd none 02:00 --silent --user -#PIPOL esn i386-linux-debian-testing.dd.gz none 02:00 --silent --user - -#PIPOL esn i386_mac-mac-osx-server-leopard.dd.gz none 02:00 --silent --user - -### -### Following commands are executed on each and all deployed images -### - -# -# image-dependant configurations -# -# architecture-dependant -case $PIPOL_IMAGE in - *i386-linux*) # set path to SUN studio compiler - export PATH=/net/i386/sunstudio/sunstudio12/bin:$PATH - # set path to Intel compiler (bin, lib, and so on) - . /net/i386/icc/11.0.074/bin/iccvars.sh ia32 - ;; - *amd64-linux*) # set path to Intel compiler (bin, lib, and so on) - . /net/amd64/icc/11.0.074/bin/iccvars.sh intel64 - ;; - *ia64-linux*) # set path to Intel compiler (bin, lib, and so on) - . /net/ia64/icc/11.0.074/bin/iccvars.sh ia64 - ;; -esac - -# system-dependant -case $PIPOL_IMAGE in - *mac*) # new packages are installed in /opt subdirectories - export C_INCLUDE_PATH=/opt/local/include:$C_INCLUDE_PATH - export LD_LIBRARY_PATH=/opt/local/lib:$LD_LIBRARY_PATH - export LIBRARY_PATH=/opt/local/lib:$LIBRARY_PATH - ;; - *redhatEL*) # path to recent mpfr lib - export C_INCLUDE_PATH=$PIPOL_WDIR/include:$C_INCLUDE_PATH - export LD_LIBRARY_PATH=$PIPOL_WDIR/lib:$LD_LIBRARY_PATH - export LIBRARY_PATH=$PIPOL_WDIR/lib:$LIBRARY_PATH - ;; -esac - -# Setting random seed enables replay -#RANDOM=$PIPOL_JOB -RANDOM=$$ - -# this is understood by both mpc and mpfr compilation processes -export GMP_CHECK_RANDOMIZE=1 - -# -# Get mpfr trunk and compile it with various options -# -unset REVISION -log $SCRIPTS_DIR/get-svn.sh mpfr/trunk mpfr-trunk -get_revision $PIPOL_WDIR/mpfr-trunk -REVISION="mpfr(r$REVISION)" -export MPFR_CHECK_MAX=1 -export MPFR_CHECK_SUSPICIOUS_OVERFLOW=1 -export MPFR_CHECK_LIBC_PRINTF=1 -log $SCRIPTS_DIR/compile-svn.sh mpfr-trunk - -clean_compile_dir $PIPOL_WDIR/mpfr-trunk -log $SCRIPTS_DIR/compile-svn.sh mpfr-trunk --enable-assert=full - -clean_compile_dir $PIPOL_WDIR/mpfr-trunk -random_opt -log $SCRIPTS_DIR/compile-svn.sh mpfr-trunk $RANDOM_OPT - -# Compile mpfr with non-GNU compilers -case $PIPOL_IMAGE in - *i386-linux*) - # SUN Studio compiler - clean_compile_dir $PIPOL_WDIR/mpfr-trunk - log $SCRIPTS_DIR/compile-svn.sh mpfr-trunk CC=cc - # Intel compiler - clean_compile_dir $PIPOL_WDIR/mpfr-trunk - log $SCRIPTS_DIR/compile-svn.sh mpfr-trunk CC=icc CFLAGS=\"-Wno-error\" - ;; - *amd64-linux*) - # Intel compiler - clean_compile_dir $PIPOL_WDIR/mpfr-trunk - log $SCRIPTS_DIR/compile-svn.sh mpfr-trunk CC="icc" - ;; - *ia64-linux*) - # Intel compiler - clean_compile_dir $PIPOL_WDIR/mpfr-trunk - log $SCRIPTS_DIR/compile-svn.sh mpfr-trunk CC=icc CFLAGS=\"-Wno-error\" - ;; -esac - -# -# Get mpc trunk and compile it -# -unset REVISION -log $SCRIPTS_DIR/get-svn.sh mpc/trunk mpc-trunk -get_revision $PIPOL_WDIR/mpc-trunk -REVISION="mpc(r$REVISION)" -log $SCRIPTS_DIR/compile-svn.sh mpc-trunk - -clean_compile_dir $PIPOL_WDIR/mpc-trunk -log $SCRIPTS_DIR/compile-svn.sh mpc-trunk --disable-shared - -clean_compile_dir $PIPOL_WDIR/mpc-trunk -log $SCRIPTS_DIR/compile-svn.sh mpc-trunk --disable-static - -# Compile mpc with non-GNU compilers -case $PIPOL_IMAGE in - *i386-linux*) - # SUN Studio compiler - clean_compile_dir $PIPOL_WDIR/mpc-trunk - log $SCRIPTS_DIR/compile-svn.sh mpc-trunk CC="cc" - # Intel compiler - clean_compile_dir $PIPOL_WDIR/mpc-trunk - log $SCRIPTS_DIR/compile-svn.sh mpc-trunk CC=icc CFLAGS=\"-Wno-error\" - ;; - *amd64-linux*) - # Intel compiler - clean_compile_dir $PIPOL_WDIR/mpc-trunk - log $SCRIPTS_DIR/compile-svn.sh mpc-trunk CC=icc CFLAGS=\"-Wno-error\" - ;; - *ia64-linux*) - # Intel compiler - clean_compile_dir $PIPOL_WDIR/mpc-trunk - log $SCRIPTS_DIR/compile-svn.sh mpc-trunk CC=icc CFLAGS=\"-Wno-error\" - ;; -esac - -# -# Return value is 0 if no script failed -# -exit $RET; |