Skip to content

Commit

Permalink
updates test script
Browse files Browse the repository at this point in the history
  • Loading branch information
danielpeter committed Nov 14, 2024
1 parent 6810f5f commit 09b3d43
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .github/scripts/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ echo

# bash function for checking seismogram output with reference solutions
my_test(){
echo "**********************************************************";echo "**********************************************************"
echo "######################################################################################################################"
echo "testing seismograms"
ln -s $WORKDIR/utils/scripts/compare_seismogram_correlations.py
./compare_seismogram_correlations.py REF_SEIS/ OUTPUT_FILES/
if [[ $? -ne 0 ]]; then exit 1; fi
./compare_seismogram_correlations.py REF_SEIS/ OUTPUT_FILES/ | grep min/max | cut -d \| -f 3 | awk '{print "correlation:",$1; if ($1 < 0.999 ){print $1,"failed"; exit 1;}else{ print $1,"good"; exit 0;}}'
if [[ $? -ne 0 ]]; then exit 1; fi
echo "**********************************************************";echo "**********************************************************"
echo "######################################################################################################################"
}

my_kernel_test(){
# kernel value test - checks rho/kappa/mu kernel value outputs
echo "**********************************************************";echo "**********************************************************"
echo "######################################################################################################################"
echo "testing kernel values"
file_ref=REF_KERNEL/output_solver.txt
file_out=output.log # captures the OUTPUT_FILES/output_solver.txt when running solver since IMAIN was set to standard out
Expand Down Expand Up @@ -82,7 +82,7 @@ my_kernel_test(){
else
echo "testing kernel values: all good"
fi
echo "**********************************************************";echo "**********************************************************"
echo "######################################################################################################################"
}

# test example
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ jobs:

- name: Run build
env:
TESTFLAGS: 'FLAGS_CHECK="-O3 -mcmodel=medium -std=f2008 -Wall -Wno-do-subscript -Wno-conversion -Wno-maybe-uninitialized"'
TESTFLAGS: 'FLAGS_CHECK=\"-O3 -mcmodel=medium -std=f2008 -Wall -Wno-do-subscript -Wno-conversion -Wno-maybe-uninitialized\"'
run: ./.github/scripts/run_build.sh
shell: bash

Expand Down

0 comments on commit 09b3d43

Please sign in to comment.