From d82302075e02eb64a5a6e0f9856daaf0bbc4ee94 Mon Sep 17 00:00:00 2001 From: maier Date: Wed, 27 Mar 2013 10:23:05 +0000 Subject: [PATCH] Improve build_test: - Remove obsolete lines from build_test - add a bunch of tests to run and a toggle RUN_TESTS to skip this step - run examples in debug and build configuration git-svn-id: https://svn.dealii.org/trunk@29056 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/contrib/utilities/build_test | 46 ++++++++++++++++++---------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/deal.II/contrib/utilities/build_test b/deal.II/contrib/utilities/build_test index 10f31c5bb4..6f3ed9c446 100755 --- a/deal.II/contrib/utilities/build_test +++ b/deal.II/contrib/utilities/build_test @@ -8,17 +8,18 @@ # # The following environment variables may be set: # -# SOURCEDIR - the source directory to use (if not invoked in a source -# directory) -# CONFIGFILE - A cmake configuration file for the build test -# LOGDIR - directory for the log file -# LOGFILE - the logfile to use, defaults to -# $LOGDIR/$CONFIGFILE..log +# SOURCEDIR - the source directory to use (if not invoked in a source +# directory) +# CONFIGFILE - A cmake configuration file for the build test +# LOGDIR - directory for the log file +# LOGFILE - the logfile to use, defaults to +# $LOGDIR/$CONFIGFILE..log # -# CMAKE - the cmake executable to use -# SVN - svn info command to use -# TMPDIR - defaults to "/tmp" -# CLEAN_TMPDIR - defaults to "true" +# CMAKE - the cmake executable to use +# SVN - svn info command to use +# TMPDIR - defaults to "/tmp" +# CLEAN_TMPDIR - defaults to "true" +# RUN_EXAMPLES - defaults to "true" # # @@ -40,6 +41,7 @@ builddir:= $(testdir)/build installdir:= $(testdir)/install LOGFILE=$(LOGDIR)/$(firstword $(branch) unknown_branch).$(firstword $(notdir $(CONFIGFILE)) no_configuration).$(date).log CLEAN_TMPDIR=true +RUN_EXAMPLES=false PIPEnTRAP:= >>$(LOGFILE) 2>&1 || (if ${CLEAN_TMPDIR}; then rm -rf $(testdir); fi; false) @@ -60,9 +62,6 @@ main: @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) - #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) cd $(builddir) && make $(MAKEOPTS) run_report_features $(PIPEnTRAP) @echo "END REPORT FEATURES `date -u '+%Y-%m-%d %T'`" | tee -a $(LOGFILE) @@ -85,19 +84,32 @@ main: steps:= $(wildcard step-*) -runsteps:= step-1 step-2 step-3 +# +# Run all configuration independent steps: +# +runsteps:= step-1 step-2 step-3 step-4 step-5 step-6 step-7 step-8 step-9 step-10 step-11 step-12 step-13 step-14 step-15 step-16 step-19 step-20 step-21 step-23 step-24 step-25 step-26 step-27 step-28 step-30 step-38 step-39 step-44 step-45 step-47 step-48 step-49 %/%: -cd $(@D) && cmake . >/dev/null 2>&1 cd $(@D) && if [ -f Makefile ]; then make; fi -%/OK: %/% - cd $(@D) && make run && touch OK - .PHONY: build_examples build_examples: $(steps:%=%/%) + +%/OK-Debug: + cd $(@D) && cmake -DCMAKE_BUILD_TYPE=Debug . >/dev/null 2>&1 + cd $(@D) && if $(RUN_EXAMPLES); then make run; fi && touch OK-Debug + +%/OK-Release: + cd $(@D) && cmake -DCMAKE_BUILD_TYPE=Release . >/dev/null 2>&1 + cd $(@D) && if $(RUN_EXAMPLES); then make run; fi && touch OK-Release + +%/OK: %/OK-Debug %/OK-Release + cd $(@D) && touch OK + + .PHONY: run_examples run_examples: $(runsteps:%=%/OK) -- 2.39.5