]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add targets to do nightly automated builds.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Sun, 13 Mar 2005 03:37:24 +0000 (03:37 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Sun, 13 Mar 2005 03:37:24 +0000 (03:37 +0000)
git-svn-id: https://svn.dealii.org/trunk@10116 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/Makefile

index dc839158dee6585788f5c0b58c3b667223ee4001..c1e60289b863e0bdd8c390e640d03ca0ce42da1c 100644 (file)
@@ -2,8 +2,14 @@
 #
 # Makefile for the whole library
 
-# include global options and pathes
-include common/Make.global_options
+# include global options and pathes. there's one exception where we don't want
+# that, namely for build tests: in that case, the makefile is called before we
+# have even run ./configure, so we can't include this file, but the target
+# then called doesn't need the variables defined in there doesn't need them
+# anyway and calls ./configure first
+ifneq ($(BUILDTEST),yes)
+  include common/Make.global_options
+endif
 
 
 help:
@@ -177,9 +183,95 @@ distclean: clean \
        cd lib && $(MAKE) distclean
        -cd tests && $(MAKE) distclean
 
+
+
+# #############################################################################
+# targets for build tests. these targets are supposed to be called for regular
+# build tests that send their results back home to our build test server. note
+# that this target is supposed to be called right after checking out a version
+# from our CVS server, so at this time, common/Make.global_options doesn't
+# exist yet (and isn't included at the top of this file, due to a
+# conditional), and we first have to set up all this stuff.
+#
+# the way this target works is that it first generates a bunch of lines for
+# the output file that will ultimately be sent home. it then calls ./configure
+# and stashes away both the output and the return value. if ./configure
+# succeeds, we extract a little more information concluding the
+# header. irrespective of this, we then append the output of ./configure to
+# the log file. if the call to ./configure failed, we send the result back
+# home and exit.
+#
+# if ./configure succeeded, we then go on to the build-test-do target, which
+# actually compiles something, and when we come back from there we send the
+# whole thing over to the server
+build-test:
+       echo AUTOMATED DEAL.II BUILD TEST          | tee    build-test-log
+       echo BEGIN HEADER `date -u '+%Y-%m-%d %T'`                | tee -a build-test-log
+       echo DEAL_II_VERSION=`cat Version`         | tee -a build-test-log
+       echo USER=$(USER)                          | tee -a build-test-log
+       echo SYSTEM=`contrib/config/config.guess`  | tee -a build-test-log
+       echo HOST=`hostname`.`dnsdomainname`       | tee -a build-test-log
+       echo BUILDTESTFLAGS=$(BUILDTESTFLAGS)      | tee -a build-test-log
+       echo BUILDTESTNOTE=$(BUILDTESTNOTE)        | tee -a build-test-log
+       (./configure $(BUILDTESTFLAGS) 2>&1) > build-test-config
+       if test -f common/Make.global_options ; then \
+          grep GXX-VERSION common/Make.global_options ; \
+          grep CC-VERSION common/Make.global_options ; \
+          grep F77-VERSION common/Make.global_options ; \
+          grep enable-multithreading common/Make.global_options ; \
+          grep with-multithreading common/Make.global_options ; \
+          grep USE_CONTRIB_PETSC common/Make.global_options ; \
+          grep USE_CONTRIB_METIS common/Make.global_options ; \
+          grep USE_CONTRIB_HSL common/Make.global_options ; \
+          grep USE_CONTRIB_UMFPACK common/Make.global_options ; \
+        fi    | tee -a build-test-log
+       echo END HEADER `date -u '+%Y-%m-%d %T'`             | tee -a build-test-log
+       echo                                  | tee -a build-test-log
+       echo BEGIN CONFIGURE OUTPUT `date -u '+%Y-%m-%d %T'` | tee -a build-test-log
+       cat build-test-config                 | tee -a build-test-log
+       echo END CONFIGURE OUTPUT `date -u '+%Y-%m-%d %T'`   | tee -a build-test-log
+       echo                                  | tee -a build-test-log
+       if ! test -f common/Make.global_options ; then \
+         mail build-failure@dealii.org < build-test-log 2>&1 ; \
+         exit ; \
+        fi
+       if (($(MAKE) BUILDTEST= build-test-do 2>&1) | tee -a build-test-log) ; then \
+          mail build-success@dealii.org < build-test-log 2>&1 ; \
+         else \
+          mail build-failure@dealii.org < build-test-log 2>&1 ; \
+        fi
+
+
+# target to do the actual compilation tests for an automated build test. build
+# the library, the example programs, and the doxygen example programs. if the
+# testsuite has been checked out, run that, too, and send the results to the
+# testsuite server
+build-test-do:
+       echo BEGIN MAKE LIB OUTPUT `date -u '+%Y-%m-%d %T'`
+       $(MAKE) all
+       echo END MAKE LIB OUTPUT `date -u '+%Y-%m-%d %T'`
+       echo 
+       echo BEGIN MAKE EXAMPLES OUTPUT `date -u '+%Y-%m-%d %T'`
+       cd examples ; $(MAKE)
+       echo END MAKE EXAMPLES OUTPUT `date -u '+%Y-%m-%d %T'`
+       echo 
+       echo BEGIN MAKE DOXYGENTUTORIALS OUTPUT `date -u '+%Y-%m-%d %T'`
+       cd doc/doxygen ; $(MAKE)
+       echo END MAKE DOXYGENTUTORIALS OUTPUT `date -u '+%Y-%m-%d %T'`
+       echo 
+       if test -d tests ; then \
+          echo BEGIN MAKE DOXYGENTUTORIALS OUTPUT `date -u '+%Y-%m-%d %T'` ; \
+          cd tests ; $(MAKE) report+mail ; \
+          echo END MAKE DOXYGENTUTORIALS OUTPUT `date -u '+%Y-%m-%d %T'` ; \
+          echo ; \
+        fi
+
+
+
 .PHONY: base baseg lac lacg 1d 2d 3d 1dg 2dg 3dg all \
         online-doc printable-doc tex-doc contrib \
         clean clean-contrib clean-base clean-lac clean-dealII \
        clean-doc clean-examples clean-lib clean-tests clean-common-scripts \
        distclean \
+       build-test build-test-do \
        TAGS TODO

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.