summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorthevenyp <thevenyp@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2008-12-03 17:45:11 +0000
committerthevenyp <thevenyp@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2008-12-03 17:45:11 +0000
commit4ab4dab384e5718ab56f7031f530867dcabdc087 (patch)
tree8b041c7da011a320e01bd028f67d6479e43a35ff /tools
parent5ccc6400166aca8855cb3f68b83ed27ddfc197de (diff)
downloadmpc-4ab4dab384e5718ab56f7031f530867dcabdc087.tar.gz
tools/pipol/rc.ia64-linux-fedora, tools/pipol/rc.fedora, tools/pipol/rc.mac, tools/pipol/rc.redhat: run command files.
tools/pipol/scripts/compile-svn.sh: improve printed message, most of them are removed when compilation works well. tools/pipol/nightly/multiopt: some compilation options are plateform dependant, use temp file which are not saved when everything works, add nightly build on MacOS and use different compilers. git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@382 211d60ee-9f03-0410-a15a-8952a2c7a4e4
Diffstat (limited to 'tools')
-rwxr-xr-xtools/pipol/nightly/multiopt128
-rwxr-xr-xtools/pipol/rc.fedora9
-rwxr-xr-xtools/pipol/rc.ia64-linux-fedora9
-rwxr-xr-xtools/pipol/rc.mac12
-rwxr-xr-xtools/pipol/rc.redhat15
-rwxr-xr-xtools/pipol/scripts/compile-svn.sh30
6 files changed, 167 insertions, 36 deletions
diff --git a/tools/pipol/nightly/multiopt b/tools/pipol/nightly/multiopt
index 5f0d963..2b85aa4 100755
--- a/tools/pipol/nightly/multiopt
+++ b/tools/pipol/nightly/multiopt
@@ -16,8 +16,11 @@ function random_opt()
CONFIGURE_OPTIONS=(\
--enable-assert=full \
--enable-thread-safe \
- --disable-shared \
- --disable-alloca)
+ --disable-shared)
+# some options are not available everywhere
+if [[ $PIPOL_IMAGE == *i386-linux* || $PIPOL_IMAGE == *amd64* ]]; then
+ CONFIGURE_OPTIONS[${#CONFIGURE_OPTIONS[*]}]=--disable-alloca
+fi
# we did already compile with --enable-assert=full, so don't use zero value
local number=${RANDOM:-3}
@@ -25,7 +28,7 @@ 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]};
+ RANDOM_OPT+=" "${CONFIGURE_OPTIONS[$i]}
fi
done
@@ -39,27 +42,33 @@ CFLAGS_OPTIONS=(\
for ((i=0; i < ${#CFLAGS_OPTIONS[*]}; i++)); do
j=$i+${#CONFIGURE_OPTIONS[*]}
if [ $(($((2**j)) & number)) -ne 0 ]; then
- CFLAGS_OPT+=${CFLAGS_OPTIONS[$i]}" "
+ CFLAGS_OPT+=${CFLAGS_OPTIONS[$i]}" "
fi
done
if [ -n "$CFLAGS_OPT" ]; then
- RANDOM_OPT+=" CFLAGS=\"$CFLAGS_OPT\""
+ RANDOM_OPT+=" CFLAGS=\"$CFLAGS_OPT\""
fi
}
#
# Write script result in LOG_FILE
-# [first parameter: command to execute logging results]
+# [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()
{
-if ($*);
- then RESULT="OK: "
- else RESULT="FAILED:"; RET=1
+# 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
@@ -71,16 +80,23 @@ echo $RESULT $REVISION $PIPOL_IMAGE $PIPOL_JOB_ID $SCRIPT_NAME $* >>$LOG_FILE
#
function get_revision()
{
-REVISION=$(cd $1; svn info|sed -n 's/Revision: // p');
+REVISION=$(cd $1; svn info|sed -n 's/Revision: // p')
}
#
# Make clean in compile directory without changing current working dir
-# [parameter: source directory]
+# [parameter: build directory]
#
function clean_compile_dir()
{
-(cd $1; make -s clean)
+(
+ cd $1;
+ make clean >$PIPOL_WDIR/clean.tmp
+ if [ $? != 0 ]; then
+ # something wrong happened: save log file
+ cat $PIPOL_WDIR/clean.tmp
+ fi
+)
}
@@ -92,25 +108,46 @@ function clean_compile_dir()
#PIPOL esn amd64-linux-fedora-core8.dd.gz none 02:00 --silent --user
#PIPOL esn i386-linux-fedora-core8.dd.gz none 02:00 --silent --user
-#PIPOL esn amd64-linux-redhatEL-5.0.dd.gz none 02:00 --silent --user
-#PIPOL esn i386-linux-redhatEL-5.0.dd.gz none 02:00 --silent --user
+### #PIPOL esn amd64-linux-redhatEL-5.0.dd.gz none 02:00 --silent --user
+### #PIPOL esn i386-linux-redhatEL-5.0.dd.gz none 02:00 --silent --user
#PIPOL esn ia64-linux-redhatEL-5.0.dd none 02:00 --silent --user
+### #PIPOL esn ia64-linux-fedora-core9.dd 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
###
-# this understood by mpc and mpfr compilation processes
-export GMP_CHECK_RANDOMIZE=1
-
-#
-# 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
+# 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
+ ;;
+ *amd64-linux*) # set path to Intel compiler (bin, lib, and so on)
+ . /net/amd64/icc/11.0.074/bin/intel64/iccvars_intel64.sh
+ ;;
+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
+
+# this is understood by both mpc and mpfr compilation processes
+export GMP_CHECK_RANDOMIZE=1
#
# Get mpfr trunk and compile it with various options
@@ -130,6 +167,49 @@ 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"
+ ;;
+ *amd64-linux*)
+ # Intel compiler
+ clean_compile_dir $PIPOL_WDIR/mpfr-trunk
+ log $SCRIPTS_DIR/compile-svn.sh mpfr-trunk CC="icc"
+ ;;
+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"
+ ;;
+ *amd64-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
#
diff --git a/tools/pipol/rc.fedora b/tools/pipol/rc.fedora
new file mode 100755
index 0000000..1112066
--- /dev/null
+++ b/tools/pipol/rc.fedora
@@ -0,0 +1,9 @@
+#!/bin/sh
+yum -y remove ccache
+
+yum --enablerepo=development -y install compat-libstdc++-33.i386
+yum --enablerepo=development -y upgrade automake
+yum --enablerepo=development -y install libtool
+yum --enablerepo=development -y install texinfo
+yum --enablerepo=development -y install gmp-devel
+yum --enablerepo=development -y install mpfr-devel
diff --git a/tools/pipol/rc.ia64-linux-fedora b/tools/pipol/rc.ia64-linux-fedora
new file mode 100755
index 0000000..1112066
--- /dev/null
+++ b/tools/pipol/rc.ia64-linux-fedora
@@ -0,0 +1,9 @@
+#!/bin/sh
+yum -y remove ccache
+
+yum --enablerepo=development -y install compat-libstdc++-33.i386
+yum --enablerepo=development -y upgrade automake
+yum --enablerepo=development -y install libtool
+yum --enablerepo=development -y install texinfo
+yum --enablerepo=development -y install gmp-devel
+yum --enablerepo=development -y install mpfr-devel
diff --git a/tools/pipol/rc.mac b/tools/pipol/rc.mac
new file mode 100755
index 0000000..2dbaa9c
--- /dev/null
+++ b/tools/pipol/rc.mac
@@ -0,0 +1,12 @@
+#!/bin/sh
+/opt/local/bin/port selfupdate
+/opt/local/bin/port install autoconf
+/opt/local/bin/port install automake
+/opt/local/bin/port install libtool
+/opt/local/bin/port install gzip
+/opt/local/bin/port install gmp
+/opt/local/bin/port install mpfr
+chmod 1777 /pipol
+rm -rf /usr/local/lib/*
+rm -rf /usr/local/include/*
+
diff --git a/tools/pipol/rc.redhat b/tools/pipol/rc.redhat
new file mode 100755
index 0000000..e4ae1dc
--- /dev/null
+++ b/tools/pipol/rc.redhat
@@ -0,0 +1,15 @@
+#!/bin/sh
+# use fedora repositories
+cp $PIPOL_HOMEDIR/.pipol/yum.repos.d/* /etc/yum.repos.d
+
+#yum -y update yum
+
+# update tools
+yum --nogpgcheck -y update automake
+
+# get recent mpfr library
+yum --noplugins -y install gmp-devel
+#yum --disableplugin=rhnplugin -y install mpfr-devel
+cd /
+tar xjf $PIPOL_HOMEDIR/src/mpfr-2.3.2-ia64.tar.bz2
+
diff --git a/tools/pipol/scripts/compile-svn.sh b/tools/pipol/scripts/compile-svn.sh
index 5cbac09..092c6c1 100755
--- a/tools/pipol/scripts/compile-svn.sh
+++ b/tools/pipol/scripts/compile-svn.sh
@@ -1,17 +1,18 @@
#!/bin/sh
if [[ $# -lt 1 ]]; then
- echo Usage: `basename $0` dir [options];
- echo -n "Configure, compile, and check sources in \$PIPOL_WDIR/dir "
- echo passing options to the compiler;
- exit 1;
-
- else
- echo \*; echo \* $0 $*; echo \*;
+ echo Usage: `basename $0` dir [options];
+ echo -n "Configure, compile, and check sources in \$PIPOL_WDIR/dir "
+ echo passing options to the compiler;
+ exit 1;
+else
+ echo \*
+ echo \* $0 $*
+ echo \*
fi
cd $PIPOL_WDIR/$1
if [[ ! -f configure ]]; then
- autoreconf -i || exit 1;
+ autoreconf -i || exit 1
fi
shift
@@ -20,8 +21,13 @@ if grep -q "CFLAGS=" <<<"$@"; then
# and CFLAGS options manually
CONFIGURE_OPTIONS=`sed -ne 's/\(.*\)\ *CFLAGS=\"\(.*\)\"\(.*\)/\1\3/p' <<<"$@"`
CFLAGS_OPTIONS=`sed -ne 's/\(.*\)\ *CFLAGS=\"\(.*\)\"\(.*\)/CFLAGS=\2/p' <<<"$@"`
- ./configure $CONFIGURE_OPTIONS "$CFLAGS_OPTIONS" && make && make check;
-
+ ./configure $CONFIGURE_OPTIONS "$CFLAGS_OPTIONS"
else
- ./configure "$@" && make && make check;
-fi \ No newline at end of file
+ ./configure "$@"
+fi
+if [ $? != 0 ]; then
+# configure failed
+ cat config.log
+ exit 1
+fi
+make && make check