Skip to content
Snippets Groups Projects
Commit d83426ad authored by obreshko's avatar obreshko
Browse files

Extend the build log files produced. Picking the changes from !1377 and !1693

Former-commit-id: a0949517
parent ee5e2f52
No related branches found
No related tags found
No related merge requests found
......@@ -3,8 +3,12 @@
# Script used for building Gaudi.
#
# Don't stop on errors:
# Don't stop on errors but count them
set +e
ERROR_COUNT=0
# consider a pipe failed if ANY of the commands fails
set -o pipefail
# Function printing the usage information for the script
usage() {
......@@ -75,30 +79,64 @@ if [ "$SOURCEDIR" = "" ] || [ "$BUILDDIR" = "" ] || [ "$INSTALLDIR" = "" ] \
fi
# Create the build directory if it doesn't exist, and move to it:
mkdir -p ${BUILDDIR}
cd ${BUILDDIR}
mkdir -p ${BUILDDIR} || ((ERROR_COUNT++))
cd ${BUILDDIR} || ((ERROR_COUNT++))
# Set up the externals project:
source ${EXTDIR}/setup.sh
source ${EXTDIR}/setup.sh || ((ERROR_COUNT++))
#FIXME: simplify error counting below while keeping '| tee ...'
# Configure the build:
error_stamp=`mktemp .tmp.error.XXXXX` ; rm -f $error_stamp
{
cmake -DCMAKE_BUILD_TYPE:STRING=${BUILDTYPE} -DCTEST_USE_LAUNCHERS:BOOL=TRUE \
-DGAUDI_ATLAS:BOOL=TRUE -DGAUDI_ATLAS_BASE_PROJECT:STRING=${EXTPROJECT} \
-DCMAKE_INSTALL_PREFIX:PATH=/InstallArea/${PLATFORM} \
${SOURCEDIR} 2>&1 | tee cmake_config.log
${SOURCEDIR} || touch $error_stamp
} 2>&1 | tee cmake_config.log
test -f $error_stamp && ((ERROR_COUNT++))
rm -f $error_stamp
# Build it:
make -k
error_stamp=`mktemp .tmp.error.XXXXX` ; rm -f $error_stamp
{
make -k || touch $error_stamp
} 2>&1 | tee cmake_build.log
test -f $error_stamp && ((ERROR_COUNT++))
rm -f $error_stamp
# Install it:
make -k install/fast DESTDIR=${INSTALLDIR}
error_stamp=`mktemp .tmp.error.XXXXX` ; rm -f $error_stamp
{
make -k install/fast DESTDIR=${INSTALLDIR} || touch $error_stamp
} 2>&1 | tee cmake_install.log
test -f $error_stamp && ((ERROR_COUNT++))
rm -f $error_stamp
# If no RPM directory was specified, stop here:
if [ "$RPMDIR" = "" ]; then
exit 0
exit ${ERROR_COUNT}
fi
# Build the RPM for the project:
cpack
mkdir -p ${RPMDIR}
cp GAUDI*.rpm ${RPMDIR}
error_stamp=`mktemp .tmp.error.XXXXX` ; rm -f $error_stamp
{
cpack || touch $error_stamp
} 2>&1 | tee cmake_cpack.log
test -f $error_stamp && ((ERROR_COUNT++))
rm -f $error_stamp
error_stamp=`mktemp .tmp.error.XXXXX` ; rm -f $error_stamp
{
mkdir -p ${RPMDIR} && cp GAUDI*.rpm ${RPMDIR} || touch $error_stamp
} 2>&1 | tee cp_rpm.log
test -f $error_stamp && ((ERROR_COUNT++))
rm -f $error_stamp
if [ $ERROR_COUNT -ne 0 ]; then
echo "Gaudi build script counted $ERROR_COUNT errors"
fi
exit ${ERROR_COUNT}
......@@ -4,8 +4,12 @@
# repository.
#
# Don't stop on errors:
# Don't stop on errors but count them
set +e
ERROR_COUNT=0
# consider a pipe failed if ANY of the commands fails
set -o pipefail
# Function printing the usage information for the script
usage() {
......@@ -65,8 +69,8 @@ if [ "$SOURCEDIR" = "" ] || [ "$BUILDDIR" = "" ] || [ "$INSTALLDIR" = "" ]; then
fi
# Create the build directory if it doesn't exist, and move to it:
mkdir -p ${BUILDDIR}
cd ${BUILDDIR}
mkdir -p ${BUILDDIR} || ((ERROR_COUNT++))
cd ${BUILDDIR} || ((ERROR_COUNT++))
# Extra settings for providing a project version for the build if necessary:
EXTRACONF=
......@@ -75,23 +79,61 @@ if [ "$PROJECTVERSION" != "" ]; then
EXTRACONF=-D${PNAME}_PROJECT_VERSION:STRING=${PROJECTVERSION}
fi
#FIXME: simplify error counting:
# Configure the build:
cmake -DCMAKE_BUILD_TYPE:STRING=${BUILDTYPE} -DCTEST_USE_LAUNCHERS:BOOL=TRUE \
error_stamp=`mktemp .tmp.error.XXXXX` ; rm -f $error_stamp
{
cmake -DCMAKE_BUILD_TYPE:STRING=${BUILDTYPE} -DCTEST_USE_LAUNCHERS:BOOL=TRUE \
${EXTRACONF} \
${SOURCEDIR}/Projects/${PROJECT}/ 2>&1 | tee cmake_config.log
${SOURCEDIR}/Projects/${PROJECT}/ || touch $error_stamp
} 2>&1 | tee cmake_config.log
test -f $error_stamp && ((ERROR_COUNT++))
rm -f $error_stamp #FIXME: w/o $error_stamp one can't pass the status outside { ... } | tee ... shell
# Build it:
make -k
error_stamp=`mktemp .tmp.error.XXXXX` ; rm -f $error_stamp
{
make -k || touch $error_stamp
} 2>&1 | tee cmake_build.log
test -f $error_stamp && ((ERROR_COUNT++))
rm -f $error_stamp
# Install it:
make -k install/fast DESTDIR=${INSTALLDIR}
error_stamp=`mktemp .tmp.error.XXXXX` ; rm -f $error_stamp
{
make -k install/fast DESTDIR=${INSTALLDIR} || touch $error_stamp
} 2>&1 | tee cmake_install.log
test -f $error_stamp && ((ERROR_COUNT++))
rm -f $error_stamp
# If no RPM directory was specified, stop here:
if [ "$RPMDIR" = "" ]; then
exit 0
exit ${ERROR_COUNT}
fi
# Build the RPM or other package for the project:
error_stamp=`mktemp .tmp.error.XXXXX` ; rm -f $error_stamp
{
cpack || touch $error_stamp
} 2>&1 | tee cmake_cpack.log
test -f $error_stamp && ((ERROR_COUNT++))
rm -f $error_stamp
error_stamp=`mktemp .tmp.error.XXXXX` ; rm -f $error_stamp
{
mkdir -p ${RPMDIR} && \
FILES=`ls ${PROJECT}*.rpm ${PROJECT}*.tar.gz ${PROJECT}*.dmg 2>/dev/null ; true ;` && \
test "X$FILES" != "X" && \
cp ${FILES} ${RPMDIR} || touch $error_stamp
} 2>&1 | tee cp_rpm.log
test -f $error_stamp && ((ERROR_COUNT++))
rm -f $error_stamp
if [ $ERROR_COUNT -ne 0 ]; then
echo "AtlasExternals build script counted $ERROR_COUNT errors"
fi
# Build the RPM for the project:
cpack
mkdir -p ${RPMDIR}
cp ${PROJECT}*.rpm ${RPMDIR}
exit ${ERROR_COUNT}
......@@ -95,7 +95,7 @@ if [ "$FORCE" = "1" ]; then
fi
# Create some directories:
mkdir -p ${BUILDDIR}/install
mkdir -p ${BUILDDIR}/{src,install}
# Set some environment variables that the builds use internally:
export NICOS_PROJECT_VERSION=`cat ${thisdir}/version.txt`
......@@ -121,7 +121,7 @@ AthenaExternalsVersion=$(awk '/^AthenaExternalsVersion/{print $3}' ${thisdir}/ex
# Check out AthenaExternals from the right branch/tag:
${scriptsdir}/checkout_atlasexternals.sh \
-t ${AthenaExternalsVersion} \
-s ${BUILDDIR}/src/AthenaExternals
-s ${BUILDDIR}/src/AthenaExternals 2>&1 | tee ${BUILDDIR}/src/checkout.AthenaExternals.log
# Build AthenaExternals:
export NICOS_PROJECT_HOME=$(cd ${BUILDDIR}/install;pwd)/AthenaExternals
......@@ -142,7 +142,7 @@ GaudiVersion=$(awk '/^GaudiVersion/{print $3}' ${thisdir}/externals.txt)
# Check out Gaudi from the right branch/tag:
${scriptsdir}/checkout_Gaudi.sh \
-t ${GaudiVersion} \
-s ${BUILDDIR}/src/GAUDI
-s ${BUILDDIR}/src/GAUDI 2>&1 | tee ${BUILDDIR}/src/checkout.GAUDI.log
# Build Gaudi:
export NICOS_PROJECT_HOME=$(cd ${BUILDDIR}/install;pwd)/GAUDI
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment