From: maier Date: Fri, 8 Mar 2013 09:30:27 +0000 (+0000) Subject: Small improvement on build_test X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a1f2c9d20d5e3b4da504dc06242464fbd80fca49;p=dealii-svn.git Small improvement on build_test - It is now possible to set a LOGFILE directly - new default naming scheme git-svn-id: https://svn.dealii.org/trunk@28809 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/contrib/utilities/build_test b/deal.II/contrib/utilities/build_test index 9b487dab36..e8f89310be 100755 --- a/deal.II/contrib/utilities/build_test +++ b/deal.II/contrib/utilities/build_test @@ -10,8 +10,9 @@ # # SOURCEDIR - the source directory to use (if not invoked in a source # directory) -# LOGDIR - directory for the log file # CONFIGFILE - A cmake configuration file for the build test +# LOGDIR - directory for the log file +# LOGFILE - the logfile to use, default to $LOGDIR/$CONFIGFILE..log # # CMAKE - the cmake executable to use # SVN - svn info command to use @@ -29,10 +30,10 @@ testdir:= "$(TMPDIR)"/deal-build-test.$(date)-$(random) builddir:= $(testdir)/build installdir:= $(testdir)/install LOGDIR=$(PWD) -logfile:=$(LOGDIR)/$(date).$(firstword $(notdir $(CONFIGFILE)) automatic).log +LOGFILE=$(LOGDIR)/$(firstword $(notdir $(CONFIGFILE)) automatic).$(date).log CLEAN_TMPDIR=true -PIPEnTRAP:= >>$(logfile) 2>&1 || (if ${CLEAN_TMPDIR}; then rm -rf $(testdir); fi; false) +PIPEnTRAP:= >>$(LOGFILE) 2>&1 || (if ${CLEAN_TMPDIR}; then rm -rf $(testdir); fi; false) .PHONY: main main: @@ -40,32 +41,32 @@ main: mkdir -p $(LOGDIR) mkdir -p $(builddir) mkdir -p $(installdir) - @echo "AUTOMATED DEAL.II BUILD TEST" | tee $(logfile) - @echo "BEGIN HEADER `date -u '+%Y-%m-%d %T'`" | tee -a $(logfile) - @$(SVN) $(SOURCEDIR) | perl -ne 'print "dealii-feature: revision=$$_" if s/Last Changed Rev: //; print "dealii-feature: branch=$$1\n" if m/svn\.dealii\.org\/(.+)\/deal.II/;' | tee -a $(logfile) - @echo "dealii-feature: user=$(USER)" | tee -a $(logfile) - @echo "dealii-feature: host=`hostname`" | tee -a $(logfile) - @echo "dealii-feature: configuration=`basename \"$(CONFIGFILE)\"`" | tee -a $(logfile) - @echo END HEADER `date -u '+%Y-%m-%d %T'`\n | tee -a $(logfile) - @echo "BEGIN CONFIGURE OUTPUT `date -u '+%Y-%m-%d %T'`" | tee -a $(logfile) + @echo "AUTOMATED DEAL.II BUILD TEST" | tee $(LOGFILE) + @echo "BEGIN HEADER `date -u '+%Y-%m-%d %T'`" | tee -a $(LOGFILE) + @$(SVN) $(SOURCEDIR) | perl -ne 'print "dealii-feature: revision=$$_" if s/Last Changed Rev: //; print "dealii-feature: branch=$$1\n" if m/svn\.dealii\.org\/(.+)\/deal.II/;' | tee -a $(LOGFILE) + @echo "dealii-feature: user=$(USER)" | tee -a $(LOGFILE) + @echo "dealii-feature: host=`hostname`" | tee -a $(LOGFILE) + @echo "dealii-feature: configuration=`basename \"$(CONFIGFILE)\"`" | tee -a $(LOGFILE) + @echo END HEADER `date -u '+%Y-%m-%d %T'`\n | tee -a $(LOGFILE) + @echo "BEGIN CONFIGURE OUTPUT `date -u '+%Y-%m-%d %T'`" | tee -a $(LOGFILE) cd $(builddir) && "$(CMAKE)" -C "$(CONFIGFILE)" -DCMAKE_INSTALL_PREFIX=$(installdir) $(SOURCEDIR) $(PIPEnTRAP) - @echo "END CONFIGURE OUTPUT `date -u '+%Y-%m-%d %T'`" | tee -a $(logfile) - @echo "BEGIN CMAKE SYSTEM INFORMATION `date -u '+%Y-%m-%d %T'`" | tee -a $(logfile) + @echo "END CONFIGURE OUTPUT `date -u '+%Y-%m-%d %T'`" | tee -a $(LOGFILE) + @echo "BEGIN CMAKE SYSTEM INFORMATION `date -u '+%Y-%m-%d %T'`" | tee -a $(LOGFILE) cd $(builddir) && "$(CMAKE)" --system-information $(PIPEnTRAP) - @echo "END CMAKE SYSTEM INFORMATION `date -u '+%Y-%m-%d %T'`" | tee -a $(logfile) - @echo "BEGIN REPORT FEATURES `date -u '+%Y-%m-%d %T'`" | tee -a $(logfile) + @echo "END CMAKE SYSTEM INFORMATION `date -u '+%Y-%m-%d %T'`" | tee -a $(LOGFILE) + @echo "BEGIN REPORT FEATURES `date -u '+%Y-%m-%d %T'`" | tee -a $(LOGFILE) cd $(builddir) && make $(MAKEOPTS) run_report_features $(PIPEnTRAP) - @echo "END REPORT FEATURES `date -u '+%Y-%m-%d %T'`" | tee -a $(logfile) - @echo "BEGIN BUILD INSTALL OUTPUT `date -u '+%Y-%m-%d %T'`" | tee -a $(logfile) + @echo "END REPORT FEATURES `date -u '+%Y-%m-%d %T'`" | tee -a $(LOGFILE) + @echo "BEGIN BUILD INSTALL OUTPUT `date -u '+%Y-%m-%d %T'`" | tee -a $(LOGFILE) cd $(builddir) && make $(MAKEOPTS) install $(PIPEnTRAP) - @echo "END BUILD INSTALL OUTPUT `date -u '+%Y-%m-%d %T'`" | tee -a $(logfile) - @echo "BEGIN BUILD EXAMPLES OUTPUT `date -u '+%Y-%m-%d %T'`" | tee -a $(logfile) + @echo "END BUILD INSTALL OUTPUT `date -u '+%Y-%m-%d %T'`" | tee -a $(LOGFILE) + @echo "BEGIN BUILD EXAMPLES OUTPUT `date -u '+%Y-%m-%d %T'`" | tee -a $(LOGFILE) cd $(installdir)/examples && make -f $(SOURCEDIR)/contrib/utilities/build_test DEAL_II_DIR=$(installdir) build_examples $(PIPEnTRAP) - @echo "END BUILD EXAMPLES OUTPUT `date -u '+%Y-%m-%d %T'`" | tee -a $(logfile) - #@echo "BEGIN RUN EXAMPLES OUTPUT `date -u '+%Y-%m-%d %T'`" | tee -a $(logfile) + @echo "END BUILD EXAMPLES OUTPUT `date -u '+%Y-%m-%d %T'`" | tee -a $(LOGFILE) + #@echo "BEGIN RUN EXAMPLES OUTPUT `date -u '+%Y-%m-%d %T'`" | tee -a $(LOGFILE) #cd $(installdir)/examples && make -f $(SOURCEDIR)/contrib/utilities/build_test run_examples $(PIPEnTRAP) - #@echo "END RUN EXAMPLES OUTPUT `date -u '+%Y-%m-%d %T'`" | tee -a $(logfile) - @echo "BUILD TEST SUCCESSFUL `date -u '+%Y-%m-%d %T'`" | tee -a $(logfile) + #@echo "END RUN EXAMPLES OUTPUT `date -u '+%Y-%m-%d %T'`" | tee -a $(LOGFILE) + @echo "BUILD TEST SUCCESSFUL `date -u '+%Y-%m-%d %T'`" | tee -a $(LOGFILE) if ${CLEAN_TMPDIR}; then rm -rf $(testdir); fi