Skip to content

Commit

Permalink
Add mars_test to ctest
Browse files Browse the repository at this point in the history
Signed-off-by: Steven Hahn <hahnse@ornl.gov>
  • Loading branch information
quantumsteve committed Apr 18, 2024
1 parent 0c66124 commit 51a694d
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/olivine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,5 @@ jobs:
- name: CTEST
if: steps.check.outputs.triggered == 'true'
run: |
cd ./build && ctest
cd ./build && ctest --output-on-failure
5 changes: 5 additions & 0 deletions .github/workflows/spack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ jobs:
cd ./KORC
./build.sh
- name: test korc
run: |
cd ./build && ctest --output-on-failure

- name: Show Cache
if: failure()
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ endif ()
# Build Options
#-------------------------------------------------------------------------------
option (USE_ACC "Use OpenACC" OFF)
option (USE_PSPLINE "Use PSPLINE interpolation" OFF)
option (USE_PSPLINE "Use PSPLINE interpolation" ON)
option (USE_FIO "Use FIO interpolation support" OFF)

#-------------------------------------------------------------------------------
Expand Down
6 changes: 6 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ add_test (NAME egyro_test
COMMAND ${CMAKE_SOURCE_DIR}/test/egyro/korc_egyro.sh ${CMAKE_SOURCE_DIR}/test/egyro
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

if(USE_PSPLINE)
add_test (NAME mars_test
COMMAND ${CMAKE_SOURCE_DIR}/test/mars/korc_mars.sh ${CMAKE_SOURCE_DIR}/test/mars
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
endif()

add_test (NAME unit_testing
COMMAND xtest TEST_OUT
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
21 changes: 21 additions & 0 deletions test/mars/korc_mars.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

set -ex

#define input file
INPUT_FILE=$1/"input_file_D3D_191366_1762ms_MARS.korc"
#define output directory
OUT_DIR="mars_test"

#check that output directory doesn't exist so bash doesn't complain
if [ ! -d $OUT_DIR ]; then
mkdir -p $OUT_DIR
fi
if [ ! -f D3D_191366_1762ms_MARS.h5 ]; then
ln -s $1/D3D_191366_1762ms_MARS.h5 D3D_191366_1762ms_MARS.h5
fi

./xkorc $INPUT_FILE $OUT_DIR/

h5diff -r -d 0.007 $OUT_DIR/file_0.h5 $1/file_0.h5

0 comments on commit 51a694d

Please sign in to comment.