From 8f12730a47992c4542ac266fd0b03a5fc91e4b46 Mon Sep 17 00:00:00 2001 From: Thomas Fetzer <thomas.fetzer@iws.uni-stuttgart.de> Date: Thu, 2 Nov 2017 13:56:45 +0100 Subject: [PATCH] [tutorial] Replace dune_add_test by add_dumux_test --- tutorial/ex1/CMakeLists.txt | 8 ++------ tutorial/ex1/README.md | 3 +-- tutorial/ex2/CMakeLists.txt | 3 +-- tutorial/ex3/CMakeLists.txt | 4 ++-- tutorial/ex3/README.md | 4 ++-- tutorial/ex4/README.md | 4 +--- 6 files changed, 9 insertions(+), 17 deletions(-) diff --git a/tutorial/ex1/CMakeLists.txt b/tutorial/ex1/CMakeLists.txt index 9de06a78cb..70c90d7d1f 100644 --- a/tutorial/ex1/CMakeLists.txt +++ b/tutorial/ex1/CMakeLists.txt @@ -1,12 +1,8 @@ # the immiscible two-phase simulation program -dune_add_test(NAME exercise1_2p - SOURCES exercise1_2p.cc - COMMAND exercise1_2p exercise1.input) +add_dumux_test(exercise1_2p exercise1_2p exercise1_2p.cc ./exercise1_2p exercise1.input) # the compositional two-phase simulation program -dune_add_test(NAME exercise1_2p2c - SOURCES exercise1_2p2c.cc - COMMAND exercise1_2p2c exercise1.input) +add_dumux_test(exercise1_2p2c exercise1_2p2c exercise1_2p2c.cc ./exercise1_2p2c exercise1.input) # add tutorial to the common target add_dependencies(build_tutorials exercise1_2p exercise1_2p2c) diff --git a/tutorial/ex1/README.md b/tutorial/ex1/README.md index f305a818ae..6ab8eb0cb9 100644 --- a/tutorial/ex1/README.md +++ b/tutorial/ex1/README.md @@ -121,8 +121,7 @@ cp exercise1_2p.cc exercise1_2pni.cc * Add a new executable in `CMakeLists.txt` by adding the lines ```cmake -dune_add_test(NAME exercise1_2pni - SOURCES exercise1_2pni.cc) +add_dumux_test(exercise1_2pni exercise1_2pni exercise1_2pni.cc ./exercise1_2pni exercise1.input) ``` * Test that everything compiles without error diff --git a/tutorial/ex2/CMakeLists.txt b/tutorial/ex2/CMakeLists.txt index d2acc717c0..03c83b5dfa 100644 --- a/tutorial/ex2/CMakeLists.txt +++ b/tutorial/ex2/CMakeLists.txt @@ -1,6 +1,5 @@ # a compositional two-phase simulation program -dune_add_test(NAME exercise2 - SOURCES exercise2.cc) +add_dumux_test(exercise2 exercise2 exercise2.cc exercise2) # add tutorial to the common target add_dependencies(build_tutorials exercise2) diff --git a/tutorial/ex3/CMakeLists.txt b/tutorial/ex3/CMakeLists.txt index 84908c7b4f..676d6e1595 100644 --- a/tutorial/ex3/CMakeLists.txt +++ b/tutorial/ex3/CMakeLists.txt @@ -1,6 +1,6 @@ # executables for exercise part a & b -# dune_add_test(NAME ex3_a SOURCES ex3_a.cc) -# dune_add_test(NAME ex3_b SOURCES ex3_b.cc) +# add_dumux_test(ex3_a ex3_a ex3_a.cc ex3_a) +# add_dumux_test(ex3_b ex3_b ex3_b.cc ex3_b) # add a symlink for the input file dune_symlink_to_source_files(FILES "ex3_a.input" "ex3_b.input") diff --git a/tutorial/ex3/README.md b/tutorial/ex3/README.md index bfe6fea1ed..92e7658581 100644 --- a/tutorial/ex3/README.md +++ b/tutorial/ex3/README.md @@ -135,7 +135,7 @@ cd build-cmake/tutorial/ex3 Uncomment the line for the corresponding executable in the `CMakeLists.txt` file: ```cmake -dune_add_test(NAME ex3_a SOURCES ex3_a.cc) +add_dumux_test(ex3_a ex3_a ex3_a.cc ex3_a) ``` Now you can compile and execute the program by typing @@ -211,7 +211,7 @@ $` \rho_{w} = \frac{ \rho_{w, pure} }{ M_{H_2O} }*(M_{H_2O}*x_{H_2O} + M_{MyComp Implement this dependency in the _density()_ method in the fluid system. In order to compile and execute the program, uncomment the line for the corresponding executable in the `CMakeLists.txt` file ```cmake -dune_add_test(NAME ex3_b SOURCES ex3_b.cc) +add_dumux_test(ex3_b ex3_b ex3_b.cc ex3_b) ``` Then, change to the build-directory diff --git a/tutorial/ex4/README.md b/tutorial/ex4/README.md index df6dd6df76..743a216e93 100644 --- a/tutorial/ex4/README.md +++ b/tutorial/ex4/README.md @@ -50,12 +50,10 @@ mkdir appl ```cmake # add a new box 1p test -dune_add_test(NAME test_box1p - SOURCES test_box1p.cc) +add_dumux_test(test_box1p test_box1p test_box1p.cc test_box1p) # link the input file to the build folder dune_symlink_to_source_files(FILES test_box1p.input) - ``` * Reconfigure your module by running in the topmost directory of your new module -- GitLab