From 97fe21c92c494787cc06ca4f180a01d108b7a94b Mon Sep 17 00:00:00 2001
From: Timo Koch <timo.koch@iws.uni-stuttgart.de>
Date: Wed, 6 Sep 2017 10:27:47 +0200
Subject: [PATCH] [docker][util] build tests by default

---
 bin/moduleutil/createdockerimage.sh | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/bin/moduleutil/createdockerimage.sh b/bin/moduleutil/createdockerimage.sh
index c464685b8e..502b6bf466 100755
--- a/bin/moduleutil/createdockerimage.sh
+++ b/bin/moduleutil/createdockerimage.sh
@@ -41,7 +41,7 @@ chmod +x $INSTALL_DEP_SCRIPT
 # make a docker folder
 if [ -d docker ]; then
     echo ""
-    read -p "   A docker folder already exists. Continue anyway? (Will be overwritten) [y/N] " DELETE
+    read -p "   A docker folder already exists. Continue anyway? - will be overwritten - [y/N] " DELETE
     echo ""
     if test x$DELETE = xy -o x$DELETE = xY; then
         rm -r docker
@@ -282,8 +282,9 @@ RUN ./$INSTALL_DEP_SCRIPT && rm -f /dumux/$INSTALL_DEP_SCRIPT
 # configure module
 RUN /dumux/dune-common/bin/dunecontrol --opts=/dumux/dumux/optim.opts all
 
-# build doxygen documentation
-RUN cd $MODULE_NAME/build-cmake && make doc
+# build doxygen documentation and tests
+# all applications that use dune_add_test will be built like this
+RUN cd $MODULE_NAME/build-cmake && make doc && make -j4 build_tests
 
 # switch back to root
 USER root
@@ -310,9 +311,9 @@ if test x$BUILD = xy -o x$BUILD = xY; then
     echo "Successfully built docker image: $DOCKER_TAG. Have a look at docker/README.md."
     echo "Check the container running docker run -it $DOCKER_TAG /bin/bash "
     echo "in the same directory as the Dockerfile."
-    echo "And try using the convenience script pubtable_$DOCKER_TAG (see docker/README.md)."
+    echo "And try using the convenience script pubtable_$DOCKER_TAG, see docker/README.md."
 else
     cd ..
     echo "You can build your Docker image later by running docker build -f docker/Dockerfile -t $DOCKER_TAG ."
-    echo "in your module directory (i.e. above the docker folder containing Dockerfile)."
+    echo "in your module directory, i.e. above the docker folder containing Dockerfile."
 fi
-- 
GitLab