File tree 6 files changed +26
-2
lines changed
6 files changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ endif()
18
18
19
19
# Directory variables
20
20
file (GLOB SRC_FILES ${PROJECT_SOURCE_DIR} /src/*.cpp)
21
+ file (GLOB TEST_FILES ${PROJECT_SOURCE_DIR} /srcTest/*.cpp)
21
22
set (MAIN_DIR ${PROJECT_SOURCE_DIR} /src/main)
22
23
set (TESTS_DIR ${PROJECT_SOURCE_DIR} /tests)
23
24
set (OUT_DIR ${PROJECT_SOURCE_DIR} /src/output )
@@ -34,7 +35,7 @@ elseif(TEST_EXCHANGE)
34
35
elseif (TEST_GRADIENT)
35
36
add_executable (aether ${SRC_FILES} ${MSIS_FILES} ${MAIN_DIR} /main_test_gradient.cpp)
36
37
else ()
37
- add_executable (aether ${SRC_FILES} ${MSIS_FILES} ${IE_FILES} ${MAIN_DIR} /main.cpp)
38
+ add_executable (aether ${SRC_FILES} ${TEST_FILES} ${ MSIS_FILES} ${IE_FILES} ${MAIN_DIR} /main.cpp)
38
39
endif ()
39
40
40
41
if (USE_DOUBLE_PRECISION)
Original file line number Diff line number Diff line change @@ -143,4 +143,7 @@ using json = nlohmann::json;
143
143
// not commented
144
144
#include " external_msis.h"
145
145
146
+ // To hold all the test functions
147
+ #include " test.h"
148
+
146
149
#endif // INCLUDE_AETHER_H_
Original file line number Diff line number Diff line change @@ -562,6 +562,12 @@ class Inputs {
562
562
\param
563
563
**/
564
564
std::vector<precision_t > get_satellite_dts ();
565
+
566
+ /* *********************************************************************
567
+ \brief returns settings["
568
+ \param
569
+ **/
570
+ json get_tests ();
565
571
566
572
// General get_setting functions with error checks:
567
573
Original file line number Diff line number Diff line change 130
130
"do" : false ,
131
131
"OutDir" : " UA/restartOut" ,
132
132
"InDir" : " UA/restartIn" ,
133
- "dt" : 3600.0 }
133
+ "dt" : 3600.0 },
134
+
135
+ "DoTests" : {
136
+ "exit_on_fail" : true }
134
137
}
Original file line number Diff line number Diff line change @@ -1163,6 +1163,14 @@ bool Inputs::get_advection_neutrals_implicitfriction() {
1163
1163
return get_setting_bool (" Advection" , " Neutrals" , " useImplicitFriction" );
1164
1164
}
1165
1165
1166
+ // -----------------------------------------------------------------------
1167
+ // See what tests are requested
1168
+ // -----------------------------------------------------------------------
1169
+
1170
+ json Inputs::get_tests () {
1171
+ return get_setting_json (" DoTests" );
1172
+ }
1173
+
1166
1174
// --------------------------------------------------------------------------
1167
1175
// check to see if class is ok
1168
1176
// --------------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -31,6 +31,9 @@ int main() {
31
31
report.print (-1 , " Hello " +
32
32
input.get_student_name () + " - welcome to Aether!" );
33
33
34
+ // Find out what tests we are running:
35
+ json tests = input.get_tests ();
36
+
34
37
// For now, the number of processors and blocks are set by the
35
38
// neutral grid shape, since this could be sphere (1 root) or
36
39
// cubesphere (6 root)
You can’t perform that action at this time.
0 commit comments