Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
added automatic test that runs the Basic_Simulation example and gener…
Browse files Browse the repository at this point in the history
…ates output
  • Loading branch information
carlislewishard authored and GitHub committed Jun 27, 2023
1 parent e5181a6 commit 1551a51
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,17 @@ ADD_SUBDIRECTORY(${SRC} ${BIN})
ADD_CUSTOM_TARGET(distclean
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_SOURCE_DIR}/distclean.cmake
)

# Add an automatic test
ADD_CUSTOM_TARGET(Run_Test ALL
COMMAND echo "***Running Python script examples/Basic_Simulation/initial_conditions.py***"
COMMAND python ${CMAKE_SOURCE_DIR}/examples/Basic_Simulation/initial_conditions.py
COMMAND echo "***Saving data to directory examples/Basic_Simulation/simdata***"
COMMAND echo "***Running Python script examples/Basic_Simulation/output_reader.py***"
COMMAND python ${CMAKE_SOURCE_DIR}/examples/Basic_Simulation/output_reader.py
COMMAND echo "***Plotting results as examples/Basic_Simulation/output.eps***"
COMMAND echo "***Calculating errors with Python script examples/Basic_Simulation/errors.py***"
COMMAND python ${CMAKE_SOURCE_DIR}/examples/Basic_Simulation/errors.py
COMMAND echo "***Test Complete***"
)

0 comments on commit 1551a51

Please sign in to comment.