Skip to content

Commit

Permalink
Add regression tests for TokaMaker
Browse files Browse the repository at this point in the history
 - Update CMAKE build to make python interfaces usable in build directory (pre-install)
  • Loading branch information
hansec committed Nov 21, 2023
1 parent d7cc927 commit 09cd54b
Show file tree
Hide file tree
Showing 7 changed files with 2,355 additions and 138 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- uses: actions/checkout@v3

- name: Install prerequisites
run: ${{ matrix.config.pip }} install pytest numpy
run: ${{ matrix.config.pip }} install pytest numpy scipy h5py

- name: Cache external libraries
id: cache-ext-libs
Expand Down
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ if(OFT_PACKAGE_BUILD)
else()
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
endif()
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)

########################
# Required library detection and setup
Expand Down
6 changes: 5 additions & 1 deletion src/python/OpenFUSIONToolkit/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
install(PROGRAMS util.py DESTINATION python/OpenFUSIONToolkit COMPONENT app)
install(PROGRAMS TokaMaker.py DESTINATION python/OpenFUSIONToolkit COMPONENT app)
install(PROGRAMS Marklin.py DESTINATION python/OpenFUSIONToolkit COMPONENT app)
install(PROGRAMS Marklin.py DESTINATION python/OpenFUSIONToolkit COMPONENT app)

configure_file( util.py ${CMAKE_CURRENT_BINARY_DIR}/util.py COPYONLY)
configure_file( TokaMaker.py ${CMAKE_CURRENT_BINARY_DIR}/TokaMaker.py COPYONLY)
configure_file( Marklin.py ${CMAKE_CURRENT_BINARY_DIR}/Marklin.py COPYONLY)
8 changes: 6 additions & 2 deletions src/tests/physics/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ if( OFT_BUILD_TESTS )
# Common
file( COPY conftest.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )

# Taylor tests
# Marklin tests
oft_add_test( test_taylor.F90 )
file( COPY test_taylor.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
oft_add_test( test_taylor_inj.F90 )
Expand All @@ -11,7 +11,7 @@ if( OFT_BUILD_TESTS )
#file( COPY torus_test.in.e DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
file( COPY torus_test.g DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )

# MHD tests
# MUG tests
add_library( test_phys_helpers test_phys_helpers.F90 )
add_dependencies( test_phys_helpers oftphysics )
oft_add_test( test_sound.F90 test_phys_helpers )
Expand All @@ -31,4 +31,8 @@ if( OFT_BUILD_TESTS )
file( COPY tw_test-passive.h5 DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
file( COPY tw_test-plate.h5 DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
file( COPY tw_test-torus.h5 DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )

# TokaMaker tests
file( COPY test_TokaMaker.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
file( COPY ITER_geom.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
endif()
Loading

0 comments on commit 09cd54b

Please sign in to comment.