diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 03257147..7e234f4f 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -203,6 +203,8 @@ jobs: mingw-w64-clang-x86_64-netcdf mingw-w64-clang-x86_64-zlib mingw-w64-clang-x86_64-libaec + mingw-w64-clang-x86_64-libc++ + mingw-w64-x86_64-libc++ # - name: Setup tmate session # uses: mxschmitt/action-tmate@v3 @@ -249,6 +251,8 @@ jobs: echo "working dir is $PWD" cd build + + PATH="/c/Program\ Files/LLVM/bin:$PATH" ctest -VV diff --git a/NFsim_v1.11/CMakeLists.txt b/NFsim_v1.11/CMakeLists.txt index 926e0196..7f2616b7 100755 --- a/NFsim_v1.11/CMakeLists.txt +++ b/NFsim_v1.11/CMakeLists.txt @@ -94,7 +94,7 @@ enable_testing() add_executable(${exe_target} ${SRC_FILES}) target_link_libraries(${exe_target} vcommons vcellmessaging) -add_test(NAME ${exe_target}_test2 COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tests/test1.sh ${CMAKE_BINARY_DIR}/bin/${exe_target} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tests) +add_test(NAME ${exe_target}_test1 COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tests/test1.sh ${CMAKE_BINARY_DIR}/bin/${exe_target} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tests) install(TARGETS ${exe_target} RUNTIME DESTINATION ${OPTION_EXE_DIRECTORY}) diff --git a/NFsim_v1.11/tests/test1.sh b/NFsim_v1.11/tests/test1.sh index 684ccf45..d23be6ab 100755 --- a/NFsim_v1.11/tests/test1.sh +++ b/NFsim_v1.11/tests/test1.sh @@ -1,13 +1,53 @@ #!/bin/bash set -e +set -x EXE=$1 INPUT="data/SimID_273069657_0_.nfsimInput" OUTPUT="data/SimID_273069657_0_.gdat" EXPECTED_OUTPUT="data/SimID_273069657_0_.gdat.expected" SPECIES="data/SimID_273069657_0_.species" EXPECTED_SPECIES="data/SimID_273069657_0_.species.expected" + +if [ ! -f $EXE ]; then + echo "NFsim executable $EXE not found. Exiting..." + exit 1 +fi +if [ ! -f $INPUT ]; then + echo "Input file $INPUT not found. Exiting..." + exit 1 +fi +if [ ! -f $EXPECTED_OUTPUT ]; then + echo "Expected output file $EXPECTED_OUTPUT not found. Exiting..." + exit 1 +fi +if [ ! -f $EXPECTED_SPECIES ]; then + echo "Expected species file $EXPECTED_SPECIES not found. Exiting..." + exit 1 +fi + + command="$EXE -seed 505790288 -vcell -xml $INPUT -o $OUTPUT -sim 1.0 -ss $SPECIES -oStep 20 -notf -utl 1000 -cb -pcmatch -tid 0" -$EXE $command +if ! $command; then + echo "NFsim failed to run. Exiting..." + exit 1 +fi + +# verify that the output files exist +if [ ! -f $OUTPUT ]; then + echo "Output file $OUTPUT not found. Exiting..." + exit 1 +fi +if [ ! -f $SPECIES ]; then + echo "Species file $SPECIES not found. Exiting..." + exit 1 +fi -diff $OUTPUT $EXPECTED_OUTPUT -diff $SPECIES $EXPECTED_SPECIES +# verify that the output files match the expected output files +if ! diff $OUTPUT $EXPECTED_OUTPUT; then + echo "Output file $OUTPUT does not match expected output $EXPECTED_OUTPUT. Exiting..." + exit 1 +fi +if ! diff $SPECIES $EXPECTED_SPECIES; then + echo "Species file $SPECIES does not match expected species $EXPECTED_SPECIES. Exiting..." + exit 1 +fi