Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mars_test to ctest #30

Merged
merged 3 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/olivine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
- name: CTEST
if: steps.check.outputs.triggered == 'true'
run: |
cd ./build && ctest
cd ./build && ctest --output-on-failure

- name: Report PR status
if: always() && steps.check.outputs.triggered == 'true'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/spack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ jobs:

cd ./KORC
./build.sh
cd ./build && ctest --output-on-failure

- name: Show Cache
if: failure()
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
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ rm -rf ./build && mkdir $_
cd build

cmake -DCMAKE_BUILD_TYPE:String=$BUILD_TYPE \
-DUSE_PSPLINE=OFF \
-DUSE_PSPLINE=ON \
-DUSE_FIO=OFF \
-DKORC_TEST=OFF \
-DCMAKE_Fortran_FLAGS="-DHDF5_DOUBLE_PRESICION -malign-double -fconvert='big-endian'" \
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

Loading