From 965dfa640b89bd1be61bca3128362db172fe33cc Mon Sep 17 00:00:00 2001 From: Oleg Zenin <ozenin@lxplus008.cern.ch> Date: Wed, 24 Oct 2018 22:38:07 +0200 Subject: [PATCH] time prints the full command line before real ... user ... sys ... Former-commit-id: b2be7c0a746a45a18923ac7af040b005321bce4b --- Projects/AnalysisBase/build.sh | 12 +++++++----- Projects/AnalysisTop/build.sh | 12 +++++++----- Projects/AthDataQuality/build.sh | 10 ++++++---- Projects/AthSimulation/build.sh | 10 ++++++---- Projects/Athena/build.sh | 12 +++++++----- 5 files changed, 33 insertions(+), 23 deletions(-) diff --git a/Projects/AnalysisBase/build.sh b/Projects/AnalysisBase/build.sh index efcbd1a90f2..f84b66c19b1 100755 --- a/Projects/AnalysisBase/build.sh +++ b/Projects/AnalysisBase/build.sh @@ -4,6 +4,8 @@ # script in this directory. # +_time_="/usr/bin/time -f time::\t%C::\treal:\t%E\tuser:\t%U\tsys:\t%S\n " + # Function printing the usage information for the script usage() { echo "Usage: build.sh [-t type] [-b dir] [-g generator] [-c] [-m] [-i] [-p] [-a]" @@ -118,7 +120,7 @@ if [ -n "$EXE_CMAKE" ]; then fi # Now run the actual CMake configuration: - time cmake -G "${GENERATOR}" \ + $_time_ cmake -G "${GENERATOR}" \ -DCMAKE_BUILD_TYPE:STRING=${BUILDTYPE} \ ${USE_LAUNCHERS} \ ${AnalysisBaseSrcDir} 2>&1 | tee cmake_config.log @@ -136,26 +138,26 @@ if [ -n "$EXE_MAKE" ]; then # In order to build the project in a nightly setup, allowing for some # build steps to fail while still continuing, we need to use "make" # directly. Only allowing the usage of the Makefile generator. - time make -k 2>&1 | tee cmake_build.log + $_time_ make -k 2>&1 | tee cmake_build.log else # However in a non-nightly setup we can just rely on CMake to start # the build for us. In this case we can use any generator we'd like # for the build. Notice however that the installation step can still # be only done correctly by using GNU Make directly. - time cmake --build . 2>&1 | tee cmake_build.log + $_time_ cmake --build . 2>&1 | tee cmake_build.log fi fi # Install the results: if [ -n "$EXE_INSTALL" ]; then - time make install/fast \ + $_time_ make install/fast \ DESTDIR=${BUILDDIR}/install/AnalysisBase/${NICOS_PROJECT_VERSION} \ 2>&1 | tee cmake_install.log fi # Build an RPM for the release: if [ -n "$EXE_CPACK" ]; then - time cpack 2>&1 | tee cmake_cpack.log + $_time_ cpack 2>&1 | tee cmake_cpack.log FILES=$(ls AnalysisBase*.rpm AnalysisBase*.dmg AnalysisBase*.tar.gz) cp ${FILES} ${BUILDDIR}/ fi diff --git a/Projects/AnalysisTop/build.sh b/Projects/AnalysisTop/build.sh index 30b07b4a7a2..f4d82b2e8bf 100755 --- a/Projects/AnalysisTop/build.sh +++ b/Projects/AnalysisTop/build.sh @@ -4,6 +4,8 @@ # script in this directory. # +_time_="/usr/bin/time -f time::\t%C::\treal:\t%E\tuser:\t%U\tsys:\t%S\n " + # Function printing the usage information for the script usage() { echo "Usage: build.sh [-t type] [-b dir] [-g generator] [-c] [-m] [-i] [-p] [-a]" @@ -116,7 +118,7 @@ if [ -n "$EXE_CMAKE" ]; then fi # Now run the actual CMake configuration: - time cmake -G "${GENERATOR}" \ + $_time_ cmake -G "${GENERATOR}" \ -DCMAKE_BUILD_TYPE:STRING=${BUILDTYPE} \ ${USE_LAUNCHERS} \ ${AnalysisTopSrcDir} 2>&1 | tee cmake_config.log @@ -134,26 +136,26 @@ if [ -n "$EXE_MAKE" ]; then # In order to build the project in a nightly setup, allowing for some # build steps to fail while still continuing, we need to use "make" # directly. Only allowing the usage of the Makefile generator. - time make -k 2>&1 | tee cmake_build.log + $_time_ make -k 2>&1 | tee cmake_build.log else # However in a non-nightly setup we can just rely on CMake to start # the build for us. In this case we can use any generator we'd like # for the build. Notice however that the installation step can still # be only done correctly by using GNU Make directly. - time cmake --build . 2>&1 | tee cmake_build.log + $_time_ cmake --build . 2>&1 | tee cmake_build.log fi fi # Install the results: if [ -n "$EXE_INSTALL" ]; then - time make install/fast \ + $_time_ make install/fast \ DESTDIR=${BUILDDIR}/install/AnalysisTop/${NICOS_PROJECT_VERSION} \ 2>&1 | tee cmake_install.log fi # Build an RPM for the release: if [ -n "$EXE_CPACK" ]; then - time cpack 2>&1 | tee cmake_cpack.log + $_time_ cpack 2>&1 | tee cmake_cpack.log FILES=$(ls AnalysisTop*.rpm AnalysisTop*.dmg AnalysisTop*.tar.gz) cp ${FILES} ${BUILDDIR}/ fi diff --git a/Projects/AthDataQuality/build.sh b/Projects/AthDataQuality/build.sh index b237408e895..59138dcad46 100755 --- a/Projects/AthDataQuality/build.sh +++ b/Projects/AthDataQuality/build.sh @@ -4,6 +4,8 @@ # scripts in this directory. # +_time_="/usr/bin/time -f time::\t%C::\treal:\t%E\tuser:\t%U\tsys:\t%S\n " + # Function printing the usage information for the script usage() { echo "Usage: build.sh [-t build type] [-b build dir] [-c] [-m] [-i] [-p] [-a] [-x] [-N]" @@ -110,7 +112,7 @@ if [ -n "$EXE_CMAKE" ]; then # from scratch in an incremental build. rm -f CMakeCache.txt # Now run the actual CMake configuration: - { time cmake ${BUILDTOOLTYPE} -DCMAKE_BUILD_TYPE:STRING=${BUILDTYPE} \ + { $_time_ cmake ${BUILDTOOLTYPE} -DCMAKE_BUILD_TYPE:STRING=${BUILDTYPE} \ ${EXTRACMAKE} \ -DCTEST_USE_LAUNCHERS:BOOL=TRUE \ ${AthDataQualitySrcDir}; } 2>&1 | tee cmake_config.log @@ -130,17 +132,17 @@ if [ -n "$EXE_MAKE" ]; then # the build_env.sh script. rm -f ${platform}/share/clid.db # Build the project. - { time ${BUILDTOOL}; } 2>&1 | tee cmake_build.log + { $_time_ ${BUILDTOOL}; } 2>&1 | tee cmake_build.log fi # Install the results: if [ -n "$EXE_INSTALL" ]; then - { time DESTDIR=${BUILDDIR}/install/AthDataQuality/${NICOS_PROJECT_VERSION} ${BUILDTOOL} ${INSTALLRULE}; } \ + { $_time_ DESTDIR=${BUILDDIR}/install/AthDataQuality/${NICOS_PROJECT_VERSION} ${BUILDTOOL} ${INSTALLRULE}; } \ 2>&1 | tee cmake_install.log fi # Build an RPM for the release: if [ -n "$EXE_CPACK" ]; then - time cpack 2>&1 | tee cmake_cpack.log + $_time_ cpack 2>&1 | tee cmake_cpack.log cp AthDataQuality*.rpm ${BUILDDIR}/ fi diff --git a/Projects/AthSimulation/build.sh b/Projects/AthSimulation/build.sh index 651433bbb7c..06e572f31d1 100755 --- a/Projects/AthSimulation/build.sh +++ b/Projects/AthSimulation/build.sh @@ -4,6 +4,8 @@ # scripts in this directory. # +_time_="/usr/bin/time -f time::\t%C::\treal:\t%E\tuser:\t%U\tsys:\t%S\n " + # Function printing the usage information for the script usage() { echo "Usage: build.sh [-t build type] [-b build dir] [-c] [-m] [-i] [-p] [-a] [-x] [-N]" @@ -112,7 +114,7 @@ if [ -n "$EXE_CMAKE" ]; then # from scratch in an incremental build. rm -f CMakeCache.txt # Now run the actual CMake configuration: - { time cmake ${BUILDTOOLTYPE} -DCMAKE_BUILD_TYPE:STRING=${BUILDTYPE} \ + { $_time_ cmake ${BUILDTOOLTYPE} -DCMAKE_BUILD_TYPE:STRING=${BUILDTYPE} \ ${EXTRACMAKE} \ -DCTEST_USE_LAUNCHERS:BOOL=TRUE \ ${AthSimulationSrcDir}; } 2>&1 | tee cmake_config.log @@ -132,17 +134,17 @@ if [ -n "$EXE_MAKE" ]; then # the build_env.sh script. rm -f ${platform}/share/clid.db # Build the project. - { time ${BUILDTOOL}; } 2>&1 | tee cmake_build.log + { $_time_ ${BUILDTOOL}; } 2>&1 | tee cmake_build.log fi # Install the results: if [ -n "$EXE_INSTALL" ]; then - { time DESTDIR=${BUILDDIR}/install/AthSimulation/${NICOS_PROJECT_VERSION} ${BUILDTOOL} ${INSTALLRULE}; } \ + { $_time_ DESTDIR=${BUILDDIR}/install/AthSimulation/${NICOS_PROJECT_VERSION} ${BUILDTOOL} ${INSTALLRULE}; } \ 2>&1 | tee cmake_install.log fi # Build an RPM for the release: if [ -n "$EXE_CPACK" ]; then - { time cpack; } 2>&1 | tee cmake_cpack.log + { $_time_ cpack; } 2>&1 | tee cmake_cpack.log cp AthSimulation*.rpm ${BUILDDIR}/ fi diff --git a/Projects/Athena/build.sh b/Projects/Athena/build.sh index 761858914d0..a81d8fab8d5 100755 --- a/Projects/Athena/build.sh +++ b/Projects/Athena/build.sh @@ -4,6 +4,8 @@ # scripts in this directory. # +_time_="/usr/bin/time -f time::\t%C::\treal:\t%E\tuser:\t%U\tsys:\t%S\n " + # Function printing the usage information for the script usage() { echo "Usage: build.sh [-t build type] [-b build dir] [-c] [-m] [-i] [-p] [-a] [-x] [-N]" @@ -127,7 +129,7 @@ if [ -n "$EXE_CMAKE" ]; then # from scratch in an incremental build. rm -f CMakeCache.txt # Now run the actual CMake configuration: - { time cmake ${BUILDTOOLTYPE} -DCMAKE_BUILD_TYPE:STRING=${BUILDTYPE} \ + { ${_time_} cmake ${BUILDTOOLTYPE} -DCMAKE_BUILD_TYPE:STRING=${BUILDTYPE} \ ${EXTRACMAKE} \ -DCTEST_USE_LAUNCHERS:BOOL=TRUE \ ${AthenaSrcDir}; } 2>&1 | tee cmake_config.log @@ -162,7 +164,7 @@ if [ -n "$EXE_MAKE" ]; then # the build_env.sh script. rm -f ${platform}/share/clid.db # Build the project. - { time ${BUILDTOOL}; } 2>&1 | tee cmake_build.log + { ${_time_} ${BUILDTOOL}; } 2>&1 | tee cmake_build.log fi { @@ -175,16 +177,16 @@ fi # Install the results: if [ -n "$EXE_INSTALL" ]; then - { time DESTDIR=${BUILDDIR}/install/Athena/${NICOS_PROJECT_VERSION} ${BUILDTOOL} ${INSTALLRULE}; } \ + { ${_time_} DESTDIR=${BUILDDIR}/install/Athena/${NICOS_PROJECT_VERSION} ${BUILDTOOL} ${INSTALLRULE}; } \ 2>&1 | tee cmake_install.log fi #^^^ do we need to analyze local install logs? # Build an RPM for the release: if [ -n "$EXE_CPACK" ]; then - { time cpack; } 2>&1 | tee cmake_cpack.log + { ${_time_} cpack; } 2>&1 | tee cmake_cpack.log if [ "$BUILDTYPE" = "RelWithDebInfo" ]; then - { time cpack --config CPackDbgRPMConfig.cmake; } 2>&1 | tee -a cmake_cpack.log + { ${_time_} cpack --config CPackDbgRPMConfig.cmake; } 2>&1 | tee -a cmake_cpack.log fi cp Athena*.rpm ${BUILDDIR}/ fi -- GitLab