From 65251c3a707bcefaaef2152c00f06b675e536cc3 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Tue, 26 Nov 2024 08:19:59 -0700 Subject: [PATCH 01/44] Initial unit test integration. --- .github/workflows/fortran_unit_tests.yaml | 44 +++ src/core_utils/CMakeLists.txt | 5 + src/core_utils/string_core_utils.F90 | 163 +++++++++ src/utils/string_utils.F90 | 308 +----------------- test/unit-fortran/CMakeLists.txt | 20 ++ .../src/core_utils/CMakeLists.txt | 4 + .../src/core_utils/test_string_core_utils.pf | 14 + 7 files changed, 255 insertions(+), 303 deletions(-) create mode 100644 .github/workflows/fortran_unit_tests.yaml create mode 100644 src/core_utils/CMakeLists.txt create mode 100644 src/core_utils/string_core_utils.F90 create mode 100644 test/unit-fortran/CMakeLists.txt create mode 100644 test/unit-fortran/src/core_utils/CMakeLists.txt create mode 100644 test/unit-fortran/src/core_utils/test_string_core_utils.pf diff --git a/.github/workflows/fortran_unit_tests.yaml b/.github/workflows/fortran_unit_tests.yaml new file mode 100644 index 00000000..3385c91e --- /dev/null +++ b/.github/workflows/fortran_unit_tests.yaml @@ -0,0 +1,44 @@ +name: fortran_unit_tests + +on: + push: + branches: + - development + - main + workflow_dispatch: + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref || github.run_id }} + cancel-in-progress: true + +jobs: + gcc-toolchain: + runs-on: ubuntu-latest + steps: + - name: Checkout cam-sima + uses: actions/checkout@v4 + + - name: Build pFUnit + run: | + git clone --depth 1 --branch v4.10.0 https://github.com/Goddard-Fortran-Ecosystem/pFUnit.git + cd pFUnit + pwd + cmake -B./build -S. + cd build + make install + + - name: Build cam-sima + run: | + cmake \ + -DCMAKE_PREFIX_PATH=/home/runner/work/cam-sima/cam-sima/pFUnit/build/installed \ + -DCAM_SIMA_ENABLE_CODE_COVERAGE=ON \ + -B./build \ + -S./test/unit-fortran + cd build + make + + - name: Run unit tests + run: | + cd build + make test diff --git a/src/core_utils/CMakeLists.txt b/src/core_utils/CMakeLists.txt new file mode 100644 index 00000000..5e9bd139 --- /dev/null +++ b/src/core_utils/CMakeLists.txt @@ -0,0 +1,5 @@ +set(CORE_UTILS_SRC string_core_utils.F90) + +add_library(core_utils ${CORE_UTILS_SRC}) +target_compile_options(core_utils PRIVATE -ffree-line-length-none) +target_include_directories(core_utils PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) \ No newline at end of file diff --git a/src/core_utils/string_core_utils.F90 b/src/core_utils/string_core_utils.F90 new file mode 100644 index 00000000..3bacfe12 --- /dev/null +++ b/src/core_utils/string_core_utils.F90 @@ -0,0 +1,163 @@ +module string_core_utils + + implicit none + private + + public :: to_str ! convert integer to left justified string + public :: int_date_to_yyyymmdd ! convert encoded date integer to "yyyy-mm-dd" format + public :: int_seconds_to_hhmmss ! convert integer seconds past midnight to "hh:mm:ss" format + public :: stringify ! Convert one or more values of any intrinsic data types to a character string for pretty printing + +CONTAINS + + character(len=10) pure function to_str(n) + ! return default integer as a left justified string + + ! arguments + integer, intent(in) :: n + !---------------------------------------------------------------------------- + + write(to_str,'(i0)') n + + end function to_str + + character(len=10) pure function int_date_to_yyyymmdd (date) + ! Undefined behavior if date <= 0 + + ! Input arguments + integer, intent(in) :: date + + ! Local variables + integer :: year ! year of yyyy-mm-dd + integer :: month ! month of yyyy-mm-dd + integer :: day ! day of yyyy-mm-dd + + year = date / 10000 + month = (date - year*10000) / 100 + day = date - year*10000 - month*100 + + write(int_date_to_yyyymmdd, '(i4.4,A,i2.2,A,i2.2)') & + year,'-',month,'-',day + + end function int_date_to_yyyymmdd + + character(len=8) pure function int_seconds_to_hhmmss (seconds) + ! Undefined behavior if seconds outside [0, 86400] + + ! Input arguments + integer, intent(in) :: seconds + + ! Local variables + integer :: hours ! hours of hh:mm:ss + integer :: minutes ! minutes of hh:mm:ss + integer :: secs ! seconds of hh:mm:ss + + hours = seconds / 3600 + minutes = (seconds - hours*3600) / 60 + secs = (seconds - hours*3600 - minutes*60) + + write(int_seconds_to_hhmmss,'(i2.2,A,i2.2,A,i2.2)') & + hours,':',minutes,':',secs + + end function int_seconds_to_hhmmss + + !> Convert one or more values of any intrinsic data types to a character string for pretty printing. + !> If `value` contains more than one element, the elements will be stringified, delimited by `separator`, then concatenated. + !> If `value` contains exactly one element, the element will be stringified without using `separator`. + !> If `value` contains zero element or is of unsupported data types, an empty character string is produced. + !> If `separator` is not supplied, it defaults to `, ` (i.e., a comma and a space). + !> (KCW, 2024-02-04) + pure function stringify(value, separator) + use, intrinsic :: iso_fortran_env, only: int32, int64, real32, real64 + + class(*), intent(in) :: value(:) + character(*), optional, intent(in) :: separator + character(:), allocatable :: stringify + + integer, parameter :: sizelimit = 1024 + + character(:), allocatable :: buffer, delimiter, format + integer :: i, n, offset + + if (present(separator)) then + delimiter = separator + else + delimiter = ', ' + end if + + n = min(size(value), sizelimit) + + if (n == 0) then + stringify = '' + return + end if + + select type (value) + type is (character(*)) + allocate(character(len(value) * n + len(delimiter) * (n - 1)) :: buffer) + + buffer(:) = '' + offset = 0 + + do i = 1, n + if (len(delimiter) > 0 .and. i > 1) then + buffer(offset + 1:offset + len(delimiter)) = delimiter + offset = offset + len(delimiter) + end if + + if (len_trim(adjustl(value(i))) > 0) then + buffer(offset + 1:offset + len_trim(adjustl(value(i)))) = trim(adjustl(value(i))) + offset = offset + len_trim(adjustl(value(i))) + end if + end do + type is (integer(int32)) + allocate(character(11 * n + len(delimiter) * (n - 1)) :: buffer) + allocate(character(17 + len(delimiter) + floor(log10(real(n))) + 1) :: format) + + write(format, '(a, i0, 3a)') '(ss, ', n, '(i0, :, "', delimiter, '"))' + write(buffer, format) value + type is (integer(int64)) + allocate(character(20 * n + len(delimiter) * (n - 1)) :: buffer) + allocate(character(17 + len(delimiter) + floor(log10(real(n))) + 1) :: format) + + write(format, '(a, i0, 3a)') '(ss, ', n, '(i0, :, "', delimiter, '"))' + write(buffer, format) value + type is (logical) + allocate(character(1 * n + len(delimiter) * (n - 1)) :: buffer) + allocate(character(13 + len(delimiter) + floor(log10(real(n))) + 1) :: format) + + write(format, '(a, i0, 3a)') '(', n, '(l1, :, "', delimiter, '"))' + write(buffer, format) value + type is (real(real32)) + allocate(character(13 * n + len(delimiter) * (n - 1)) :: buffer) + + if (maxval(abs(value)) < 1.0e5_real32) then + allocate(character(20 + len(delimiter) + floor(log10(real(n))) + 1) :: format) + write(format, '(a, i0, 3a)') '(ss, ', n, '(f13.6, :, "', delimiter, '"))' + else + allocate(character(23 + len(delimiter) + floor(log10(real(n))) + 1) :: format) + write(format, '(a, i0, 3a)') '(ss, ', n, '(es13.6e2, :, "', delimiter, '"))' + end if + + write(buffer, format) value + type is (real(real64)) + allocate(character(13 * n + len(delimiter) * (n - 1)) :: buffer) + + if (maxval(abs(value)) < 1.0e5_real64) then + allocate(character(20 + len(delimiter) + floor(log10(real(n))) + 1) :: format) + write(format, '(a, i0, 3a)') '(ss, ', n, '(f13.6, :, "', delimiter, '"))' + else + allocate(character(23 + len(delimiter) + floor(log10(real(n))) + 1) :: format) + write(format, '(a, i0, 3a)') '(ss, ', n, '(es13.6e2, :, "', delimiter, '"))' + end if + + write(buffer, format) value + class default + stringify = '' + return + end select + + stringify = trim(buffer) + end function stringify + +end module string_core_utils \ No newline at end of file diff --git a/src/utils/string_utils.F90 b/src/utils/string_utils.F90 index 223d54da..727f397d 100644 --- a/src/utils/string_utils.F90 +++ b/src/utils/string_utils.F90 @@ -4,6 +4,7 @@ module string_utils use shr_string_mod, only: to_lower => shr_string_toLower use cam_logfile, only: iulog use cam_abortutils, only: endrun + use string_core_utils, only: to_str, int_date_to_yyyymmdd, int_seconds_to_hhmmss, stringify implicit none private @@ -13,10 +14,6 @@ module string_utils public :: strlist_get_ind ! Gets the index of a given string in a list of strings public :: date2yyyymmdd ! convert encoded date integer to "yyyy-mm-dd" format public :: sec2hms ! convert integer seconds past midnight to "hh:mm:ss" format - public :: increment_string ! increments a string - public :: last_sig_char ! Position of last significant character in string - public :: to_str ! convert integer to left justified string - public :: stringify ! Convert one or more values of any intrinsic data types to a character string for pretty printing ! Private module variables integer, parameter :: lower_to_upper = iachar("A") - iachar("a") @@ -66,328 +63,33 @@ subroutine strlist_get_ind(strlist, str, ind, abort) end subroutine strlist_get_ind - !========================================================================================= - character(len=10) function date2yyyymmdd (date) - ! Input arguments - integer, intent(in) :: date - - ! Local workspace - - integer :: year ! year of yyyy-mm-dd - integer :: month ! month of yyyy-mm-dd - integer :: day ! day of yyyy-mm-dd - + if (date < 0) then + write(iulog,*)'DATE2YYYYMMDD: negative date not allowed' call endrun ('DATE2YYYYMMDD: negative date not allowed') end if - year = date / 10000 - month = (date - year*10000) / 100 - day = date - year*10000 - month*100 - - write(date2yyyymmdd,80) year, month, day - 80 format(i4.4,'-',i2.2,'-',i2.2) + date2yyyymmdd = int_date_to_yyyymmdd(date) end function date2yyyymmdd - !========================================================================================= - character(len=8) function sec2hms (seconds) ! Input arguments - integer, intent(in) :: seconds - ! Local workspace - - integer :: hours ! hours of hh:mm:ss - integer :: minutes ! minutes of hh:mm:ss - integer :: secs ! seconds of hh:mm:ss - if (seconds < 0 .or. seconds > 86400) then write(iulog,*)'SEC2HMS: bad input seconds:', seconds call endrun ('SEC2HMS: bad input seconds: '//stringify((/seconds/))) end if - hours = seconds / 3600 - minutes = (seconds - hours*3600) / 60 - secs = (seconds - hours*3600 - minutes*60) - - write(sec2hms,80) hours, minutes, secs - 80 format(i2.2,':',i2.2,':',i2.2) + sec2hms = int_seconds_to_hhmmss(seconds) end function sec2hms - !========================================================================================= - - integer function increment_string(str, increment) - !----------------------------------------------------------------------- - ! ... Increment a string whose ending characters are digits. - ! The incremented integer must be in the range [0 - (10**n)-1] - ! where n is the number of trailing digits. - ! Return values: - ! - ! 0 success - ! -1 error: no trailing digits in string - ! -2 error: incremented integer is out of range - !----------------------------------------------------------------------- - - !----------------------------------------------------------------------- - ! ... Dummy variables - !----------------------------------------------------------------------- - character(len=*), intent(inout) :: str ! string with trailing digits - ! increment: value to increment string (may be negative) - integer, intent(in) :: increment - - !----------------------------------------------------------------------- - ! ... Local variables - !----------------------------------------------------------------------- - integer :: ind ! index - integer :: lstr ! number of significant characters in string - integer :: lnd ! position of last non-digit - integer :: ndigit ! number of trailing digits - integer :: ival ! integer value of trailing digits - integer :: exp ! power of ten related to most sig digit processed - integer :: digit ! integer value of a single digit - - lstr = last_sig_char(str) - lnd = last_index(str) - ndigit = lstr - lnd - - if (ndigit == 0) then - increment_string = -1 - return - end if - - !----------------------------------------------------------------------- - ! ... Calculate integer corresponding to trailing digits. - !----------------------------------------------------------------------- - ival = 0 - exp = 1 - do ind = lstr, lnd+1, -1 - digit = ICHAR(str(ind:ind)) - ICHAR('0') - ival = ival + (digit * exp) - exp = exp * 10 - end do - - !----------------------------------------------------------------------- - ! ... Increment the integer and test for range - !----------------------------------------------------------------------- - exp = exp - 1 - ival = ival + increment - if (ival < 0 .or. ival > exp) then - increment_string = -2 - return - end if - - !----------------------------------------------------------------------- - ! ... Record new values - !----------------------------------------------------------------------- - do ind = lstr, lnd+1, -1 - str(ind:ind) = ACHAR(MOD(ival, 10) + ICHAR('0')) - ival = ival / 10 - end do - - increment_string = 0 - - end function increment_string - - !=========================================================================== - - integer function last_index(cstr) - !----------------------------------------------------------------------- - ! ... Position of last non-digit in the first input token. - ! Return values: - ! > 0 => position of last non-digit - ! = 0 => token is all digits (or empty) - !----------------------------------------------------------------------- - !----------------------------------------------------------------------- - ! ... Dummy arguments - !----------------------------------------------------------------------- - character(len=*), intent(in) :: cstr ! Input character string - - !----------------------------------------------------------------------- - ! ... Local variables - !----------------------------------------------------------------------- - integer :: lsc ! last sig char - integer :: index - integer :: digit - - lsc = last_sig_char(cstr) - if (lsc == 0) then ! empty string - last_index = 0 - return - end if - - do index = lsc, 1, -1 - digit = ICHAR(cstr(index:index)) - ICHAR('0') - if ((digit < 0) .or. (digit > 9)) then - last_index = index - return - end if - end do - - last_index = 0 ! all characters are digits - - end function last_index - - !=========================================================================== - - integer function last_sig_char(cstr) - !----------------------------------------------------------------------- - ! ... Position of last significant character in string. - ! Here significant means non-blank or non-null. - ! Return values: - ! > 0 => position of last significant character - ! = 0 => no significant characters in string - !----------------------------------------------------------------------- - !----------------------------------------------------------------------- - ! ... Dummy arguments - !----------------------------------------------------------------------- - character(len=*), intent(in) :: cstr ! Input character string - - !----------------------------------------------------------------------- - ! ... Local variables - !----------------------------------------------------------------------- - integer :: slen - integer :: index - - slen = len_trim(cstr) - if (slen == 0) then - last_sig_char = 0 - return - end if - - do index = slen, 1, -1 - if ( (cstr(index:index) /= ' ') .and. & - (cstr(index:index) /= ACHAR(0))) then - exit - end if - end do - last_sig_char = index - - end function last_sig_char - - !=========================================================================== - - character(len=10) function to_str(n) - - ! return default integer as a left justified string - - ! arguments - integer, intent(in) :: n - !---------------------------------------------------------------------------- - - write(to_str,'(i0)') n - - end function to_str - - !=========================================================================== - - !> Convert one or more values of any intrinsic data types to a character string for pretty printing. - !> If `value` contains more than one element, the elements will be stringified, delimited by `separator`, then concatenated. - !> If `value` contains exactly one element, the element will be stringified without using `separator`. - !> If `value` contains zero element or is of unsupported data types, an empty character string is produced. - !> If `separator` is not supplied, it defaults to `, ` (i.e., a comma and a space). - !> (KCW, 2024-02-04) - pure function stringify(value, separator) - use, intrinsic :: iso_fortran_env, only: int32, int64, real32, real64 - - class(*), intent(in) :: value(:) - character(*), optional, intent(in) :: separator - character(:), allocatable :: stringify - - integer, parameter :: sizelimit = 1024 - - character(:), allocatable :: buffer, delimiter, format - integer :: i, n, offset - - if (present(separator)) then - delimiter = separator - else - delimiter = ', ' - end if - - n = min(size(value), sizelimit) - - if (n == 0) then - stringify = '' - - return - end if - - select type (value) - type is (character(*)) - allocate(character(len(value) * n + len(delimiter) * (n - 1)) :: buffer) - - buffer(:) = '' - offset = 0 - - do i = 1, n - if (len(delimiter) > 0 .and. i > 1) then - buffer(offset + 1:offset + len(delimiter)) = delimiter - offset = offset + len(delimiter) - end if - - if (len_trim(adjustl(value(i))) > 0) then - buffer(offset + 1:offset + len_trim(adjustl(value(i)))) = trim(adjustl(value(i))) - offset = offset + len_trim(adjustl(value(i))) - end if - end do - type is (integer(int32)) - allocate(character(11 * n + len(delimiter) * (n - 1)) :: buffer) - allocate(character(17 + len(delimiter) + floor(log10(real(n))) + 1) :: format) - - write(format, '(a, i0, 3a)') '(ss, ', n, '(i0, :, "', delimiter, '"))' - write(buffer, format) value - type is (integer(int64)) - allocate(character(20 * n + len(delimiter) * (n - 1)) :: buffer) - allocate(character(17 + len(delimiter) + floor(log10(real(n))) + 1) :: format) - - write(format, '(a, i0, 3a)') '(ss, ', n, '(i0, :, "', delimiter, '"))' - write(buffer, format) value - type is (logical) - allocate(character(1 * n + len(delimiter) * (n - 1)) :: buffer) - allocate(character(13 + len(delimiter) + floor(log10(real(n))) + 1) :: format) - - write(format, '(a, i0, 3a)') '(', n, '(l1, :, "', delimiter, '"))' - write(buffer, format) value - type is (real(real32)) - allocate(character(13 * n + len(delimiter) * (n - 1)) :: buffer) - - if (maxval(abs(value)) < 1.0e5_real32) then - allocate(character(20 + len(delimiter) + floor(log10(real(n))) + 1) :: format) - write(format, '(a, i0, 3a)') '(ss, ', n, '(f13.6, :, "', delimiter, '"))' - else - allocate(character(23 + len(delimiter) + floor(log10(real(n))) + 1) :: format) - write(format, '(a, i0, 3a)') '(ss, ', n, '(es13.6e2, :, "', delimiter, '"))' - end if - - write(buffer, format) value - type is (real(real64)) - allocate(character(13 * n + len(delimiter) * (n - 1)) :: buffer) - - if (maxval(abs(value)) < 1.0e5_real64) then - allocate(character(20 + len(delimiter) + floor(log10(real(n))) + 1) :: format) - write(format, '(a, i0, 3a)') '(ss, ', n, '(f13.6, :, "', delimiter, '"))' - else - allocate(character(23 + len(delimiter) + floor(log10(real(n))) + 1) :: format) - write(format, '(a, i0, 3a)') '(ss, ', n, '(es13.6e2, :, "', delimiter, '"))' - end if - - write(buffer, format) value - class default - stringify = '' - - return - end select - - stringify = trim(buffer) - end function stringify - !========================================================================================= end module string_utils diff --git a/test/unit-fortran/CMakeLists.txt b/test/unit-fortran/CMakeLists.txt new file mode 100644 index 00000000..50c041c5 --- /dev/null +++ b/test/unit-fortran/CMakeLists.txt @@ -0,0 +1,20 @@ +cmake_minimum_required(VERSION 3.18) + +project(CAM-SIMA-core-utils LANGUAGES Fortran) + +option(CAM_SIMA_ENABLE_TESTS "Run pFUnit unit tests" OFF) +option(CAM_SIMA_ENABLE_CODE_COVERAGE "Run code coverage tool" OFF) + +if(CAM_SIMA_ENABLE_CODE_COVERAGE) + add_compile_options(-O0 --coverage) + add_link_options(--coverage) +endif() + +add_subdirectory(${CMAKE_SOURCE_DIR}/../../src/core_utils ${CMAKE_BINARY_DIR}/core/) + +if(CAM_SIMA_ENABLE_TESTS OR CAM_SIMA_ENABLE_CODE_COVERAGE) + set(CMAKE_BUILD_TYPE Debug) + find_package(PFUNIT REQUIRED) + enable_testing() + add_subdirectory(src/core_utils) +endif() diff --git a/test/unit-fortran/src/core_utils/CMakeLists.txt b/test/unit-fortran/src/core_utils/CMakeLists.txt new file mode 100644 index 00000000..d409e23e --- /dev/null +++ b/test/unit-fortran/src/core_utils/CMakeLists.txt @@ -0,0 +1,4 @@ +message(STATUS "Adding pfunit test target") +add_pfunit_ctest(core_utilis_tests + test_string_core_utils.pf + LINK_LIBRARIES core_utils) diff --git a/test/unit-fortran/src/core_utils/test_string_core_utils.pf b/test/unit-fortran/src/core_utils/test_string_core_utils.pf new file mode 100644 index 00000000..ab3919b4 --- /dev/null +++ b/test/unit-fortran/src/core_utils/test_string_core_utils.pf @@ -0,0 +1,14 @@ +@test +subroutine test_to_str() + use funit + use string_core_utils, only : to_str + + integer :: to_convert + character(len=*) :: actual + + to_convert = 1 + actual = to_str(to_convert) + + @assertEqual("1", actual) + +end subroutine test_to_str \ No newline at end of file From 70f89a32985814b28dbd1b4a7503b636c9760740 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Tue, 26 Nov 2024 08:31:31 -0700 Subject: [PATCH 02/44] Changing workflow name. --- .github/workflows/fortran_unit_tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/fortran_unit_tests.yaml b/.github/workflows/fortran_unit_tests.yaml index 3385c91e..e18ade28 100644 --- a/.github/workflows/fortran_unit_tests.yaml +++ b/.github/workflows/fortran_unit_tests.yaml @@ -1,4 +1,4 @@ -name: fortran_unit_tests +name: Fortran Unit Tests on: push: From 5be45655181959286bf68f8ad7ac118e530387be Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Tue, 26 Nov 2024 08:35:14 -0700 Subject: [PATCH 03/44] Changing action order. --- .github/workflows/fortran_unit_tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/fortran_unit_tests.yaml b/.github/workflows/fortran_unit_tests.yaml index e18ade28..c8d4ec10 100644 --- a/.github/workflows/fortran_unit_tests.yaml +++ b/.github/workflows/fortran_unit_tests.yaml @@ -5,8 +5,8 @@ on: branches: - development - main - workflow_dispatch: pull_request: + workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.ref || github.run_id }} From aabf5031fef02d30cb432e8ac6a429166266780c Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Tue, 26 Nov 2024 08:38:00 -0700 Subject: [PATCH 04/44] Fixing workflow file name. --- .../workflows/{fortran_unit_tests.yaml => fortran_unit_tests.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{fortran_unit_tests.yaml => fortran_unit_tests.yml} (100%) diff --git a/.github/workflows/fortran_unit_tests.yaml b/.github/workflows/fortran_unit_tests.yml similarity index 100% rename from .github/workflows/fortran_unit_tests.yaml rename to .github/workflows/fortran_unit_tests.yml From 3b00619f9724a8b9513432ab9d334a1533953594 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Tue, 26 Nov 2024 08:47:32 -0700 Subject: [PATCH 05/44] Updating pfunit path. --- .github/workflows/fortran_unit_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/fortran_unit_tests.yml b/.github/workflows/fortran_unit_tests.yml index c8d4ec10..3fe3e339 100644 --- a/.github/workflows/fortran_unit_tests.yml +++ b/.github/workflows/fortran_unit_tests.yml @@ -31,7 +31,7 @@ jobs: - name: Build cam-sima run: | cmake \ - -DCMAKE_PREFIX_PATH=/home/runner/work/cam-sima/cam-sima/pFUnit/build/installed \ + -DCMAKE_PREFIX_PATH=/home/runner/work/CAM-SIMA/CAM-SIMA/pFUnit/build/installed \ -DCAM_SIMA_ENABLE_CODE_COVERAGE=ON \ -B./build \ -S./test/unit-fortran From caffef0c5a106bfbfda31e823b4145a1e2657f18 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Tue, 26 Nov 2024 08:53:55 -0700 Subject: [PATCH 06/44] Adding code coverage and test results artifact uploads. --- .github/workflows/fortran_unit_tests.yml | 27 ++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/.github/workflows/fortran_unit_tests.yml b/.github/workflows/fortran_unit_tests.yml index 3fe3e339..c1b96e8e 100644 --- a/.github/workflows/fortran_unit_tests.yml +++ b/.github/workflows/fortran_unit_tests.yml @@ -38,7 +38,30 @@ jobs: cd build make - - name: Run unit tests + - name: Run fortran unit tests run: | + cd build && ctest -V --output-on-failure --output-junit test_results.xml + + - name: Upload unit test results + uses: actions/upload-artifact@v4 + with: + name: unit-test-results + path: build/test_results.xml + + - name: Setup GCov + run: | + python3 -m venv venv + source venv/bin/activate + pip3 install gcovr + + - name: Run Gcov + run: | + source venv/bin/activate cd build - make test + gcovr -r .. --filter '\.\./src' --html cam_sima_code_coverage.html --txt + + - name: Upload code coverage results + uses: actions/upload-artifact@v4 + with: + name: code-coverage-results + path: build/cam_sima_code_coverage.html \ No newline at end of file From 235e10aa8ac5ba1648d9fc749710cff010328e37 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Wed, 27 Nov 2024 08:29:57 -0700 Subject: [PATCH 07/44] Adding test to source list and fixing compile errors. --- test/unit-fortran/CMakeLists.txt | 4 ++-- .../src/core_utils/CMakeLists.txt | 5 ++--- .../src/core_utils/test_string_core_utils.pf | 19 ++++++++++++++++--- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/test/unit-fortran/CMakeLists.txt b/test/unit-fortran/CMakeLists.txt index 50c041c5..88aca66e 100644 --- a/test/unit-fortran/CMakeLists.txt +++ b/test/unit-fortran/CMakeLists.txt @@ -10,10 +10,10 @@ if(CAM_SIMA_ENABLE_CODE_COVERAGE) add_link_options(--coverage) endif() -add_subdirectory(${CMAKE_SOURCE_DIR}/../../src/core_utils ${CMAKE_BINARY_DIR}/core/) +add_subdirectory(${CMAKE_SOURCE_DIR}/../../src/core_utils ${CMAKE_BINARY_DIR}/src) if(CAM_SIMA_ENABLE_TESTS OR CAM_SIMA_ENABLE_CODE_COVERAGE) - set(CMAKE_BUILD_TYPE Debug) +set(CMAKE_BUILD_TYPE Debug) find_package(PFUNIT REQUIRED) enable_testing() add_subdirectory(src/core_utils) diff --git a/test/unit-fortran/src/core_utils/CMakeLists.txt b/test/unit-fortran/src/core_utils/CMakeLists.txt index d409e23e..b288a189 100644 --- a/test/unit-fortran/src/core_utils/CMakeLists.txt +++ b/test/unit-fortran/src/core_utils/CMakeLists.txt @@ -1,4 +1,3 @@ -message(STATUS "Adding pfunit test target") -add_pfunit_ctest(core_utilis_tests - test_string_core_utils.pf +add_pfunit_ctest(core_utils_tests + TEST_SOURCES test_string_core_utils.pf LINK_LIBRARIES core_utils) diff --git a/test/unit-fortran/src/core_utils/test_string_core_utils.pf b/test/unit-fortran/src/core_utils/test_string_core_utils.pf index ab3919b4..20466ddf 100644 --- a/test/unit-fortran/src/core_utils/test_string_core_utils.pf +++ b/test/unit-fortran/src/core_utils/test_string_core_utils.pf @@ -1,14 +1,27 @@ @test -subroutine test_to_str() +subroutine test_integer_one_to_str() use funit use string_core_utils, only : to_str integer :: to_convert - character(len=*) :: actual + character(len=10) :: actual to_convert = 1 actual = to_str(to_convert) @assertEqual("1", actual) +end subroutine test_integer_one_to_str -end subroutine test_to_str \ No newline at end of file +@test +subroutine test_integer_with_leading_zeros_to_str() + use funit + use string_core_utils, only : to_str + + integer :: to_convert + character(len=10) :: actual + + to_convert = 001 + actual = to_str(to_convert) + + @assertEqual("1", actual) +end subroutine test_integer_with_leading_zeros_to_str \ No newline at end of file From 1dfc844f7aa8af6301027caf1417dc40a6a18776 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Fri, 29 Nov 2024 08:07:06 -0700 Subject: [PATCH 08/44] Add additional demo tests. --- .../src/core_utils/test_string_core_utils.pf | 44 ++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/test/unit-fortran/src/core_utils/test_string_core_utils.pf b/test/unit-fortran/src/core_utils/test_string_core_utils.pf index 20466ddf..d92f67b2 100644 --- a/test/unit-fortran/src/core_utils/test_string_core_utils.pf +++ b/test/unit-fortran/src/core_utils/test_string_core_utils.pf @@ -24,4 +24,46 @@ subroutine test_integer_with_leading_zeros_to_str() actual = to_str(to_convert) @assertEqual("1", actual) -end subroutine test_integer_with_leading_zeros_to_str \ No newline at end of file +end subroutine test_integer_with_leading_zeros_to_str + +@test +subroutine test_integer_with_trailing_zeros_to_str() + use funit + use string_core_utils, only : to_str + + integer :: to_convert + character(len=10) :: actual + + to_convert = 100 + actual = to_str(to_convert) + + @assertEqual("100", actual) +end subroutine test_integer_with_trailing_zeros_to_str + +@test +subroutine test_one_int_date_to_yyyymmdd() + use funit + use string_core_utils, only : int_date_to_yyyymmdd + + integer :: to_convert + character(len=10) :: actual + + to_convert = 1 + actual = int_date_to_yyyymmdd(to_convert) + + @assertEqual("0000-00-01", actual) +end subroutine test_one_int_date_to_yyyymmdd + +@test +subroutine test_zero_int_seconds_to_hhmmss() + use funit + use string_core_utils, only : int_seconds_to_hhmmss + + integer :: to_convert + character(len=8) :: actual + + to_convert = 0 + actual = int_seconds_to_hhmmss(to_convert) + + @assertEqual("00:00:00", actual) +end subroutine test_zero_int_seconds_to_hhmmss \ No newline at end of file From 275445c47221d748866a6392498e6e3b3b6e93cb Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Wed, 4 Dec 2024 07:00:04 -0700 Subject: [PATCH 09/44] Adding workflow dispatch to python tests. --- .github/workflows/python_unit_tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python_unit_tests.yml b/.github/workflows/python_unit_tests.yml index 395412e6..fe7c1e73 100644 --- a/.github/workflows/python_unit_tests.yml +++ b/.github/workflows/python_unit_tests.yml @@ -1,6 +1,7 @@ name: Python Unit Tests on: + workflow_dispatch: pull_request: types: [opened, synchronize, reopened] push: From b5252cd1d6b5c58671e7785401ce0001072da5e9 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Wed, 4 Dec 2024 07:00:44 -0700 Subject: [PATCH 10/44] Removing debug printing from workflow. --- .github/workflows/fortran_unit_tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/fortran_unit_tests.yml b/.github/workflows/fortran_unit_tests.yml index c1b96e8e..2df5777a 100644 --- a/.github/workflows/fortran_unit_tests.yml +++ b/.github/workflows/fortran_unit_tests.yml @@ -23,7 +23,6 @@ jobs: run: | git clone --depth 1 --branch v4.10.0 https://github.com/Goddard-Fortran-Ecosystem/pFUnit.git cd pFUnit - pwd cmake -B./build -S. cd build make install From 698b3bcccf511ac901a360dae74fcad813be5780 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Wed, 4 Dec 2024 07:02:41 -0700 Subject: [PATCH 11/44] Adding warning about top level builds not supported. --- test/unit-fortran/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/unit-fortran/CMakeLists.txt b/test/unit-fortran/CMakeLists.txt index 88aca66e..2677d318 100644 --- a/test/unit-fortran/CMakeLists.txt +++ b/test/unit-fortran/CMakeLists.txt @@ -5,6 +5,14 @@ project(CAM-SIMA-core-utils LANGUAGES Fortran) option(CAM_SIMA_ENABLE_TESTS "Run pFUnit unit tests" OFF) option(CAM_SIMA_ENABLE_CODE_COVERAGE "Run code coverage tool" OFF) +if(NOT CAM-SIMA-core-utils_IS_TOP_LEVEL) + message(WARNING "CAM-SIMA-core-utils is not integrated into the CMake build of any top level " + "project yet and this CMake is for testing purposes only. " + "Making a change to this project's CMake will not impact the build of " + "a parent project at this time.") +endif() + + if(CAM_SIMA_ENABLE_CODE_COVERAGE) add_compile_options(-O0 --coverage) add_link_options(--coverage) From a62cb23cc17a7ee4a4b777c8ee1e939828d31d16 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Wed, 4 Dec 2024 07:04:03 -0700 Subject: [PATCH 12/44] Fixing whitespace. --- src/core_utils/string_core_utils.F90 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core_utils/string_core_utils.F90 b/src/core_utils/string_core_utils.F90 index 3bacfe12..4801eb43 100644 --- a/src/core_utils/string_core_utils.F90 +++ b/src/core_utils/string_core_utils.F90 @@ -3,10 +3,10 @@ module string_core_utils implicit none private - public :: to_str ! convert integer to left justified string - public :: int_date_to_yyyymmdd ! convert encoded date integer to "yyyy-mm-dd" format - public :: int_seconds_to_hhmmss ! convert integer seconds past midnight to "hh:mm:ss" format - public :: stringify ! Convert one or more values of any intrinsic data types to a character string for pretty printing + public :: to_str ! Convert integer to left justified string + public :: int_date_to_yyyymmdd ! Convert encoded date integer to "yyyy-mm-dd" format + public :: int_seconds_to_hhmmss ! Convert integer seconds past midnight to "hh:mm:ss" format + public :: stringify ! Convert one or more values of any intrinsic data types to a character string for pretty printing CONTAINS From 4125fcaa4af85d860237c22f178ca8288c87165a Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Wed, 4 Dec 2024 07:08:39 -0700 Subject: [PATCH 13/44] Updating fortran test paths from unit-fortran to unit_fortran. --- .github/workflows/fortran_unit_tests.yml | 2 +- test/{unit-fortran => unit_fortran}/CMakeLists.txt | 0 .../src/core_utils/CMakeLists.txt | 0 .../src/core_utils/test_string_core_utils.pf | 0 4 files changed, 1 insertion(+), 1 deletion(-) rename test/{unit-fortran => unit_fortran}/CMakeLists.txt (100%) rename test/{unit-fortran => unit_fortran}/src/core_utils/CMakeLists.txt (100%) rename test/{unit-fortran => unit_fortran}/src/core_utils/test_string_core_utils.pf (100%) diff --git a/.github/workflows/fortran_unit_tests.yml b/.github/workflows/fortran_unit_tests.yml index 2df5777a..44368935 100644 --- a/.github/workflows/fortran_unit_tests.yml +++ b/.github/workflows/fortran_unit_tests.yml @@ -33,7 +33,7 @@ jobs: -DCMAKE_PREFIX_PATH=/home/runner/work/CAM-SIMA/CAM-SIMA/pFUnit/build/installed \ -DCAM_SIMA_ENABLE_CODE_COVERAGE=ON \ -B./build \ - -S./test/unit-fortran + -S./test/unit_fortran cd build make diff --git a/test/unit-fortran/CMakeLists.txt b/test/unit_fortran/CMakeLists.txt similarity index 100% rename from test/unit-fortran/CMakeLists.txt rename to test/unit_fortran/CMakeLists.txt diff --git a/test/unit-fortran/src/core_utils/CMakeLists.txt b/test/unit_fortran/src/core_utils/CMakeLists.txt similarity index 100% rename from test/unit-fortran/src/core_utils/CMakeLists.txt rename to test/unit_fortran/src/core_utils/CMakeLists.txt diff --git a/test/unit-fortran/src/core_utils/test_string_core_utils.pf b/test/unit_fortran/src/core_utils/test_string_core_utils.pf similarity index 100% rename from test/unit-fortran/src/core_utils/test_string_core_utils.pf rename to test/unit_fortran/src/core_utils/test_string_core_utils.pf From 24ddbfbf40eeff231a4ff2c1cfc07e341d76dc37 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Wed, 4 Dec 2024 07:15:32 -0700 Subject: [PATCH 14/44] Move python tests to unit_python. --- .github/workflows/python_unit_tests.yml | 2 +- test/run_unit_tests.sh | 16 ++++++++-------- test/{unit => unit_python}/.coveragerc | 0 .../sample_files/atm_in_files/test_attr_in | 0 .../atm_in_files/test_cmplx_array_atm_in | 0 .../atm_in_files/test_extra_nml_def.xml | 0 .../atm_in_files/test_extra_nml_same_group.xml | 0 .../atm_in_files/test_extra_nml_same_var.xml | 0 .../atm_in_files/test_missing_elems.xml | 0 .../sample_files/atm_in_files/test_multi_attr_in | 0 .../sample_files/atm_in_files/test_multi_xml_in | 0 .../atm_in_files/test_nl_duplicate_atm_in | 0 .../sample_files/atm_in_files/test_simple_atm_in | 0 .../atm_in_files/test_simple_nml_def.xml | 0 .../atm_in_files/test_third_nml_def.xml | 0 .../sample_files/atm_in_files/test_user_in | 0 .../atm_in_files/test_user_nl_allow_dupl_var | 0 .../atm_in_files/test_user_nl_bad_equals | 0 .../atm_in_files/test_user_nl_dupl_var | 0 .../atm_in_files/test_user_nl_no_equals | 0 .../atm_in_files/test_user_nl_simple | 0 .../atm_in_files/test_user_nl_undefined_var | 0 .../autogen_files/two_scheme_banana.F90 | 0 .../autogen_files/two_scheme_banana.meta | 0 .../autogen_files/two_scheme_banana_namelist.xml | 0 .../sample_files/banana_namelist.xml | 0 .../bad_ccpp_tag_build_cache.xml | 0 .../bad_reg_tag_build_cache.xml | 0 .../bad_section_tag_build_cache.xml | 0 .../build_cache_files/example_build_cache.xml | 0 .../update_ccpp_build_cache.xml | 0 .../update_init_gen_build_cache.xml | 0 .../build_cache_files/update_reg_build_cache.xml | 0 .../hist_config_files/amwg_hist_config | 0 .../sample_files/hist_config_files/atm_in_flat | 0 .../sample_files/hist_config_files/atm_in_multi | 0 .../sample_files/hist_config_files/rad_config | 0 .../hist_config_files/user_nl_cam_flat | 0 .../hist_config_files/user_nl_cam_multi | 0 .../sample_files/kumquat_namelist.xml | 0 .../namelist_files/banana_namelist.F90 | 0 .../namelist_files/banana_namelist.meta | 0 .../cam_ccpp_scheme_namelists_double_def.F90 | 0 .../cam_ccpp_scheme_namelists_single_def.F90 | 0 .../namelist_files/kumquat_namelist.F90 | 0 .../namelist_files/kumquat_namelist.meta | 0 .../sample_files/phys_types_dup_section.meta | 0 .../sample_files/phys_types_no_table.meta | 0 .../sample_files/physics_types_complete.F90 | 0 .../sample_files/physics_types_complete.meta | 0 .../sample_files/physics_types_ddt2.F90 | 0 .../sample_files/physics_types_ddt2.meta | 0 .../sample_files/physics_types_ddt_array.F90 | 0 .../sample_files/physics_types_ddt_array.meta | 0 .../sample_files/physics_types_ddt_eul.F90 | 0 .../sample_files/physics_types_ddt_eul.meta | 0 .../sample_files/physics_types_ddt_fv.F90 | 0 .../sample_files/physics_types_ddt_fv.meta | 0 .../sample_files/physics_types_ddt_se.F90 | 0 .../sample_files/physics_types_ddt_se.meta | 0 .../sample_files/physics_types_parameter.F90 | 0 .../sample_files/physics_types_parameter.meta | 0 .../sample_files/physics_types_simple.F90 | 0 .../sample_files/physics_types_simple.meta | 0 .../sample_files/ref_pres.meta | 0 .../sample_files/ref_pres_SourceMods.meta | 0 .../sample_files/reg_bad_xml.xml | 2 +- .../sample_files/reg_good_complete.xml | 2 +- .../sample_files/reg_good_ddt.xml | 0 .../sample_files/reg_good_ddt2.xml | 0 .../sample_files/reg_good_ddt_array.xml | 0 .../sample_files/reg_good_mf.xml | 2 +- .../sample_files/reg_good_simple.xml | 0 .../sample_files/rotten_namelist.xml | 0 .../sample_files/write_init_files/ddt2_reg.xml | 0 .../write_init_files/ddt_array_reg.xml | 0 .../sample_files/write_init_files/ddt_reg.xml | 0 .../write_init_files/host_var_host.F90 | 0 .../write_init_files/host_var_host.meta | 0 .../write_init_files/host_var_reg.xml | 0 .../sample_files/write_init_files/mf_reg.xml | 2 +- .../write_init_files/missing_ICs_reg.xml | 0 .../write_init_files/no_horiz_dim_reg.xml | 0 .../write_init_files/no_req_var_reg.xml | 0 .../sample_files/write_init_files/param_reg.xml | 0 .../write_init_files/phys_vars_init_check_4D.F90 | 0 .../phys_vars_init_check_bvd.F90 | 0 .../phys_vars_init_check_cnst.F90 | 0 .../phys_vars_init_check_ddt.F90 | 0 .../phys_vars_init_check_ddt2.F90 | 0 .../phys_vars_init_check_ddt_array.F90 | 0 .../phys_vars_init_check_host_var.F90 | 0 .../write_init_files/phys_vars_init_check_mf.F90 | 0 .../phys_vars_init_check_no_horiz.F90 | 0 .../phys_vars_init_check_noreq.F90 | 0 .../phys_vars_init_check_param.F90 | 0 .../phys_vars_init_check_parameter.F90 | 0 .../phys_vars_init_check_protect.F90 | 0 .../phys_vars_init_check_scalar.F90 | 0 .../phys_vars_init_check_simple.F90 | 0 .../write_init_files/physics_inputs_4D.F90 | 0 .../write_init_files/physics_inputs_bvd.F90 | 0 .../write_init_files/physics_inputs_cnst.F90 | 0 .../write_init_files/physics_inputs_ddt.F90 | 0 .../write_init_files/physics_inputs_ddt2.F90 | 0 .../physics_inputs_ddt_array.F90 | 0 .../write_init_files/physics_inputs_host_var.F90 | 0 .../write_init_files/physics_inputs_mf.F90 | 0 .../write_init_files/physics_inputs_no_horiz.F90 | 0 .../write_init_files/physics_inputs_noreq.F90 | 0 .../write_init_files/physics_inputs_param.F90 | 0 .../physics_inputs_parameter.F90 | 0 .../write_init_files/physics_inputs_protect.F90 | 0 .../write_init_files/physics_inputs_scalar.F90 | 0 .../write_init_files/physics_inputs_simple.F90 | 0 .../write_init_files/protected_reg.xml | 0 .../sample_files/write_init_files/ref_theta.F90 | 0 .../sample_files/write_init_files/ref_theta.meta | 0 .../sample_files/write_init_files/ref_two.F90 | 0 .../sample_files/write_init_files/ref_two.meta | 0 .../write_init_files/scalar_var_reg.xml | 0 .../simple_build_cache_template.xml | 0 .../write_init_files/simple_host.F90 | 0 .../write_init_files/simple_host.meta | 0 .../sample_files/write_init_files/simple_reg.xml | 0 .../write_init_files/suite_simple.xml | 0 .../write_init_files/temp_adjust.F90 | 0 .../write_init_files/temp_adjust.meta | 0 .../write_init_files/temp_adjust_4D.F90 | 0 .../write_init_files/temp_adjust_4D.meta | 0 .../write_init_files/temp_adjust_bvd.F90 | 0 .../write_init_files/temp_adjust_bvd.meta | 0 .../write_init_files/temp_adjust_cnst.F90 | 0 .../write_init_files/temp_adjust_cnst.meta | 0 .../write_init_files/temp_adjust_no_horiz.F90 | 0 .../write_init_files/temp_adjust_no_horiz.meta | 0 .../write_init_files/temp_adjust_noreq.F90 | 0 .../write_init_files/temp_adjust_noreq.meta | 0 .../write_init_files/temp_adjust_param.F90 | 0 .../write_init_files/temp_adjust_param.meta | 0 .../write_init_files/temp_adjust_scalar.F90 | 0 .../write_init_files/temp_adjust_scalar.meta | 0 .../sample_files/write_init_files/theta_ddt.F90 | 0 .../sample_files/write_init_files/theta_ddt.meta | 0 .../sample_files/write_init_files/var_4D_reg.xml | 0 .../write_init_files/var_bad_vertdim.xml | 0 .../test_atm_in_paramgen.py | 0 test/{unit => unit_python}/test_build_cache.py | 0 test/{unit => unit_python}/test_cam_autogen.py | 0 test/{unit => unit_python}/test_cam_config.py | 0 .../test_create_readnl_files.py | 8 ++++---- test/{unit => unit_python}/test_hist_config.py | 0 test/{unit => unit_python}/test_registry.py | 0 .../test_write_init_files.py | 0 154 files changed, 17 insertions(+), 17 deletions(-) rename test/{unit => unit_python}/.coveragerc (100%) rename test/{unit => unit_python}/sample_files/atm_in_files/test_attr_in (100%) rename test/{unit => unit_python}/sample_files/atm_in_files/test_cmplx_array_atm_in (100%) rename test/{unit => unit_python}/sample_files/atm_in_files/test_extra_nml_def.xml (100%) rename test/{unit => unit_python}/sample_files/atm_in_files/test_extra_nml_same_group.xml (100%) rename test/{unit => unit_python}/sample_files/atm_in_files/test_extra_nml_same_var.xml (100%) rename test/{unit => unit_python}/sample_files/atm_in_files/test_missing_elems.xml (100%) rename test/{unit => unit_python}/sample_files/atm_in_files/test_multi_attr_in (100%) rename test/{unit => unit_python}/sample_files/atm_in_files/test_multi_xml_in (100%) rename test/{unit => unit_python}/sample_files/atm_in_files/test_nl_duplicate_atm_in (100%) rename test/{unit => unit_python}/sample_files/atm_in_files/test_simple_atm_in (100%) rename test/{unit => unit_python}/sample_files/atm_in_files/test_simple_nml_def.xml (100%) rename test/{unit => unit_python}/sample_files/atm_in_files/test_third_nml_def.xml (100%) rename test/{unit => unit_python}/sample_files/atm_in_files/test_user_in (100%) rename test/{unit => unit_python}/sample_files/atm_in_files/test_user_nl_allow_dupl_var (100%) rename test/{unit => unit_python}/sample_files/atm_in_files/test_user_nl_bad_equals (100%) rename test/{unit => unit_python}/sample_files/atm_in_files/test_user_nl_dupl_var (100%) rename test/{unit => unit_python}/sample_files/atm_in_files/test_user_nl_no_equals (100%) rename test/{unit => unit_python}/sample_files/atm_in_files/test_user_nl_simple (100%) rename test/{unit => unit_python}/sample_files/atm_in_files/test_user_nl_undefined_var (100%) rename test/{unit => unit_python}/sample_files/autogen_files/two_scheme_banana.F90 (100%) rename test/{unit => unit_python}/sample_files/autogen_files/two_scheme_banana.meta (100%) rename test/{unit => unit_python}/sample_files/autogen_files/two_scheme_banana_namelist.xml (100%) rename test/{unit => unit_python}/sample_files/banana_namelist.xml (100%) rename test/{unit => unit_python}/sample_files/build_cache_files/bad_ccpp_tag_build_cache.xml (100%) rename test/{unit => unit_python}/sample_files/build_cache_files/bad_reg_tag_build_cache.xml (100%) rename test/{unit => unit_python}/sample_files/build_cache_files/bad_section_tag_build_cache.xml (100%) rename test/{unit => unit_python}/sample_files/build_cache_files/example_build_cache.xml (100%) rename test/{unit => unit_python}/sample_files/build_cache_files/update_ccpp_build_cache.xml (100%) rename test/{unit => unit_python}/sample_files/build_cache_files/update_init_gen_build_cache.xml (100%) rename test/{unit => unit_python}/sample_files/build_cache_files/update_reg_build_cache.xml (100%) rename test/{unit => unit_python}/sample_files/hist_config_files/amwg_hist_config (100%) rename test/{unit => unit_python}/sample_files/hist_config_files/atm_in_flat (100%) rename test/{unit => unit_python}/sample_files/hist_config_files/atm_in_multi (100%) rename test/{unit => unit_python}/sample_files/hist_config_files/rad_config (100%) rename test/{unit => unit_python}/sample_files/hist_config_files/user_nl_cam_flat (100%) rename test/{unit => unit_python}/sample_files/hist_config_files/user_nl_cam_multi (100%) rename test/{unit => unit_python}/sample_files/kumquat_namelist.xml (100%) rename test/{unit => unit_python}/sample_files/namelist_files/banana_namelist.F90 (100%) rename test/{unit => unit_python}/sample_files/namelist_files/banana_namelist.meta (100%) rename test/{unit => unit_python}/sample_files/namelist_files/cam_ccpp_scheme_namelists_double_def.F90 (100%) rename test/{unit => unit_python}/sample_files/namelist_files/cam_ccpp_scheme_namelists_single_def.F90 (100%) rename test/{unit => unit_python}/sample_files/namelist_files/kumquat_namelist.F90 (100%) rename test/{unit => unit_python}/sample_files/namelist_files/kumquat_namelist.meta (100%) rename test/{unit => unit_python}/sample_files/phys_types_dup_section.meta (100%) rename test/{unit => unit_python}/sample_files/phys_types_no_table.meta (100%) rename test/{unit => unit_python}/sample_files/physics_types_complete.F90 (100%) rename test/{unit => unit_python}/sample_files/physics_types_complete.meta (100%) rename test/{unit => unit_python}/sample_files/physics_types_ddt2.F90 (100%) rename test/{unit => unit_python}/sample_files/physics_types_ddt2.meta (100%) rename test/{unit => unit_python}/sample_files/physics_types_ddt_array.F90 (100%) rename test/{unit => unit_python}/sample_files/physics_types_ddt_array.meta (100%) rename test/{unit => unit_python}/sample_files/physics_types_ddt_eul.F90 (100%) rename test/{unit => unit_python}/sample_files/physics_types_ddt_eul.meta (100%) rename test/{unit => unit_python}/sample_files/physics_types_ddt_fv.F90 (100%) rename test/{unit => unit_python}/sample_files/physics_types_ddt_fv.meta (100%) rename test/{unit => unit_python}/sample_files/physics_types_ddt_se.F90 (100%) rename test/{unit => unit_python}/sample_files/physics_types_ddt_se.meta (100%) rename test/{unit => unit_python}/sample_files/physics_types_parameter.F90 (100%) rename test/{unit => unit_python}/sample_files/physics_types_parameter.meta (100%) rename test/{unit => unit_python}/sample_files/physics_types_simple.F90 (100%) rename test/{unit => unit_python}/sample_files/physics_types_simple.meta (100%) rename test/{unit => unit_python}/sample_files/ref_pres.meta (100%) rename test/{unit => unit_python}/sample_files/ref_pres_SourceMods.meta (100%) rename test/{unit => unit_python}/sample_files/reg_bad_xml.xml (98%) rename test/{unit => unit_python}/sample_files/reg_good_complete.xml (98%) rename test/{unit => unit_python}/sample_files/reg_good_ddt.xml (100%) rename test/{unit => unit_python}/sample_files/reg_good_ddt2.xml (100%) rename test/{unit => unit_python}/sample_files/reg_good_ddt_array.xml (100%) rename test/{unit => unit_python}/sample_files/reg_good_mf.xml (96%) rename test/{unit => unit_python}/sample_files/reg_good_simple.xml (100%) rename test/{unit => unit_python}/sample_files/rotten_namelist.xml (100%) rename test/{unit => unit_python}/sample_files/write_init_files/ddt2_reg.xml (100%) rename test/{unit => unit_python}/sample_files/write_init_files/ddt_array_reg.xml (100%) rename test/{unit => unit_python}/sample_files/write_init_files/ddt_reg.xml (100%) rename test/{unit => unit_python}/sample_files/write_init_files/host_var_host.F90 (100%) rename test/{unit => unit_python}/sample_files/write_init_files/host_var_host.meta (100%) rename test/{unit => unit_python}/sample_files/write_init_files/host_var_reg.xml (100%) rename test/{unit => unit_python}/sample_files/write_init_files/mf_reg.xml (88%) rename test/{unit => unit_python}/sample_files/write_init_files/missing_ICs_reg.xml (100%) rename test/{unit => unit_python}/sample_files/write_init_files/no_horiz_dim_reg.xml (100%) rename test/{unit => unit_python}/sample_files/write_init_files/no_req_var_reg.xml (100%) rename test/{unit => unit_python}/sample_files/write_init_files/param_reg.xml (100%) rename test/{unit => unit_python}/sample_files/write_init_files/phys_vars_init_check_4D.F90 (100%) rename test/{unit => unit_python}/sample_files/write_init_files/phys_vars_init_check_bvd.F90 (100%) rename test/{unit => unit_python}/sample_files/write_init_files/phys_vars_init_check_cnst.F90 (100%) rename test/{unit => unit_python}/sample_files/write_init_files/phys_vars_init_check_ddt.F90 (100%) rename test/{unit => unit_python}/sample_files/write_init_files/phys_vars_init_check_ddt2.F90 (100%) rename test/{unit => unit_python}/sample_files/write_init_files/phys_vars_init_check_ddt_array.F90 (100%) rename test/{unit => unit_python}/sample_files/write_init_files/phys_vars_init_check_host_var.F90 (100%) rename test/{unit => unit_python}/sample_files/write_init_files/phys_vars_init_check_mf.F90 (100%) rename test/{unit => unit_python}/sample_files/write_init_files/phys_vars_init_check_no_horiz.F90 (100%) rename test/{unit => unit_python}/sample_files/write_init_files/phys_vars_init_check_noreq.F90 (100%) rename test/{unit => unit_python}/sample_files/write_init_files/phys_vars_init_check_param.F90 (100%) rename test/{unit => unit_python}/sample_files/write_init_files/phys_vars_init_check_parameter.F90 (100%) rename test/{unit => unit_python}/sample_files/write_init_files/phys_vars_init_check_protect.F90 (100%) rename test/{unit => unit_python}/sample_files/write_init_files/phys_vars_init_check_scalar.F90 (100%) rename test/{unit => unit_python}/sample_files/write_init_files/phys_vars_init_check_simple.F90 (100%) rename test/{unit => unit_python}/sample_files/write_init_files/physics_inputs_4D.F90 (100%) rename test/{unit => unit_python}/sample_files/write_init_files/physics_inputs_bvd.F90 (100%) rename test/{unit => unit_python}/sample_files/write_init_files/physics_inputs_cnst.F90 (100%) rename test/{unit => unit_python}/sample_files/write_init_files/physics_inputs_ddt.F90 (100%) rename test/{unit => unit_python}/sample_files/write_init_files/physics_inputs_ddt2.F90 (100%) rename test/{unit => unit_python}/sample_files/write_init_files/physics_inputs_ddt_array.F90 (100%) rename test/{unit => unit_python}/sample_files/write_init_files/physics_inputs_host_var.F90 (100%) rename test/{unit => unit_python}/sample_files/write_init_files/physics_inputs_mf.F90 (100%) rename test/{unit => unit_python}/sample_files/write_init_files/physics_inputs_no_horiz.F90 (100%) rename test/{unit => unit_python}/sample_files/write_init_files/physics_inputs_noreq.F90 (100%) rename test/{unit => unit_python}/sample_files/write_init_files/physics_inputs_param.F90 (100%) rename test/{unit => unit_python}/sample_files/write_init_files/physics_inputs_parameter.F90 (100%) rename test/{unit => unit_python}/sample_files/write_init_files/physics_inputs_protect.F90 (100%) rename test/{unit => unit_python}/sample_files/write_init_files/physics_inputs_scalar.F90 (100%) rename test/{unit => unit_python}/sample_files/write_init_files/physics_inputs_simple.F90 (100%) rename test/{unit => unit_python}/sample_files/write_init_files/protected_reg.xml (100%) rename test/{unit => unit_python}/sample_files/write_init_files/ref_theta.F90 (100%) rename test/{unit => unit_python}/sample_files/write_init_files/ref_theta.meta (100%) rename test/{unit => unit_python}/sample_files/write_init_files/ref_two.F90 (100%) rename test/{unit => unit_python}/sample_files/write_init_files/ref_two.meta (100%) rename test/{unit => unit_python}/sample_files/write_init_files/scalar_var_reg.xml (100%) rename test/{unit => unit_python}/sample_files/write_init_files/simple_build_cache_template.xml (100%) rename test/{unit => unit_python}/sample_files/write_init_files/simple_host.F90 (100%) rename test/{unit => unit_python}/sample_files/write_init_files/simple_host.meta (100%) rename test/{unit => unit_python}/sample_files/write_init_files/simple_reg.xml (100%) rename test/{unit => unit_python}/sample_files/write_init_files/suite_simple.xml (100%) rename test/{unit => unit_python}/sample_files/write_init_files/temp_adjust.F90 (100%) rename test/{unit => unit_python}/sample_files/write_init_files/temp_adjust.meta (100%) rename test/{unit => unit_python}/sample_files/write_init_files/temp_adjust_4D.F90 (100%) rename test/{unit => unit_python}/sample_files/write_init_files/temp_adjust_4D.meta (100%) rename test/{unit => unit_python}/sample_files/write_init_files/temp_adjust_bvd.F90 (100%) rename test/{unit => unit_python}/sample_files/write_init_files/temp_adjust_bvd.meta (100%) rename test/{unit => unit_python}/sample_files/write_init_files/temp_adjust_cnst.F90 (100%) rename test/{unit => unit_python}/sample_files/write_init_files/temp_adjust_cnst.meta (100%) rename test/{unit => unit_python}/sample_files/write_init_files/temp_adjust_no_horiz.F90 (100%) rename test/{unit => unit_python}/sample_files/write_init_files/temp_adjust_no_horiz.meta (100%) rename test/{unit => unit_python}/sample_files/write_init_files/temp_adjust_noreq.F90 (100%) rename test/{unit => unit_python}/sample_files/write_init_files/temp_adjust_noreq.meta (100%) rename test/{unit => unit_python}/sample_files/write_init_files/temp_adjust_param.F90 (100%) rename test/{unit => unit_python}/sample_files/write_init_files/temp_adjust_param.meta (100%) rename test/{unit => unit_python}/sample_files/write_init_files/temp_adjust_scalar.F90 (100%) rename test/{unit => unit_python}/sample_files/write_init_files/temp_adjust_scalar.meta (100%) rename test/{unit => unit_python}/sample_files/write_init_files/theta_ddt.F90 (100%) rename test/{unit => unit_python}/sample_files/write_init_files/theta_ddt.meta (100%) rename test/{unit => unit_python}/sample_files/write_init_files/var_4D_reg.xml (100%) rename test/{unit => unit_python}/sample_files/write_init_files/var_bad_vertdim.xml (100%) rename test/{unit => unit_python}/test_atm_in_paramgen.py (100%) rename test/{unit => unit_python}/test_build_cache.py (100%) rename test/{unit => unit_python}/test_cam_autogen.py (100%) rename test/{unit => unit_python}/test_cam_config.py (100%) rename test/{unit => unit_python}/test_create_readnl_files.py (98%) rename test/{unit => unit_python}/test_hist_config.py (100%) rename test/{unit => unit_python}/test_registry.py (100%) rename test/{unit => unit_python}/test_write_init_files.py (100%) diff --git a/.github/workflows/python_unit_tests.yml b/.github/workflows/python_unit_tests.yml index fe7c1e73..7ac605b8 100644 --- a/.github/workflows/python_unit_tests.yml +++ b/.github/workflows/python_unit_tests.yml @@ -57,4 +57,4 @@ jobs: pytest src/data --doctest-modules # Run all python unit tests: - pytest test/unit + pytest test/unit_python diff --git a/test/run_unit_tests.sh b/test/run_unit_tests.sh index a68cbf08..a8e7fe9d 100755 --- a/test/run_unit_tests.sh +++ b/test/run_unit_tests.sh @@ -69,21 +69,21 @@ run_doctest cime_config/atm_in_paramgen.py # CAM history config doctests: run_doctest cime_config/hist_config.py # CAM config unit tests: -run_unittest test/unit/test_cam_config.py +run_unittest test/unit_python/test_cam_config.py # CAM autogen unit tests: -run_unittest test/unit/test_cam_autogen.py +run_unittest test/unit_python/test_cam_autogen.py # CAM build cache unit tests: -run_unittest test/unit/test_build_cache.py +run_unittest test/unit_python/test_build_cache.py # Registry generator unit tests: -run_unittest test/unit/test_registry.py +run_unittest test/unit_python/test_registry.py # Namelist reader autogeneration unit tests -run_unittest test/unit/test_create_readnl_files.py +run_unittest test/unit_python/test_create_readnl_files.py # Physics variable init (phys_init) generator unit tests: -run_unittest test/unit/test_write_init_files.py +run_unittest test/unit_python/test_write_init_files.py # ParamGen atm_in namelist writer unit tests: -run_unittest test/unit/test_atm_in_paramgen.py +run_unittest test/unit_python/test_atm_in_paramgen.py # CAM history config unit tests -run_unittest test/unit/test_hist_config.py +run_unittest test/unit_python/test_hist_config.py # Report if [ ${NUMERRORS} -gt 0 ]; then diff --git a/test/unit/.coveragerc b/test/unit_python/.coveragerc similarity index 100% rename from test/unit/.coveragerc rename to test/unit_python/.coveragerc diff --git a/test/unit/sample_files/atm_in_files/test_attr_in b/test/unit_python/sample_files/atm_in_files/test_attr_in similarity index 100% rename from test/unit/sample_files/atm_in_files/test_attr_in rename to test/unit_python/sample_files/atm_in_files/test_attr_in diff --git a/test/unit/sample_files/atm_in_files/test_cmplx_array_atm_in b/test/unit_python/sample_files/atm_in_files/test_cmplx_array_atm_in similarity index 100% rename from test/unit/sample_files/atm_in_files/test_cmplx_array_atm_in rename to test/unit_python/sample_files/atm_in_files/test_cmplx_array_atm_in diff --git a/test/unit/sample_files/atm_in_files/test_extra_nml_def.xml b/test/unit_python/sample_files/atm_in_files/test_extra_nml_def.xml similarity index 100% rename from test/unit/sample_files/atm_in_files/test_extra_nml_def.xml rename to test/unit_python/sample_files/atm_in_files/test_extra_nml_def.xml diff --git a/test/unit/sample_files/atm_in_files/test_extra_nml_same_group.xml b/test/unit_python/sample_files/atm_in_files/test_extra_nml_same_group.xml similarity index 100% rename from test/unit/sample_files/atm_in_files/test_extra_nml_same_group.xml rename to test/unit_python/sample_files/atm_in_files/test_extra_nml_same_group.xml diff --git a/test/unit/sample_files/atm_in_files/test_extra_nml_same_var.xml b/test/unit_python/sample_files/atm_in_files/test_extra_nml_same_var.xml similarity index 100% rename from test/unit/sample_files/atm_in_files/test_extra_nml_same_var.xml rename to test/unit_python/sample_files/atm_in_files/test_extra_nml_same_var.xml diff --git a/test/unit/sample_files/atm_in_files/test_missing_elems.xml b/test/unit_python/sample_files/atm_in_files/test_missing_elems.xml similarity index 100% rename from test/unit/sample_files/atm_in_files/test_missing_elems.xml rename to test/unit_python/sample_files/atm_in_files/test_missing_elems.xml diff --git a/test/unit/sample_files/atm_in_files/test_multi_attr_in b/test/unit_python/sample_files/atm_in_files/test_multi_attr_in similarity index 100% rename from test/unit/sample_files/atm_in_files/test_multi_attr_in rename to test/unit_python/sample_files/atm_in_files/test_multi_attr_in diff --git a/test/unit/sample_files/atm_in_files/test_multi_xml_in b/test/unit_python/sample_files/atm_in_files/test_multi_xml_in similarity index 100% rename from test/unit/sample_files/atm_in_files/test_multi_xml_in rename to test/unit_python/sample_files/atm_in_files/test_multi_xml_in diff --git a/test/unit/sample_files/atm_in_files/test_nl_duplicate_atm_in b/test/unit_python/sample_files/atm_in_files/test_nl_duplicate_atm_in similarity index 100% rename from test/unit/sample_files/atm_in_files/test_nl_duplicate_atm_in rename to test/unit_python/sample_files/atm_in_files/test_nl_duplicate_atm_in diff --git a/test/unit/sample_files/atm_in_files/test_simple_atm_in b/test/unit_python/sample_files/atm_in_files/test_simple_atm_in similarity index 100% rename from test/unit/sample_files/atm_in_files/test_simple_atm_in rename to test/unit_python/sample_files/atm_in_files/test_simple_atm_in diff --git a/test/unit/sample_files/atm_in_files/test_simple_nml_def.xml b/test/unit_python/sample_files/atm_in_files/test_simple_nml_def.xml similarity index 100% rename from test/unit/sample_files/atm_in_files/test_simple_nml_def.xml rename to test/unit_python/sample_files/atm_in_files/test_simple_nml_def.xml diff --git a/test/unit/sample_files/atm_in_files/test_third_nml_def.xml b/test/unit_python/sample_files/atm_in_files/test_third_nml_def.xml similarity index 100% rename from test/unit/sample_files/atm_in_files/test_third_nml_def.xml rename to test/unit_python/sample_files/atm_in_files/test_third_nml_def.xml diff --git a/test/unit/sample_files/atm_in_files/test_user_in b/test/unit_python/sample_files/atm_in_files/test_user_in similarity index 100% rename from test/unit/sample_files/atm_in_files/test_user_in rename to test/unit_python/sample_files/atm_in_files/test_user_in diff --git a/test/unit/sample_files/atm_in_files/test_user_nl_allow_dupl_var b/test/unit_python/sample_files/atm_in_files/test_user_nl_allow_dupl_var similarity index 100% rename from test/unit/sample_files/atm_in_files/test_user_nl_allow_dupl_var rename to test/unit_python/sample_files/atm_in_files/test_user_nl_allow_dupl_var diff --git a/test/unit/sample_files/atm_in_files/test_user_nl_bad_equals b/test/unit_python/sample_files/atm_in_files/test_user_nl_bad_equals similarity index 100% rename from test/unit/sample_files/atm_in_files/test_user_nl_bad_equals rename to test/unit_python/sample_files/atm_in_files/test_user_nl_bad_equals diff --git a/test/unit/sample_files/atm_in_files/test_user_nl_dupl_var b/test/unit_python/sample_files/atm_in_files/test_user_nl_dupl_var similarity index 100% rename from test/unit/sample_files/atm_in_files/test_user_nl_dupl_var rename to test/unit_python/sample_files/atm_in_files/test_user_nl_dupl_var diff --git a/test/unit/sample_files/atm_in_files/test_user_nl_no_equals b/test/unit_python/sample_files/atm_in_files/test_user_nl_no_equals similarity index 100% rename from test/unit/sample_files/atm_in_files/test_user_nl_no_equals rename to test/unit_python/sample_files/atm_in_files/test_user_nl_no_equals diff --git a/test/unit/sample_files/atm_in_files/test_user_nl_simple b/test/unit_python/sample_files/atm_in_files/test_user_nl_simple similarity index 100% rename from test/unit/sample_files/atm_in_files/test_user_nl_simple rename to test/unit_python/sample_files/atm_in_files/test_user_nl_simple diff --git a/test/unit/sample_files/atm_in_files/test_user_nl_undefined_var b/test/unit_python/sample_files/atm_in_files/test_user_nl_undefined_var similarity index 100% rename from test/unit/sample_files/atm_in_files/test_user_nl_undefined_var rename to test/unit_python/sample_files/atm_in_files/test_user_nl_undefined_var diff --git a/test/unit/sample_files/autogen_files/two_scheme_banana.F90 b/test/unit_python/sample_files/autogen_files/two_scheme_banana.F90 similarity index 100% rename from test/unit/sample_files/autogen_files/two_scheme_banana.F90 rename to test/unit_python/sample_files/autogen_files/two_scheme_banana.F90 diff --git a/test/unit/sample_files/autogen_files/two_scheme_banana.meta b/test/unit_python/sample_files/autogen_files/two_scheme_banana.meta similarity index 100% rename from test/unit/sample_files/autogen_files/two_scheme_banana.meta rename to test/unit_python/sample_files/autogen_files/two_scheme_banana.meta diff --git a/test/unit/sample_files/autogen_files/two_scheme_banana_namelist.xml b/test/unit_python/sample_files/autogen_files/two_scheme_banana_namelist.xml similarity index 100% rename from test/unit/sample_files/autogen_files/two_scheme_banana_namelist.xml rename to test/unit_python/sample_files/autogen_files/two_scheme_banana_namelist.xml diff --git a/test/unit/sample_files/banana_namelist.xml b/test/unit_python/sample_files/banana_namelist.xml similarity index 100% rename from test/unit/sample_files/banana_namelist.xml rename to test/unit_python/sample_files/banana_namelist.xml diff --git a/test/unit/sample_files/build_cache_files/bad_ccpp_tag_build_cache.xml b/test/unit_python/sample_files/build_cache_files/bad_ccpp_tag_build_cache.xml similarity index 100% rename from test/unit/sample_files/build_cache_files/bad_ccpp_tag_build_cache.xml rename to test/unit_python/sample_files/build_cache_files/bad_ccpp_tag_build_cache.xml diff --git a/test/unit/sample_files/build_cache_files/bad_reg_tag_build_cache.xml b/test/unit_python/sample_files/build_cache_files/bad_reg_tag_build_cache.xml similarity index 100% rename from test/unit/sample_files/build_cache_files/bad_reg_tag_build_cache.xml rename to test/unit_python/sample_files/build_cache_files/bad_reg_tag_build_cache.xml diff --git a/test/unit/sample_files/build_cache_files/bad_section_tag_build_cache.xml b/test/unit_python/sample_files/build_cache_files/bad_section_tag_build_cache.xml similarity index 100% rename from test/unit/sample_files/build_cache_files/bad_section_tag_build_cache.xml rename to test/unit_python/sample_files/build_cache_files/bad_section_tag_build_cache.xml diff --git a/test/unit/sample_files/build_cache_files/example_build_cache.xml b/test/unit_python/sample_files/build_cache_files/example_build_cache.xml similarity index 100% rename from test/unit/sample_files/build_cache_files/example_build_cache.xml rename to test/unit_python/sample_files/build_cache_files/example_build_cache.xml diff --git a/test/unit/sample_files/build_cache_files/update_ccpp_build_cache.xml b/test/unit_python/sample_files/build_cache_files/update_ccpp_build_cache.xml similarity index 100% rename from test/unit/sample_files/build_cache_files/update_ccpp_build_cache.xml rename to test/unit_python/sample_files/build_cache_files/update_ccpp_build_cache.xml diff --git a/test/unit/sample_files/build_cache_files/update_init_gen_build_cache.xml b/test/unit_python/sample_files/build_cache_files/update_init_gen_build_cache.xml similarity index 100% rename from test/unit/sample_files/build_cache_files/update_init_gen_build_cache.xml rename to test/unit_python/sample_files/build_cache_files/update_init_gen_build_cache.xml diff --git a/test/unit/sample_files/build_cache_files/update_reg_build_cache.xml b/test/unit_python/sample_files/build_cache_files/update_reg_build_cache.xml similarity index 100% rename from test/unit/sample_files/build_cache_files/update_reg_build_cache.xml rename to test/unit_python/sample_files/build_cache_files/update_reg_build_cache.xml diff --git a/test/unit/sample_files/hist_config_files/amwg_hist_config b/test/unit_python/sample_files/hist_config_files/amwg_hist_config similarity index 100% rename from test/unit/sample_files/hist_config_files/amwg_hist_config rename to test/unit_python/sample_files/hist_config_files/amwg_hist_config diff --git a/test/unit/sample_files/hist_config_files/atm_in_flat b/test/unit_python/sample_files/hist_config_files/atm_in_flat similarity index 100% rename from test/unit/sample_files/hist_config_files/atm_in_flat rename to test/unit_python/sample_files/hist_config_files/atm_in_flat diff --git a/test/unit/sample_files/hist_config_files/atm_in_multi b/test/unit_python/sample_files/hist_config_files/atm_in_multi similarity index 100% rename from test/unit/sample_files/hist_config_files/atm_in_multi rename to test/unit_python/sample_files/hist_config_files/atm_in_multi diff --git a/test/unit/sample_files/hist_config_files/rad_config b/test/unit_python/sample_files/hist_config_files/rad_config similarity index 100% rename from test/unit/sample_files/hist_config_files/rad_config rename to test/unit_python/sample_files/hist_config_files/rad_config diff --git a/test/unit/sample_files/hist_config_files/user_nl_cam_flat b/test/unit_python/sample_files/hist_config_files/user_nl_cam_flat similarity index 100% rename from test/unit/sample_files/hist_config_files/user_nl_cam_flat rename to test/unit_python/sample_files/hist_config_files/user_nl_cam_flat diff --git a/test/unit/sample_files/hist_config_files/user_nl_cam_multi b/test/unit_python/sample_files/hist_config_files/user_nl_cam_multi similarity index 100% rename from test/unit/sample_files/hist_config_files/user_nl_cam_multi rename to test/unit_python/sample_files/hist_config_files/user_nl_cam_multi diff --git a/test/unit/sample_files/kumquat_namelist.xml b/test/unit_python/sample_files/kumquat_namelist.xml similarity index 100% rename from test/unit/sample_files/kumquat_namelist.xml rename to test/unit_python/sample_files/kumquat_namelist.xml diff --git a/test/unit/sample_files/namelist_files/banana_namelist.F90 b/test/unit_python/sample_files/namelist_files/banana_namelist.F90 similarity index 100% rename from test/unit/sample_files/namelist_files/banana_namelist.F90 rename to test/unit_python/sample_files/namelist_files/banana_namelist.F90 diff --git a/test/unit/sample_files/namelist_files/banana_namelist.meta b/test/unit_python/sample_files/namelist_files/banana_namelist.meta similarity index 100% rename from test/unit/sample_files/namelist_files/banana_namelist.meta rename to test/unit_python/sample_files/namelist_files/banana_namelist.meta diff --git a/test/unit/sample_files/namelist_files/cam_ccpp_scheme_namelists_double_def.F90 b/test/unit_python/sample_files/namelist_files/cam_ccpp_scheme_namelists_double_def.F90 similarity index 100% rename from test/unit/sample_files/namelist_files/cam_ccpp_scheme_namelists_double_def.F90 rename to test/unit_python/sample_files/namelist_files/cam_ccpp_scheme_namelists_double_def.F90 diff --git a/test/unit/sample_files/namelist_files/cam_ccpp_scheme_namelists_single_def.F90 b/test/unit_python/sample_files/namelist_files/cam_ccpp_scheme_namelists_single_def.F90 similarity index 100% rename from test/unit/sample_files/namelist_files/cam_ccpp_scheme_namelists_single_def.F90 rename to test/unit_python/sample_files/namelist_files/cam_ccpp_scheme_namelists_single_def.F90 diff --git a/test/unit/sample_files/namelist_files/kumquat_namelist.F90 b/test/unit_python/sample_files/namelist_files/kumquat_namelist.F90 similarity index 100% rename from test/unit/sample_files/namelist_files/kumquat_namelist.F90 rename to test/unit_python/sample_files/namelist_files/kumquat_namelist.F90 diff --git a/test/unit/sample_files/namelist_files/kumquat_namelist.meta b/test/unit_python/sample_files/namelist_files/kumquat_namelist.meta similarity index 100% rename from test/unit/sample_files/namelist_files/kumquat_namelist.meta rename to test/unit_python/sample_files/namelist_files/kumquat_namelist.meta diff --git a/test/unit/sample_files/phys_types_dup_section.meta b/test/unit_python/sample_files/phys_types_dup_section.meta similarity index 100% rename from test/unit/sample_files/phys_types_dup_section.meta rename to test/unit_python/sample_files/phys_types_dup_section.meta diff --git a/test/unit/sample_files/phys_types_no_table.meta b/test/unit_python/sample_files/phys_types_no_table.meta similarity index 100% rename from test/unit/sample_files/phys_types_no_table.meta rename to test/unit_python/sample_files/phys_types_no_table.meta diff --git a/test/unit/sample_files/physics_types_complete.F90 b/test/unit_python/sample_files/physics_types_complete.F90 similarity index 100% rename from test/unit/sample_files/physics_types_complete.F90 rename to test/unit_python/sample_files/physics_types_complete.F90 diff --git a/test/unit/sample_files/physics_types_complete.meta b/test/unit_python/sample_files/physics_types_complete.meta similarity index 100% rename from test/unit/sample_files/physics_types_complete.meta rename to test/unit_python/sample_files/physics_types_complete.meta diff --git a/test/unit/sample_files/physics_types_ddt2.F90 b/test/unit_python/sample_files/physics_types_ddt2.F90 similarity index 100% rename from test/unit/sample_files/physics_types_ddt2.F90 rename to test/unit_python/sample_files/physics_types_ddt2.F90 diff --git a/test/unit/sample_files/physics_types_ddt2.meta b/test/unit_python/sample_files/physics_types_ddt2.meta similarity index 100% rename from test/unit/sample_files/physics_types_ddt2.meta rename to test/unit_python/sample_files/physics_types_ddt2.meta diff --git a/test/unit/sample_files/physics_types_ddt_array.F90 b/test/unit_python/sample_files/physics_types_ddt_array.F90 similarity index 100% rename from test/unit/sample_files/physics_types_ddt_array.F90 rename to test/unit_python/sample_files/physics_types_ddt_array.F90 diff --git a/test/unit/sample_files/physics_types_ddt_array.meta b/test/unit_python/sample_files/physics_types_ddt_array.meta similarity index 100% rename from test/unit/sample_files/physics_types_ddt_array.meta rename to test/unit_python/sample_files/physics_types_ddt_array.meta diff --git a/test/unit/sample_files/physics_types_ddt_eul.F90 b/test/unit_python/sample_files/physics_types_ddt_eul.F90 similarity index 100% rename from test/unit/sample_files/physics_types_ddt_eul.F90 rename to test/unit_python/sample_files/physics_types_ddt_eul.F90 diff --git a/test/unit/sample_files/physics_types_ddt_eul.meta b/test/unit_python/sample_files/physics_types_ddt_eul.meta similarity index 100% rename from test/unit/sample_files/physics_types_ddt_eul.meta rename to test/unit_python/sample_files/physics_types_ddt_eul.meta diff --git a/test/unit/sample_files/physics_types_ddt_fv.F90 b/test/unit_python/sample_files/physics_types_ddt_fv.F90 similarity index 100% rename from test/unit/sample_files/physics_types_ddt_fv.F90 rename to test/unit_python/sample_files/physics_types_ddt_fv.F90 diff --git a/test/unit/sample_files/physics_types_ddt_fv.meta b/test/unit_python/sample_files/physics_types_ddt_fv.meta similarity index 100% rename from test/unit/sample_files/physics_types_ddt_fv.meta rename to test/unit_python/sample_files/physics_types_ddt_fv.meta diff --git a/test/unit/sample_files/physics_types_ddt_se.F90 b/test/unit_python/sample_files/physics_types_ddt_se.F90 similarity index 100% rename from test/unit/sample_files/physics_types_ddt_se.F90 rename to test/unit_python/sample_files/physics_types_ddt_se.F90 diff --git a/test/unit/sample_files/physics_types_ddt_se.meta b/test/unit_python/sample_files/physics_types_ddt_se.meta similarity index 100% rename from test/unit/sample_files/physics_types_ddt_se.meta rename to test/unit_python/sample_files/physics_types_ddt_se.meta diff --git a/test/unit/sample_files/physics_types_parameter.F90 b/test/unit_python/sample_files/physics_types_parameter.F90 similarity index 100% rename from test/unit/sample_files/physics_types_parameter.F90 rename to test/unit_python/sample_files/physics_types_parameter.F90 diff --git a/test/unit/sample_files/physics_types_parameter.meta b/test/unit_python/sample_files/physics_types_parameter.meta similarity index 100% rename from test/unit/sample_files/physics_types_parameter.meta rename to test/unit_python/sample_files/physics_types_parameter.meta diff --git a/test/unit/sample_files/physics_types_simple.F90 b/test/unit_python/sample_files/physics_types_simple.F90 similarity index 100% rename from test/unit/sample_files/physics_types_simple.F90 rename to test/unit_python/sample_files/physics_types_simple.F90 diff --git a/test/unit/sample_files/physics_types_simple.meta b/test/unit_python/sample_files/physics_types_simple.meta similarity index 100% rename from test/unit/sample_files/physics_types_simple.meta rename to test/unit_python/sample_files/physics_types_simple.meta diff --git a/test/unit/sample_files/ref_pres.meta b/test/unit_python/sample_files/ref_pres.meta similarity index 100% rename from test/unit/sample_files/ref_pres.meta rename to test/unit_python/sample_files/ref_pres.meta diff --git a/test/unit/sample_files/ref_pres_SourceMods.meta b/test/unit_python/sample_files/ref_pres_SourceMods.meta similarity index 100% rename from test/unit/sample_files/ref_pres_SourceMods.meta rename to test/unit_python/sample_files/ref_pres_SourceMods.meta diff --git a/test/unit/sample_files/reg_bad_xml.xml b/test/unit_python/sample_files/reg_bad_xml.xml similarity index 98% rename from test/unit/sample_files/reg_bad_xml.xml rename to test/unit_python/sample_files/reg_bad_xml.xml index da2d45a9..178ea495 100644 --- a/test/unit/sample_files/reg_bad_xml.xml +++ b/test/unit_python/sample_files/reg_bad_xml.xml @@ -106,5 +106,5 @@ Physics state variables updated by dynamical core - $SRCROOT/test/unit/sample_files/ref_pres.meta + $SRCROOT/test/unit_python/sample_files/ref_pres.meta diff --git a/test/unit/sample_files/reg_good_complete.xml b/test/unit_python/sample_files/reg_good_complete.xml similarity index 98% rename from test/unit/sample_files/reg_good_complete.xml rename to test/unit_python/sample_files/reg_good_complete.xml index a18660ba..dfc8b067 100644 --- a/test/unit/sample_files/reg_good_complete.xml +++ b/test/unit_python/sample_files/reg_good_complete.xml @@ -106,5 +106,5 @@ Physics state variables updated by dynamical core - $SRCROOT/test/unit/sample_files/ref_pres.meta + $SRCROOT/test/unit_python/sample_files/ref_pres.meta diff --git a/test/unit/sample_files/reg_good_ddt.xml b/test/unit_python/sample_files/reg_good_ddt.xml similarity index 100% rename from test/unit/sample_files/reg_good_ddt.xml rename to test/unit_python/sample_files/reg_good_ddt.xml diff --git a/test/unit/sample_files/reg_good_ddt2.xml b/test/unit_python/sample_files/reg_good_ddt2.xml similarity index 100% rename from test/unit/sample_files/reg_good_ddt2.xml rename to test/unit_python/sample_files/reg_good_ddt2.xml diff --git a/test/unit/sample_files/reg_good_ddt_array.xml b/test/unit_python/sample_files/reg_good_ddt_array.xml similarity index 100% rename from test/unit/sample_files/reg_good_ddt_array.xml rename to test/unit_python/sample_files/reg_good_ddt_array.xml diff --git a/test/unit/sample_files/reg_good_mf.xml b/test/unit_python/sample_files/reg_good_mf.xml similarity index 96% rename from test/unit/sample_files/reg_good_mf.xml rename to test/unit_python/sample_files/reg_good_mf.xml index 618cb8c2..c534fc20 100644 --- a/test/unit/sample_files/reg_good_mf.xml +++ b/test/unit_python/sample_files/reg_good_mf.xml @@ -41,5 +41,5 @@ Physics state variables updated by dynamical core - $SRCROOT/test/unit/sample_files/ref_pres.meta + $SRCROOT/test/unit_python/sample_files/ref_pres.meta diff --git a/test/unit/sample_files/reg_good_simple.xml b/test/unit_python/sample_files/reg_good_simple.xml similarity index 100% rename from test/unit/sample_files/reg_good_simple.xml rename to test/unit_python/sample_files/reg_good_simple.xml diff --git a/test/unit/sample_files/rotten_namelist.xml b/test/unit_python/sample_files/rotten_namelist.xml similarity index 100% rename from test/unit/sample_files/rotten_namelist.xml rename to test/unit_python/sample_files/rotten_namelist.xml diff --git a/test/unit/sample_files/write_init_files/ddt2_reg.xml b/test/unit_python/sample_files/write_init_files/ddt2_reg.xml similarity index 100% rename from test/unit/sample_files/write_init_files/ddt2_reg.xml rename to test/unit_python/sample_files/write_init_files/ddt2_reg.xml diff --git a/test/unit/sample_files/write_init_files/ddt_array_reg.xml b/test/unit_python/sample_files/write_init_files/ddt_array_reg.xml similarity index 100% rename from test/unit/sample_files/write_init_files/ddt_array_reg.xml rename to test/unit_python/sample_files/write_init_files/ddt_array_reg.xml diff --git a/test/unit/sample_files/write_init_files/ddt_reg.xml b/test/unit_python/sample_files/write_init_files/ddt_reg.xml similarity index 100% rename from test/unit/sample_files/write_init_files/ddt_reg.xml rename to test/unit_python/sample_files/write_init_files/ddt_reg.xml diff --git a/test/unit/sample_files/write_init_files/host_var_host.F90 b/test/unit_python/sample_files/write_init_files/host_var_host.F90 similarity index 100% rename from test/unit/sample_files/write_init_files/host_var_host.F90 rename to test/unit_python/sample_files/write_init_files/host_var_host.F90 diff --git a/test/unit/sample_files/write_init_files/host_var_host.meta b/test/unit_python/sample_files/write_init_files/host_var_host.meta similarity index 100% rename from test/unit/sample_files/write_init_files/host_var_host.meta rename to test/unit_python/sample_files/write_init_files/host_var_host.meta diff --git a/test/unit/sample_files/write_init_files/host_var_reg.xml b/test/unit_python/sample_files/write_init_files/host_var_reg.xml similarity index 100% rename from test/unit/sample_files/write_init_files/host_var_reg.xml rename to test/unit_python/sample_files/write_init_files/host_var_reg.xml diff --git a/test/unit/sample_files/write_init_files/mf_reg.xml b/test/unit_python/sample_files/write_init_files/mf_reg.xml similarity index 88% rename from test/unit/sample_files/write_init_files/mf_reg.xml rename to test/unit_python/sample_files/write_init_files/mf_reg.xml index 0183dd50..8b274f92 100644 --- a/test/unit/sample_files/write_init_files/mf_reg.xml +++ b/test/unit_python/sample_files/write_init_files/mf_reg.xml @@ -14,5 +14,5 @@ eddy_len - $SRCROOT/test/unit/sample_files/write_init_files/ref_theta.meta + $SRCROOT/test/unit_python/sample_files/write_init_files/ref_theta.meta diff --git a/test/unit/sample_files/write_init_files/missing_ICs_reg.xml b/test/unit_python/sample_files/write_init_files/missing_ICs_reg.xml similarity index 100% rename from test/unit/sample_files/write_init_files/missing_ICs_reg.xml rename to test/unit_python/sample_files/write_init_files/missing_ICs_reg.xml diff --git a/test/unit/sample_files/write_init_files/no_horiz_dim_reg.xml b/test/unit_python/sample_files/write_init_files/no_horiz_dim_reg.xml similarity index 100% rename from test/unit/sample_files/write_init_files/no_horiz_dim_reg.xml rename to test/unit_python/sample_files/write_init_files/no_horiz_dim_reg.xml diff --git a/test/unit/sample_files/write_init_files/no_req_var_reg.xml b/test/unit_python/sample_files/write_init_files/no_req_var_reg.xml similarity index 100% rename from test/unit/sample_files/write_init_files/no_req_var_reg.xml rename to test/unit_python/sample_files/write_init_files/no_req_var_reg.xml diff --git a/test/unit/sample_files/write_init_files/param_reg.xml b/test/unit_python/sample_files/write_init_files/param_reg.xml similarity index 100% rename from test/unit/sample_files/write_init_files/param_reg.xml rename to test/unit_python/sample_files/write_init_files/param_reg.xml diff --git a/test/unit/sample_files/write_init_files/phys_vars_init_check_4D.F90 b/test/unit_python/sample_files/write_init_files/phys_vars_init_check_4D.F90 similarity index 100% rename from test/unit/sample_files/write_init_files/phys_vars_init_check_4D.F90 rename to test/unit_python/sample_files/write_init_files/phys_vars_init_check_4D.F90 diff --git a/test/unit/sample_files/write_init_files/phys_vars_init_check_bvd.F90 b/test/unit_python/sample_files/write_init_files/phys_vars_init_check_bvd.F90 similarity index 100% rename from test/unit/sample_files/write_init_files/phys_vars_init_check_bvd.F90 rename to test/unit_python/sample_files/write_init_files/phys_vars_init_check_bvd.F90 diff --git a/test/unit/sample_files/write_init_files/phys_vars_init_check_cnst.F90 b/test/unit_python/sample_files/write_init_files/phys_vars_init_check_cnst.F90 similarity index 100% rename from test/unit/sample_files/write_init_files/phys_vars_init_check_cnst.F90 rename to test/unit_python/sample_files/write_init_files/phys_vars_init_check_cnst.F90 diff --git a/test/unit/sample_files/write_init_files/phys_vars_init_check_ddt.F90 b/test/unit_python/sample_files/write_init_files/phys_vars_init_check_ddt.F90 similarity index 100% rename from test/unit/sample_files/write_init_files/phys_vars_init_check_ddt.F90 rename to test/unit_python/sample_files/write_init_files/phys_vars_init_check_ddt.F90 diff --git a/test/unit/sample_files/write_init_files/phys_vars_init_check_ddt2.F90 b/test/unit_python/sample_files/write_init_files/phys_vars_init_check_ddt2.F90 similarity index 100% rename from test/unit/sample_files/write_init_files/phys_vars_init_check_ddt2.F90 rename to test/unit_python/sample_files/write_init_files/phys_vars_init_check_ddt2.F90 diff --git a/test/unit/sample_files/write_init_files/phys_vars_init_check_ddt_array.F90 b/test/unit_python/sample_files/write_init_files/phys_vars_init_check_ddt_array.F90 similarity index 100% rename from test/unit/sample_files/write_init_files/phys_vars_init_check_ddt_array.F90 rename to test/unit_python/sample_files/write_init_files/phys_vars_init_check_ddt_array.F90 diff --git a/test/unit/sample_files/write_init_files/phys_vars_init_check_host_var.F90 b/test/unit_python/sample_files/write_init_files/phys_vars_init_check_host_var.F90 similarity index 100% rename from test/unit/sample_files/write_init_files/phys_vars_init_check_host_var.F90 rename to test/unit_python/sample_files/write_init_files/phys_vars_init_check_host_var.F90 diff --git a/test/unit/sample_files/write_init_files/phys_vars_init_check_mf.F90 b/test/unit_python/sample_files/write_init_files/phys_vars_init_check_mf.F90 similarity index 100% rename from test/unit/sample_files/write_init_files/phys_vars_init_check_mf.F90 rename to test/unit_python/sample_files/write_init_files/phys_vars_init_check_mf.F90 diff --git a/test/unit/sample_files/write_init_files/phys_vars_init_check_no_horiz.F90 b/test/unit_python/sample_files/write_init_files/phys_vars_init_check_no_horiz.F90 similarity index 100% rename from test/unit/sample_files/write_init_files/phys_vars_init_check_no_horiz.F90 rename to test/unit_python/sample_files/write_init_files/phys_vars_init_check_no_horiz.F90 diff --git a/test/unit/sample_files/write_init_files/phys_vars_init_check_noreq.F90 b/test/unit_python/sample_files/write_init_files/phys_vars_init_check_noreq.F90 similarity index 100% rename from test/unit/sample_files/write_init_files/phys_vars_init_check_noreq.F90 rename to test/unit_python/sample_files/write_init_files/phys_vars_init_check_noreq.F90 diff --git a/test/unit/sample_files/write_init_files/phys_vars_init_check_param.F90 b/test/unit_python/sample_files/write_init_files/phys_vars_init_check_param.F90 similarity index 100% rename from test/unit/sample_files/write_init_files/phys_vars_init_check_param.F90 rename to test/unit_python/sample_files/write_init_files/phys_vars_init_check_param.F90 diff --git a/test/unit/sample_files/write_init_files/phys_vars_init_check_parameter.F90 b/test/unit_python/sample_files/write_init_files/phys_vars_init_check_parameter.F90 similarity index 100% rename from test/unit/sample_files/write_init_files/phys_vars_init_check_parameter.F90 rename to test/unit_python/sample_files/write_init_files/phys_vars_init_check_parameter.F90 diff --git a/test/unit/sample_files/write_init_files/phys_vars_init_check_protect.F90 b/test/unit_python/sample_files/write_init_files/phys_vars_init_check_protect.F90 similarity index 100% rename from test/unit/sample_files/write_init_files/phys_vars_init_check_protect.F90 rename to test/unit_python/sample_files/write_init_files/phys_vars_init_check_protect.F90 diff --git a/test/unit/sample_files/write_init_files/phys_vars_init_check_scalar.F90 b/test/unit_python/sample_files/write_init_files/phys_vars_init_check_scalar.F90 similarity index 100% rename from test/unit/sample_files/write_init_files/phys_vars_init_check_scalar.F90 rename to test/unit_python/sample_files/write_init_files/phys_vars_init_check_scalar.F90 diff --git a/test/unit/sample_files/write_init_files/phys_vars_init_check_simple.F90 b/test/unit_python/sample_files/write_init_files/phys_vars_init_check_simple.F90 similarity index 100% rename from test/unit/sample_files/write_init_files/phys_vars_init_check_simple.F90 rename to test/unit_python/sample_files/write_init_files/phys_vars_init_check_simple.F90 diff --git a/test/unit/sample_files/write_init_files/physics_inputs_4D.F90 b/test/unit_python/sample_files/write_init_files/physics_inputs_4D.F90 similarity index 100% rename from test/unit/sample_files/write_init_files/physics_inputs_4D.F90 rename to test/unit_python/sample_files/write_init_files/physics_inputs_4D.F90 diff --git a/test/unit/sample_files/write_init_files/physics_inputs_bvd.F90 b/test/unit_python/sample_files/write_init_files/physics_inputs_bvd.F90 similarity index 100% rename from test/unit/sample_files/write_init_files/physics_inputs_bvd.F90 rename to test/unit_python/sample_files/write_init_files/physics_inputs_bvd.F90 diff --git a/test/unit/sample_files/write_init_files/physics_inputs_cnst.F90 b/test/unit_python/sample_files/write_init_files/physics_inputs_cnst.F90 similarity index 100% rename from test/unit/sample_files/write_init_files/physics_inputs_cnst.F90 rename to test/unit_python/sample_files/write_init_files/physics_inputs_cnst.F90 diff --git a/test/unit/sample_files/write_init_files/physics_inputs_ddt.F90 b/test/unit_python/sample_files/write_init_files/physics_inputs_ddt.F90 similarity index 100% rename from test/unit/sample_files/write_init_files/physics_inputs_ddt.F90 rename to test/unit_python/sample_files/write_init_files/physics_inputs_ddt.F90 diff --git a/test/unit/sample_files/write_init_files/physics_inputs_ddt2.F90 b/test/unit_python/sample_files/write_init_files/physics_inputs_ddt2.F90 similarity index 100% rename from test/unit/sample_files/write_init_files/physics_inputs_ddt2.F90 rename to test/unit_python/sample_files/write_init_files/physics_inputs_ddt2.F90 diff --git a/test/unit/sample_files/write_init_files/physics_inputs_ddt_array.F90 b/test/unit_python/sample_files/write_init_files/physics_inputs_ddt_array.F90 similarity index 100% rename from test/unit/sample_files/write_init_files/physics_inputs_ddt_array.F90 rename to test/unit_python/sample_files/write_init_files/physics_inputs_ddt_array.F90 diff --git a/test/unit/sample_files/write_init_files/physics_inputs_host_var.F90 b/test/unit_python/sample_files/write_init_files/physics_inputs_host_var.F90 similarity index 100% rename from test/unit/sample_files/write_init_files/physics_inputs_host_var.F90 rename to test/unit_python/sample_files/write_init_files/physics_inputs_host_var.F90 diff --git a/test/unit/sample_files/write_init_files/physics_inputs_mf.F90 b/test/unit_python/sample_files/write_init_files/physics_inputs_mf.F90 similarity index 100% rename from test/unit/sample_files/write_init_files/physics_inputs_mf.F90 rename to test/unit_python/sample_files/write_init_files/physics_inputs_mf.F90 diff --git a/test/unit/sample_files/write_init_files/physics_inputs_no_horiz.F90 b/test/unit_python/sample_files/write_init_files/physics_inputs_no_horiz.F90 similarity index 100% rename from test/unit/sample_files/write_init_files/physics_inputs_no_horiz.F90 rename to test/unit_python/sample_files/write_init_files/physics_inputs_no_horiz.F90 diff --git a/test/unit/sample_files/write_init_files/physics_inputs_noreq.F90 b/test/unit_python/sample_files/write_init_files/physics_inputs_noreq.F90 similarity index 100% rename from test/unit/sample_files/write_init_files/physics_inputs_noreq.F90 rename to test/unit_python/sample_files/write_init_files/physics_inputs_noreq.F90 diff --git a/test/unit/sample_files/write_init_files/physics_inputs_param.F90 b/test/unit_python/sample_files/write_init_files/physics_inputs_param.F90 similarity index 100% rename from test/unit/sample_files/write_init_files/physics_inputs_param.F90 rename to test/unit_python/sample_files/write_init_files/physics_inputs_param.F90 diff --git a/test/unit/sample_files/write_init_files/physics_inputs_parameter.F90 b/test/unit_python/sample_files/write_init_files/physics_inputs_parameter.F90 similarity index 100% rename from test/unit/sample_files/write_init_files/physics_inputs_parameter.F90 rename to test/unit_python/sample_files/write_init_files/physics_inputs_parameter.F90 diff --git a/test/unit/sample_files/write_init_files/physics_inputs_protect.F90 b/test/unit_python/sample_files/write_init_files/physics_inputs_protect.F90 similarity index 100% rename from test/unit/sample_files/write_init_files/physics_inputs_protect.F90 rename to test/unit_python/sample_files/write_init_files/physics_inputs_protect.F90 diff --git a/test/unit/sample_files/write_init_files/physics_inputs_scalar.F90 b/test/unit_python/sample_files/write_init_files/physics_inputs_scalar.F90 similarity index 100% rename from test/unit/sample_files/write_init_files/physics_inputs_scalar.F90 rename to test/unit_python/sample_files/write_init_files/physics_inputs_scalar.F90 diff --git a/test/unit/sample_files/write_init_files/physics_inputs_simple.F90 b/test/unit_python/sample_files/write_init_files/physics_inputs_simple.F90 similarity index 100% rename from test/unit/sample_files/write_init_files/physics_inputs_simple.F90 rename to test/unit_python/sample_files/write_init_files/physics_inputs_simple.F90 diff --git a/test/unit/sample_files/write_init_files/protected_reg.xml b/test/unit_python/sample_files/write_init_files/protected_reg.xml similarity index 100% rename from test/unit/sample_files/write_init_files/protected_reg.xml rename to test/unit_python/sample_files/write_init_files/protected_reg.xml diff --git a/test/unit/sample_files/write_init_files/ref_theta.F90 b/test/unit_python/sample_files/write_init_files/ref_theta.F90 similarity index 100% rename from test/unit/sample_files/write_init_files/ref_theta.F90 rename to test/unit_python/sample_files/write_init_files/ref_theta.F90 diff --git a/test/unit/sample_files/write_init_files/ref_theta.meta b/test/unit_python/sample_files/write_init_files/ref_theta.meta similarity index 100% rename from test/unit/sample_files/write_init_files/ref_theta.meta rename to test/unit_python/sample_files/write_init_files/ref_theta.meta diff --git a/test/unit/sample_files/write_init_files/ref_two.F90 b/test/unit_python/sample_files/write_init_files/ref_two.F90 similarity index 100% rename from test/unit/sample_files/write_init_files/ref_two.F90 rename to test/unit_python/sample_files/write_init_files/ref_two.F90 diff --git a/test/unit/sample_files/write_init_files/ref_two.meta b/test/unit_python/sample_files/write_init_files/ref_two.meta similarity index 100% rename from test/unit/sample_files/write_init_files/ref_two.meta rename to test/unit_python/sample_files/write_init_files/ref_two.meta diff --git a/test/unit/sample_files/write_init_files/scalar_var_reg.xml b/test/unit_python/sample_files/write_init_files/scalar_var_reg.xml similarity index 100% rename from test/unit/sample_files/write_init_files/scalar_var_reg.xml rename to test/unit_python/sample_files/write_init_files/scalar_var_reg.xml diff --git a/test/unit/sample_files/write_init_files/simple_build_cache_template.xml b/test/unit_python/sample_files/write_init_files/simple_build_cache_template.xml similarity index 100% rename from test/unit/sample_files/write_init_files/simple_build_cache_template.xml rename to test/unit_python/sample_files/write_init_files/simple_build_cache_template.xml diff --git a/test/unit/sample_files/write_init_files/simple_host.F90 b/test/unit_python/sample_files/write_init_files/simple_host.F90 similarity index 100% rename from test/unit/sample_files/write_init_files/simple_host.F90 rename to test/unit_python/sample_files/write_init_files/simple_host.F90 diff --git a/test/unit/sample_files/write_init_files/simple_host.meta b/test/unit_python/sample_files/write_init_files/simple_host.meta similarity index 100% rename from test/unit/sample_files/write_init_files/simple_host.meta rename to test/unit_python/sample_files/write_init_files/simple_host.meta diff --git a/test/unit/sample_files/write_init_files/simple_reg.xml b/test/unit_python/sample_files/write_init_files/simple_reg.xml similarity index 100% rename from test/unit/sample_files/write_init_files/simple_reg.xml rename to test/unit_python/sample_files/write_init_files/simple_reg.xml diff --git a/test/unit/sample_files/write_init_files/suite_simple.xml b/test/unit_python/sample_files/write_init_files/suite_simple.xml similarity index 100% rename from test/unit/sample_files/write_init_files/suite_simple.xml rename to test/unit_python/sample_files/write_init_files/suite_simple.xml diff --git a/test/unit/sample_files/write_init_files/temp_adjust.F90 b/test/unit_python/sample_files/write_init_files/temp_adjust.F90 similarity index 100% rename from test/unit/sample_files/write_init_files/temp_adjust.F90 rename to test/unit_python/sample_files/write_init_files/temp_adjust.F90 diff --git a/test/unit/sample_files/write_init_files/temp_adjust.meta b/test/unit_python/sample_files/write_init_files/temp_adjust.meta similarity index 100% rename from test/unit/sample_files/write_init_files/temp_adjust.meta rename to test/unit_python/sample_files/write_init_files/temp_adjust.meta diff --git a/test/unit/sample_files/write_init_files/temp_adjust_4D.F90 b/test/unit_python/sample_files/write_init_files/temp_adjust_4D.F90 similarity index 100% rename from test/unit/sample_files/write_init_files/temp_adjust_4D.F90 rename to test/unit_python/sample_files/write_init_files/temp_adjust_4D.F90 diff --git a/test/unit/sample_files/write_init_files/temp_adjust_4D.meta b/test/unit_python/sample_files/write_init_files/temp_adjust_4D.meta similarity index 100% rename from test/unit/sample_files/write_init_files/temp_adjust_4D.meta rename to test/unit_python/sample_files/write_init_files/temp_adjust_4D.meta diff --git a/test/unit/sample_files/write_init_files/temp_adjust_bvd.F90 b/test/unit_python/sample_files/write_init_files/temp_adjust_bvd.F90 similarity index 100% rename from test/unit/sample_files/write_init_files/temp_adjust_bvd.F90 rename to test/unit_python/sample_files/write_init_files/temp_adjust_bvd.F90 diff --git a/test/unit/sample_files/write_init_files/temp_adjust_bvd.meta b/test/unit_python/sample_files/write_init_files/temp_adjust_bvd.meta similarity index 100% rename from test/unit/sample_files/write_init_files/temp_adjust_bvd.meta rename to test/unit_python/sample_files/write_init_files/temp_adjust_bvd.meta diff --git a/test/unit/sample_files/write_init_files/temp_adjust_cnst.F90 b/test/unit_python/sample_files/write_init_files/temp_adjust_cnst.F90 similarity index 100% rename from test/unit/sample_files/write_init_files/temp_adjust_cnst.F90 rename to test/unit_python/sample_files/write_init_files/temp_adjust_cnst.F90 diff --git a/test/unit/sample_files/write_init_files/temp_adjust_cnst.meta b/test/unit_python/sample_files/write_init_files/temp_adjust_cnst.meta similarity index 100% rename from test/unit/sample_files/write_init_files/temp_adjust_cnst.meta rename to test/unit_python/sample_files/write_init_files/temp_adjust_cnst.meta diff --git a/test/unit/sample_files/write_init_files/temp_adjust_no_horiz.F90 b/test/unit_python/sample_files/write_init_files/temp_adjust_no_horiz.F90 similarity index 100% rename from test/unit/sample_files/write_init_files/temp_adjust_no_horiz.F90 rename to test/unit_python/sample_files/write_init_files/temp_adjust_no_horiz.F90 diff --git a/test/unit/sample_files/write_init_files/temp_adjust_no_horiz.meta b/test/unit_python/sample_files/write_init_files/temp_adjust_no_horiz.meta similarity index 100% rename from test/unit/sample_files/write_init_files/temp_adjust_no_horiz.meta rename to test/unit_python/sample_files/write_init_files/temp_adjust_no_horiz.meta diff --git a/test/unit/sample_files/write_init_files/temp_adjust_noreq.F90 b/test/unit_python/sample_files/write_init_files/temp_adjust_noreq.F90 similarity index 100% rename from test/unit/sample_files/write_init_files/temp_adjust_noreq.F90 rename to test/unit_python/sample_files/write_init_files/temp_adjust_noreq.F90 diff --git a/test/unit/sample_files/write_init_files/temp_adjust_noreq.meta b/test/unit_python/sample_files/write_init_files/temp_adjust_noreq.meta similarity index 100% rename from test/unit/sample_files/write_init_files/temp_adjust_noreq.meta rename to test/unit_python/sample_files/write_init_files/temp_adjust_noreq.meta diff --git a/test/unit/sample_files/write_init_files/temp_adjust_param.F90 b/test/unit_python/sample_files/write_init_files/temp_adjust_param.F90 similarity index 100% rename from test/unit/sample_files/write_init_files/temp_adjust_param.F90 rename to test/unit_python/sample_files/write_init_files/temp_adjust_param.F90 diff --git a/test/unit/sample_files/write_init_files/temp_adjust_param.meta b/test/unit_python/sample_files/write_init_files/temp_adjust_param.meta similarity index 100% rename from test/unit/sample_files/write_init_files/temp_adjust_param.meta rename to test/unit_python/sample_files/write_init_files/temp_adjust_param.meta diff --git a/test/unit/sample_files/write_init_files/temp_adjust_scalar.F90 b/test/unit_python/sample_files/write_init_files/temp_adjust_scalar.F90 similarity index 100% rename from test/unit/sample_files/write_init_files/temp_adjust_scalar.F90 rename to test/unit_python/sample_files/write_init_files/temp_adjust_scalar.F90 diff --git a/test/unit/sample_files/write_init_files/temp_adjust_scalar.meta b/test/unit_python/sample_files/write_init_files/temp_adjust_scalar.meta similarity index 100% rename from test/unit/sample_files/write_init_files/temp_adjust_scalar.meta rename to test/unit_python/sample_files/write_init_files/temp_adjust_scalar.meta diff --git a/test/unit/sample_files/write_init_files/theta_ddt.F90 b/test/unit_python/sample_files/write_init_files/theta_ddt.F90 similarity index 100% rename from test/unit/sample_files/write_init_files/theta_ddt.F90 rename to test/unit_python/sample_files/write_init_files/theta_ddt.F90 diff --git a/test/unit/sample_files/write_init_files/theta_ddt.meta b/test/unit_python/sample_files/write_init_files/theta_ddt.meta similarity index 100% rename from test/unit/sample_files/write_init_files/theta_ddt.meta rename to test/unit_python/sample_files/write_init_files/theta_ddt.meta diff --git a/test/unit/sample_files/write_init_files/var_4D_reg.xml b/test/unit_python/sample_files/write_init_files/var_4D_reg.xml similarity index 100% rename from test/unit/sample_files/write_init_files/var_4D_reg.xml rename to test/unit_python/sample_files/write_init_files/var_4D_reg.xml diff --git a/test/unit/sample_files/write_init_files/var_bad_vertdim.xml b/test/unit_python/sample_files/write_init_files/var_bad_vertdim.xml similarity index 100% rename from test/unit/sample_files/write_init_files/var_bad_vertdim.xml rename to test/unit_python/sample_files/write_init_files/var_bad_vertdim.xml diff --git a/test/unit/test_atm_in_paramgen.py b/test/unit_python/test_atm_in_paramgen.py similarity index 100% rename from test/unit/test_atm_in_paramgen.py rename to test/unit_python/test_atm_in_paramgen.py diff --git a/test/unit/test_build_cache.py b/test/unit_python/test_build_cache.py similarity index 100% rename from test/unit/test_build_cache.py rename to test/unit_python/test_build_cache.py diff --git a/test/unit/test_cam_autogen.py b/test/unit_python/test_cam_autogen.py similarity index 100% rename from test/unit/test_cam_autogen.py rename to test/unit_python/test_cam_autogen.py diff --git a/test/unit/test_cam_config.py b/test/unit_python/test_cam_config.py similarity index 100% rename from test/unit/test_cam_config.py rename to test/unit_python/test_cam_config.py diff --git a/test/unit/test_create_readnl_files.py b/test/unit_python/test_create_readnl_files.py similarity index 98% rename from test/unit/test_create_readnl_files.py rename to test/unit_python/test_create_readnl_files.py index 5e92caf9..aa88551e 100644 --- a/test/unit/test_create_readnl_files.py +++ b/test/unit_python/test_create_readnl_files.py @@ -409,18 +409,18 @@ def test_double_namelist_def(self): # Check logger lmsgs = [("INFO:test_double_namelist_def:Reading CAM physics " \ "namelist definition file, ", - "test/unit/sample_files/banana_namelist.xml'"), + "test/unit_python/sample_files/banana_namelist.xml'"), ("INFO:test_double_namelist_def:Writing metadata file, ", "unit/tmp/namelist_files/banana_namelist.meta"), ("INFO:test_double_namelist_def:Writing Fortran module, ", "unit/tmp/namelist_files/banana_namelist.F90"), ("INFO:test_double_namelist_def:Reading CAM physics " \ "namelist definition file, ", - "test/unit/sample_files/kumquat_namelist.xml'"), + "test/unit_python/sample_files/kumquat_namelist.xml'"), ("INFO:test_double_namelist_def:Writing metadata file, ", - "test/unit/tmp/namelist_files/kumquat_namelist.meta"), + "test/unit_python/tmp/namelist_files/kumquat_namelist.meta"), ("INFO:test_double_namelist_def:Writing Fortran module, ", - "test/unit/tmp/namelist_files/kumquat_namelist.F90")] + "test/unit_python/tmp/namelist_files/kumquat_namelist.F90")] comp_lmsgs = cmp_log.output amsg = "Test failure: Number of log output messages, " \ f"{len(comp_lmsgs)} does not match what is expected, " \ diff --git a/test/unit/test_hist_config.py b/test/unit_python/test_hist_config.py similarity index 100% rename from test/unit/test_hist_config.py rename to test/unit_python/test_hist_config.py diff --git a/test/unit/test_registry.py b/test/unit_python/test_registry.py similarity index 100% rename from test/unit/test_registry.py rename to test/unit_python/test_registry.py diff --git a/test/unit/test_write_init_files.py b/test/unit_python/test_write_init_files.py similarity index 100% rename from test/unit/test_write_init_files.py rename to test/unit_python/test_write_init_files.py From fbd77acc922bc0445832b48a8eabbd320cc4b147 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Wed, 4 Dec 2024 22:51:56 -0700 Subject: [PATCH 15/44] Moving fortran tests from unit_fortran to unit/fortran --- .github/workflows/fortran_unit_tests.yml | 2 +- test/{unit_fortran => unit/fortran}/CMakeLists.txt | 0 .../fortran}/src/core_utils/CMakeLists.txt | 0 .../fortran}/src/core_utils/test_string_core_utils.pf | 0 4 files changed, 1 insertion(+), 1 deletion(-) rename test/{unit_fortran => unit/fortran}/CMakeLists.txt (100%) rename test/{unit_fortran => unit/fortran}/src/core_utils/CMakeLists.txt (100%) rename test/{unit_fortran => unit/fortran}/src/core_utils/test_string_core_utils.pf (100%) diff --git a/.github/workflows/fortran_unit_tests.yml b/.github/workflows/fortran_unit_tests.yml index 44368935..1ac749f4 100644 --- a/.github/workflows/fortran_unit_tests.yml +++ b/.github/workflows/fortran_unit_tests.yml @@ -33,7 +33,7 @@ jobs: -DCMAKE_PREFIX_PATH=/home/runner/work/CAM-SIMA/CAM-SIMA/pFUnit/build/installed \ -DCAM_SIMA_ENABLE_CODE_COVERAGE=ON \ -B./build \ - -S./test/unit_fortran + -S./test/unit/fortran cd build make diff --git a/test/unit_fortran/CMakeLists.txt b/test/unit/fortran/CMakeLists.txt similarity index 100% rename from test/unit_fortran/CMakeLists.txt rename to test/unit/fortran/CMakeLists.txt diff --git a/test/unit_fortran/src/core_utils/CMakeLists.txt b/test/unit/fortran/src/core_utils/CMakeLists.txt similarity index 100% rename from test/unit_fortran/src/core_utils/CMakeLists.txt rename to test/unit/fortran/src/core_utils/CMakeLists.txt diff --git a/test/unit_fortran/src/core_utils/test_string_core_utils.pf b/test/unit/fortran/src/core_utils/test_string_core_utils.pf similarity index 100% rename from test/unit_fortran/src/core_utils/test_string_core_utils.pf rename to test/unit/fortran/src/core_utils/test_string_core_utils.pf From c30bdf1041d34fb13600deed3e166c9338efe5d2 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Wed, 4 Dec 2024 22:57:25 -0700 Subject: [PATCH 16/44] Moving python tests from unit_python to unit/python --- .github/workflows/python_unit_tests.yml | 2 +- .gitignore | 2 +- test/run_unit_tests.sh | 16 ++++++++-------- test/{unit_python => unit/python}/.coveragerc | 0 .../sample_files/atm_in_files/test_attr_in | 0 .../atm_in_files/test_cmplx_array_atm_in | 0 .../atm_in_files/test_extra_nml_def.xml | 0 .../atm_in_files/test_extra_nml_same_group.xml | 0 .../atm_in_files/test_extra_nml_same_var.xml | 0 .../atm_in_files/test_missing_elems.xml | 0 .../sample_files/atm_in_files/test_multi_attr_in | 0 .../sample_files/atm_in_files/test_multi_xml_in | 0 .../atm_in_files/test_nl_duplicate_atm_in | 0 .../sample_files/atm_in_files/test_simple_atm_in | 0 .../atm_in_files/test_simple_nml_def.xml | 0 .../atm_in_files/test_third_nml_def.xml | 0 .../sample_files/atm_in_files/test_user_in | 0 .../atm_in_files/test_user_nl_allow_dupl_var | 0 .../atm_in_files/test_user_nl_bad_equals | 0 .../atm_in_files/test_user_nl_dupl_var | 0 .../atm_in_files/test_user_nl_no_equals | 0 .../atm_in_files/test_user_nl_simple | 0 .../atm_in_files/test_user_nl_undefined_var | 0 .../autogen_files/two_scheme_banana.F90 | 0 .../autogen_files/two_scheme_banana.meta | 0 .../autogen_files/two_scheme_banana_namelist.xml | 0 .../python}/sample_files/banana_namelist.xml | 0 .../bad_ccpp_tag_build_cache.xml | 0 .../bad_reg_tag_build_cache.xml | 0 .../bad_section_tag_build_cache.xml | 0 .../build_cache_files/example_build_cache.xml | 0 .../update_ccpp_build_cache.xml | 0 .../update_init_gen_build_cache.xml | 0 .../build_cache_files/update_reg_build_cache.xml | 0 .../hist_config_files/amwg_hist_config | 0 .../sample_files/hist_config_files/atm_in_flat | 0 .../sample_files/hist_config_files/atm_in_multi | 0 .../sample_files/hist_config_files/rad_config | 0 .../hist_config_files/user_nl_cam_flat | 0 .../hist_config_files/user_nl_cam_multi | 0 .../python}/sample_files/kumquat_namelist.xml | 0 .../namelist_files/banana_namelist.F90 | 0 .../namelist_files/banana_namelist.meta | 0 .../cam_ccpp_scheme_namelists_double_def.F90 | 0 .../cam_ccpp_scheme_namelists_single_def.F90 | 0 .../namelist_files/kumquat_namelist.F90 | 0 .../namelist_files/kumquat_namelist.meta | 0 .../sample_files/phys_types_dup_section.meta | 0 .../sample_files/phys_types_no_table.meta | 0 .../sample_files/physics_types_complete.F90 | 0 .../sample_files/physics_types_complete.meta | 0 .../python}/sample_files/physics_types_ddt2.F90 | 0 .../python}/sample_files/physics_types_ddt2.meta | 0 .../sample_files/physics_types_ddt_array.F90 | 0 .../sample_files/physics_types_ddt_array.meta | 0 .../sample_files/physics_types_ddt_eul.F90 | 0 .../sample_files/physics_types_ddt_eul.meta | 0 .../sample_files/physics_types_ddt_fv.F90 | 0 .../sample_files/physics_types_ddt_fv.meta | 0 .../sample_files/physics_types_ddt_se.F90 | 0 .../sample_files/physics_types_ddt_se.meta | 0 .../sample_files/physics_types_parameter.F90 | 0 .../sample_files/physics_types_parameter.meta | 0 .../sample_files/physics_types_simple.F90 | 0 .../sample_files/physics_types_simple.meta | 0 .../python}/sample_files/ref_pres.meta | 0 .../sample_files/ref_pres_SourceMods.meta | 0 .../python}/sample_files/reg_bad_xml.xml | 2 +- .../python}/sample_files/reg_good_complete.xml | 2 +- .../python}/sample_files/reg_good_ddt.xml | 0 .../python}/sample_files/reg_good_ddt2.xml | 0 .../python}/sample_files/reg_good_ddt_array.xml | 0 .../python}/sample_files/reg_good_mf.xml | 2 +- .../python}/sample_files/reg_good_simple.xml | 0 .../python}/sample_files/rotten_namelist.xml | 0 .../sample_files/write_init_files/ddt2_reg.xml | 0 .../write_init_files/ddt_array_reg.xml | 0 .../sample_files/write_init_files/ddt_reg.xml | 0 .../write_init_files/host_var_host.F90 | 0 .../write_init_files/host_var_host.meta | 0 .../write_init_files/host_var_reg.xml | 0 .../sample_files/write_init_files/mf_reg.xml | 2 +- .../write_init_files/missing_ICs_reg.xml | 0 .../write_init_files/no_horiz_dim_reg.xml | 0 .../write_init_files/no_req_var_reg.xml | 0 .../sample_files/write_init_files/param_reg.xml | 0 .../write_init_files/phys_vars_init_check_4D.F90 | 0 .../phys_vars_init_check_bvd.F90 | 0 .../phys_vars_init_check_cnst.F90 | 0 .../phys_vars_init_check_ddt.F90 | 0 .../phys_vars_init_check_ddt2.F90 | 0 .../phys_vars_init_check_ddt_array.F90 | 0 .../phys_vars_init_check_host_var.F90 | 0 .../write_init_files/phys_vars_init_check_mf.F90 | 0 .../phys_vars_init_check_no_horiz.F90 | 0 .../phys_vars_init_check_noreq.F90 | 0 .../phys_vars_init_check_param.F90 | 0 .../phys_vars_init_check_parameter.F90 | 0 .../phys_vars_init_check_protect.F90 | 0 .../phys_vars_init_check_scalar.F90 | 0 .../phys_vars_init_check_simple.F90 | 0 .../write_init_files/physics_inputs_4D.F90 | 0 .../write_init_files/physics_inputs_bvd.F90 | 0 .../write_init_files/physics_inputs_cnst.F90 | 0 .../write_init_files/physics_inputs_ddt.F90 | 0 .../write_init_files/physics_inputs_ddt2.F90 | 0 .../physics_inputs_ddt_array.F90 | 0 .../write_init_files/physics_inputs_host_var.F90 | 0 .../write_init_files/physics_inputs_mf.F90 | 0 .../write_init_files/physics_inputs_no_horiz.F90 | 0 .../write_init_files/physics_inputs_noreq.F90 | 0 .../write_init_files/physics_inputs_param.F90 | 0 .../physics_inputs_parameter.F90 | 0 .../write_init_files/physics_inputs_protect.F90 | 0 .../write_init_files/physics_inputs_scalar.F90 | 0 .../write_init_files/physics_inputs_simple.F90 | 0 .../write_init_files/protected_reg.xml | 0 .../sample_files/write_init_files/ref_theta.F90 | 0 .../sample_files/write_init_files/ref_theta.meta | 0 .../sample_files/write_init_files/ref_two.F90 | 0 .../sample_files/write_init_files/ref_two.meta | 0 .../write_init_files/scalar_var_reg.xml | 0 .../simple_build_cache_template.xml | 0 .../write_init_files/simple_host.F90 | 0 .../write_init_files/simple_host.meta | 0 .../sample_files/write_init_files/simple_reg.xml | 0 .../write_init_files/suite_simple.xml | 0 .../write_init_files/temp_adjust.F90 | 0 .../write_init_files/temp_adjust.meta | 0 .../write_init_files/temp_adjust_4D.F90 | 0 .../write_init_files/temp_adjust_4D.meta | 0 .../write_init_files/temp_adjust_bvd.F90 | 0 .../write_init_files/temp_adjust_bvd.meta | 0 .../write_init_files/temp_adjust_cnst.F90 | 0 .../write_init_files/temp_adjust_cnst.meta | 0 .../write_init_files/temp_adjust_no_horiz.F90 | 0 .../write_init_files/temp_adjust_no_horiz.meta | 0 .../write_init_files/temp_adjust_noreq.F90 | 0 .../write_init_files/temp_adjust_noreq.meta | 0 .../write_init_files/temp_adjust_param.F90 | 0 .../write_init_files/temp_adjust_param.meta | 0 .../write_init_files/temp_adjust_scalar.F90 | 0 .../write_init_files/temp_adjust_scalar.meta | 0 .../sample_files/write_init_files/theta_ddt.F90 | 0 .../sample_files/write_init_files/theta_ddt.meta | 0 .../sample_files/write_init_files/var_4D_reg.xml | 0 .../write_init_files/var_bad_vertdim.xml | 0 .../python}/test_atm_in_paramgen.py | 0 .../python}/test_build_cache.py | 0 .../python}/test_cam_autogen.py | 0 .../python}/test_cam_config.py | 0 .../python}/test_create_readnl_files.py | 8 ++++---- .../python}/test_hist_config.py | 0 .../python}/test_registry.py | 0 .../python}/test_write_init_files.py | 0 155 files changed, 18 insertions(+), 18 deletions(-) rename test/{unit_python => unit/python}/.coveragerc (100%) rename test/{unit_python => unit/python}/sample_files/atm_in_files/test_attr_in (100%) rename test/{unit_python => unit/python}/sample_files/atm_in_files/test_cmplx_array_atm_in (100%) rename test/{unit_python => unit/python}/sample_files/atm_in_files/test_extra_nml_def.xml (100%) rename test/{unit_python => unit/python}/sample_files/atm_in_files/test_extra_nml_same_group.xml (100%) rename test/{unit_python => unit/python}/sample_files/atm_in_files/test_extra_nml_same_var.xml (100%) rename test/{unit_python => unit/python}/sample_files/atm_in_files/test_missing_elems.xml (100%) rename test/{unit_python => unit/python}/sample_files/atm_in_files/test_multi_attr_in (100%) rename test/{unit_python => unit/python}/sample_files/atm_in_files/test_multi_xml_in (100%) rename test/{unit_python => unit/python}/sample_files/atm_in_files/test_nl_duplicate_atm_in (100%) rename test/{unit_python => unit/python}/sample_files/atm_in_files/test_simple_atm_in (100%) rename test/{unit_python => unit/python}/sample_files/atm_in_files/test_simple_nml_def.xml (100%) rename test/{unit_python => unit/python}/sample_files/atm_in_files/test_third_nml_def.xml (100%) rename test/{unit_python => unit/python}/sample_files/atm_in_files/test_user_in (100%) rename test/{unit_python => unit/python}/sample_files/atm_in_files/test_user_nl_allow_dupl_var (100%) rename test/{unit_python => unit/python}/sample_files/atm_in_files/test_user_nl_bad_equals (100%) rename test/{unit_python => unit/python}/sample_files/atm_in_files/test_user_nl_dupl_var (100%) rename test/{unit_python => unit/python}/sample_files/atm_in_files/test_user_nl_no_equals (100%) rename test/{unit_python => unit/python}/sample_files/atm_in_files/test_user_nl_simple (100%) rename test/{unit_python => unit/python}/sample_files/atm_in_files/test_user_nl_undefined_var (100%) rename test/{unit_python => unit/python}/sample_files/autogen_files/two_scheme_banana.F90 (100%) rename test/{unit_python => unit/python}/sample_files/autogen_files/two_scheme_banana.meta (100%) rename test/{unit_python => unit/python}/sample_files/autogen_files/two_scheme_banana_namelist.xml (100%) rename test/{unit_python => unit/python}/sample_files/banana_namelist.xml (100%) rename test/{unit_python => unit/python}/sample_files/build_cache_files/bad_ccpp_tag_build_cache.xml (100%) rename test/{unit_python => unit/python}/sample_files/build_cache_files/bad_reg_tag_build_cache.xml (100%) rename test/{unit_python => unit/python}/sample_files/build_cache_files/bad_section_tag_build_cache.xml (100%) rename test/{unit_python => unit/python}/sample_files/build_cache_files/example_build_cache.xml (100%) rename test/{unit_python => unit/python}/sample_files/build_cache_files/update_ccpp_build_cache.xml (100%) rename test/{unit_python => unit/python}/sample_files/build_cache_files/update_init_gen_build_cache.xml (100%) rename test/{unit_python => unit/python}/sample_files/build_cache_files/update_reg_build_cache.xml (100%) rename test/{unit_python => unit/python}/sample_files/hist_config_files/amwg_hist_config (100%) rename test/{unit_python => unit/python}/sample_files/hist_config_files/atm_in_flat (100%) rename test/{unit_python => unit/python}/sample_files/hist_config_files/atm_in_multi (100%) rename test/{unit_python => unit/python}/sample_files/hist_config_files/rad_config (100%) rename test/{unit_python => unit/python}/sample_files/hist_config_files/user_nl_cam_flat (100%) rename test/{unit_python => unit/python}/sample_files/hist_config_files/user_nl_cam_multi (100%) rename test/{unit_python => unit/python}/sample_files/kumquat_namelist.xml (100%) rename test/{unit_python => unit/python}/sample_files/namelist_files/banana_namelist.F90 (100%) rename test/{unit_python => unit/python}/sample_files/namelist_files/banana_namelist.meta (100%) rename test/{unit_python => unit/python}/sample_files/namelist_files/cam_ccpp_scheme_namelists_double_def.F90 (100%) rename test/{unit_python => unit/python}/sample_files/namelist_files/cam_ccpp_scheme_namelists_single_def.F90 (100%) rename test/{unit_python => unit/python}/sample_files/namelist_files/kumquat_namelist.F90 (100%) rename test/{unit_python => unit/python}/sample_files/namelist_files/kumquat_namelist.meta (100%) rename test/{unit_python => unit/python}/sample_files/phys_types_dup_section.meta (100%) rename test/{unit_python => unit/python}/sample_files/phys_types_no_table.meta (100%) rename test/{unit_python => unit/python}/sample_files/physics_types_complete.F90 (100%) rename test/{unit_python => unit/python}/sample_files/physics_types_complete.meta (100%) rename test/{unit_python => unit/python}/sample_files/physics_types_ddt2.F90 (100%) rename test/{unit_python => unit/python}/sample_files/physics_types_ddt2.meta (100%) rename test/{unit_python => unit/python}/sample_files/physics_types_ddt_array.F90 (100%) rename test/{unit_python => unit/python}/sample_files/physics_types_ddt_array.meta (100%) rename test/{unit_python => unit/python}/sample_files/physics_types_ddt_eul.F90 (100%) rename test/{unit_python => unit/python}/sample_files/physics_types_ddt_eul.meta (100%) rename test/{unit_python => unit/python}/sample_files/physics_types_ddt_fv.F90 (100%) rename test/{unit_python => unit/python}/sample_files/physics_types_ddt_fv.meta (100%) rename test/{unit_python => unit/python}/sample_files/physics_types_ddt_se.F90 (100%) rename test/{unit_python => unit/python}/sample_files/physics_types_ddt_se.meta (100%) rename test/{unit_python => unit/python}/sample_files/physics_types_parameter.F90 (100%) rename test/{unit_python => unit/python}/sample_files/physics_types_parameter.meta (100%) rename test/{unit_python => unit/python}/sample_files/physics_types_simple.F90 (100%) rename test/{unit_python => unit/python}/sample_files/physics_types_simple.meta (100%) rename test/{unit_python => unit/python}/sample_files/ref_pres.meta (100%) rename test/{unit_python => unit/python}/sample_files/ref_pres_SourceMods.meta (100%) rename test/{unit_python => unit/python}/sample_files/reg_bad_xml.xml (98%) rename test/{unit_python => unit/python}/sample_files/reg_good_complete.xml (98%) rename test/{unit_python => unit/python}/sample_files/reg_good_ddt.xml (100%) rename test/{unit_python => unit/python}/sample_files/reg_good_ddt2.xml (100%) rename test/{unit_python => unit/python}/sample_files/reg_good_ddt_array.xml (100%) rename test/{unit_python => unit/python}/sample_files/reg_good_mf.xml (97%) rename test/{unit_python => unit/python}/sample_files/reg_good_simple.xml (100%) rename test/{unit_python => unit/python}/sample_files/rotten_namelist.xml (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/ddt2_reg.xml (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/ddt_array_reg.xml (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/ddt_reg.xml (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/host_var_host.F90 (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/host_var_host.meta (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/host_var_reg.xml (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/mf_reg.xml (92%) rename test/{unit_python => unit/python}/sample_files/write_init_files/missing_ICs_reg.xml (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/no_horiz_dim_reg.xml (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/no_req_var_reg.xml (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/param_reg.xml (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/phys_vars_init_check_4D.F90 (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/phys_vars_init_check_bvd.F90 (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/phys_vars_init_check_cnst.F90 (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/phys_vars_init_check_ddt.F90 (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/phys_vars_init_check_ddt2.F90 (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/phys_vars_init_check_ddt_array.F90 (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/phys_vars_init_check_host_var.F90 (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/phys_vars_init_check_mf.F90 (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/phys_vars_init_check_no_horiz.F90 (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/phys_vars_init_check_noreq.F90 (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/phys_vars_init_check_param.F90 (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/phys_vars_init_check_parameter.F90 (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/phys_vars_init_check_protect.F90 (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/phys_vars_init_check_scalar.F90 (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/phys_vars_init_check_simple.F90 (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/physics_inputs_4D.F90 (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/physics_inputs_bvd.F90 (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/physics_inputs_cnst.F90 (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/physics_inputs_ddt.F90 (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/physics_inputs_ddt2.F90 (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/physics_inputs_ddt_array.F90 (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/physics_inputs_host_var.F90 (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/physics_inputs_mf.F90 (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/physics_inputs_no_horiz.F90 (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/physics_inputs_noreq.F90 (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/physics_inputs_param.F90 (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/physics_inputs_parameter.F90 (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/physics_inputs_protect.F90 (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/physics_inputs_scalar.F90 (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/physics_inputs_simple.F90 (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/protected_reg.xml (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/ref_theta.F90 (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/ref_theta.meta (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/ref_two.F90 (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/ref_two.meta (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/scalar_var_reg.xml (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/simple_build_cache_template.xml (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/simple_host.F90 (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/simple_host.meta (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/simple_reg.xml (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/suite_simple.xml (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/temp_adjust.F90 (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/temp_adjust.meta (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/temp_adjust_4D.F90 (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/temp_adjust_4D.meta (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/temp_adjust_bvd.F90 (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/temp_adjust_bvd.meta (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/temp_adjust_cnst.F90 (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/temp_adjust_cnst.meta (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/temp_adjust_no_horiz.F90 (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/temp_adjust_no_horiz.meta (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/temp_adjust_noreq.F90 (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/temp_adjust_noreq.meta (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/temp_adjust_param.F90 (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/temp_adjust_param.meta (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/temp_adjust_scalar.F90 (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/temp_adjust_scalar.meta (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/theta_ddt.F90 (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/theta_ddt.meta (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/var_4D_reg.xml (100%) rename test/{unit_python => unit/python}/sample_files/write_init_files/var_bad_vertdim.xml (100%) rename test/{unit_python => unit/python}/test_atm_in_paramgen.py (100%) rename test/{unit_python => unit/python}/test_build_cache.py (100%) rename test/{unit_python => unit/python}/test_cam_autogen.py (100%) rename test/{unit_python => unit/python}/test_cam_config.py (100%) rename test/{unit_python => unit/python}/test_create_readnl_files.py (98%) rename test/{unit_python => unit/python}/test_hist_config.py (100%) rename test/{unit_python => unit/python}/test_registry.py (100%) rename test/{unit_python => unit/python}/test_write_init_files.py (100%) diff --git a/.github/workflows/python_unit_tests.yml b/.github/workflows/python_unit_tests.yml index 7ac605b8..fb26d41c 100644 --- a/.github/workflows/python_unit_tests.yml +++ b/.github/workflows/python_unit_tests.yml @@ -57,4 +57,4 @@ jobs: pytest src/data --doctest-modules # Run all python unit tests: - pytest test/unit_python + pytest test/unit/python diff --git a/.gitignore b/.gitignore index 04af4cbc..c41adfd5 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,7 @@ buildnmlc # Ignore test output test/include/*.mod test/include/*.o -test/unit/tmp +test/unit/python/tmp test/system/*.log test/system/cime-tests.o* test_driver_*.sh diff --git a/test/run_unit_tests.sh b/test/run_unit_tests.sh index a8e7fe9d..ec4a9d78 100755 --- a/test/run_unit_tests.sh +++ b/test/run_unit_tests.sh @@ -69,21 +69,21 @@ run_doctest cime_config/atm_in_paramgen.py # CAM history config doctests: run_doctest cime_config/hist_config.py # CAM config unit tests: -run_unittest test/unit_python/test_cam_config.py +run_unittest test/unit/python/test_cam_config.py # CAM autogen unit tests: -run_unittest test/unit_python/test_cam_autogen.py +run_unittest test/unit/python/test_cam_autogen.py # CAM build cache unit tests: -run_unittest test/unit_python/test_build_cache.py +run_unittest test/unit/python/test_build_cache.py # Registry generator unit tests: -run_unittest test/unit_python/test_registry.py +run_unittest test/unit/python/test_registry.py # Namelist reader autogeneration unit tests -run_unittest test/unit_python/test_create_readnl_files.py +run_unittest test/unit/python/test_create_readnl_files.py # Physics variable init (phys_init) generator unit tests: -run_unittest test/unit_python/test_write_init_files.py +run_unittest test/unit/python/test_write_init_files.py # ParamGen atm_in namelist writer unit tests: -run_unittest test/unit_python/test_atm_in_paramgen.py +run_unittest test/unit/python/test_atm_in_paramgen.py # CAM history config unit tests -run_unittest test/unit_python/test_hist_config.py +run_unittest test/unit/python/test_hist_config.py # Report if [ ${NUMERRORS} -gt 0 ]; then diff --git a/test/unit_python/.coveragerc b/test/unit/python/.coveragerc similarity index 100% rename from test/unit_python/.coveragerc rename to test/unit/python/.coveragerc diff --git a/test/unit_python/sample_files/atm_in_files/test_attr_in b/test/unit/python/sample_files/atm_in_files/test_attr_in similarity index 100% rename from test/unit_python/sample_files/atm_in_files/test_attr_in rename to test/unit/python/sample_files/atm_in_files/test_attr_in diff --git a/test/unit_python/sample_files/atm_in_files/test_cmplx_array_atm_in b/test/unit/python/sample_files/atm_in_files/test_cmplx_array_atm_in similarity index 100% rename from test/unit_python/sample_files/atm_in_files/test_cmplx_array_atm_in rename to test/unit/python/sample_files/atm_in_files/test_cmplx_array_atm_in diff --git a/test/unit_python/sample_files/atm_in_files/test_extra_nml_def.xml b/test/unit/python/sample_files/atm_in_files/test_extra_nml_def.xml similarity index 100% rename from test/unit_python/sample_files/atm_in_files/test_extra_nml_def.xml rename to test/unit/python/sample_files/atm_in_files/test_extra_nml_def.xml diff --git a/test/unit_python/sample_files/atm_in_files/test_extra_nml_same_group.xml b/test/unit/python/sample_files/atm_in_files/test_extra_nml_same_group.xml similarity index 100% rename from test/unit_python/sample_files/atm_in_files/test_extra_nml_same_group.xml rename to test/unit/python/sample_files/atm_in_files/test_extra_nml_same_group.xml diff --git a/test/unit_python/sample_files/atm_in_files/test_extra_nml_same_var.xml b/test/unit/python/sample_files/atm_in_files/test_extra_nml_same_var.xml similarity index 100% rename from test/unit_python/sample_files/atm_in_files/test_extra_nml_same_var.xml rename to test/unit/python/sample_files/atm_in_files/test_extra_nml_same_var.xml diff --git a/test/unit_python/sample_files/atm_in_files/test_missing_elems.xml b/test/unit/python/sample_files/atm_in_files/test_missing_elems.xml similarity index 100% rename from test/unit_python/sample_files/atm_in_files/test_missing_elems.xml rename to test/unit/python/sample_files/atm_in_files/test_missing_elems.xml diff --git a/test/unit_python/sample_files/atm_in_files/test_multi_attr_in b/test/unit/python/sample_files/atm_in_files/test_multi_attr_in similarity index 100% rename from test/unit_python/sample_files/atm_in_files/test_multi_attr_in rename to test/unit/python/sample_files/atm_in_files/test_multi_attr_in diff --git a/test/unit_python/sample_files/atm_in_files/test_multi_xml_in b/test/unit/python/sample_files/atm_in_files/test_multi_xml_in similarity index 100% rename from test/unit_python/sample_files/atm_in_files/test_multi_xml_in rename to test/unit/python/sample_files/atm_in_files/test_multi_xml_in diff --git a/test/unit_python/sample_files/atm_in_files/test_nl_duplicate_atm_in b/test/unit/python/sample_files/atm_in_files/test_nl_duplicate_atm_in similarity index 100% rename from test/unit_python/sample_files/atm_in_files/test_nl_duplicate_atm_in rename to test/unit/python/sample_files/atm_in_files/test_nl_duplicate_atm_in diff --git a/test/unit_python/sample_files/atm_in_files/test_simple_atm_in b/test/unit/python/sample_files/atm_in_files/test_simple_atm_in similarity index 100% rename from test/unit_python/sample_files/atm_in_files/test_simple_atm_in rename to test/unit/python/sample_files/atm_in_files/test_simple_atm_in diff --git a/test/unit_python/sample_files/atm_in_files/test_simple_nml_def.xml b/test/unit/python/sample_files/atm_in_files/test_simple_nml_def.xml similarity index 100% rename from test/unit_python/sample_files/atm_in_files/test_simple_nml_def.xml rename to test/unit/python/sample_files/atm_in_files/test_simple_nml_def.xml diff --git a/test/unit_python/sample_files/atm_in_files/test_third_nml_def.xml b/test/unit/python/sample_files/atm_in_files/test_third_nml_def.xml similarity index 100% rename from test/unit_python/sample_files/atm_in_files/test_third_nml_def.xml rename to test/unit/python/sample_files/atm_in_files/test_third_nml_def.xml diff --git a/test/unit_python/sample_files/atm_in_files/test_user_in b/test/unit/python/sample_files/atm_in_files/test_user_in similarity index 100% rename from test/unit_python/sample_files/atm_in_files/test_user_in rename to test/unit/python/sample_files/atm_in_files/test_user_in diff --git a/test/unit_python/sample_files/atm_in_files/test_user_nl_allow_dupl_var b/test/unit/python/sample_files/atm_in_files/test_user_nl_allow_dupl_var similarity index 100% rename from test/unit_python/sample_files/atm_in_files/test_user_nl_allow_dupl_var rename to test/unit/python/sample_files/atm_in_files/test_user_nl_allow_dupl_var diff --git a/test/unit_python/sample_files/atm_in_files/test_user_nl_bad_equals b/test/unit/python/sample_files/atm_in_files/test_user_nl_bad_equals similarity index 100% rename from test/unit_python/sample_files/atm_in_files/test_user_nl_bad_equals rename to test/unit/python/sample_files/atm_in_files/test_user_nl_bad_equals diff --git a/test/unit_python/sample_files/atm_in_files/test_user_nl_dupl_var b/test/unit/python/sample_files/atm_in_files/test_user_nl_dupl_var similarity index 100% rename from test/unit_python/sample_files/atm_in_files/test_user_nl_dupl_var rename to test/unit/python/sample_files/atm_in_files/test_user_nl_dupl_var diff --git a/test/unit_python/sample_files/atm_in_files/test_user_nl_no_equals b/test/unit/python/sample_files/atm_in_files/test_user_nl_no_equals similarity index 100% rename from test/unit_python/sample_files/atm_in_files/test_user_nl_no_equals rename to test/unit/python/sample_files/atm_in_files/test_user_nl_no_equals diff --git a/test/unit_python/sample_files/atm_in_files/test_user_nl_simple b/test/unit/python/sample_files/atm_in_files/test_user_nl_simple similarity index 100% rename from test/unit_python/sample_files/atm_in_files/test_user_nl_simple rename to test/unit/python/sample_files/atm_in_files/test_user_nl_simple diff --git a/test/unit_python/sample_files/atm_in_files/test_user_nl_undefined_var b/test/unit/python/sample_files/atm_in_files/test_user_nl_undefined_var similarity index 100% rename from test/unit_python/sample_files/atm_in_files/test_user_nl_undefined_var rename to test/unit/python/sample_files/atm_in_files/test_user_nl_undefined_var diff --git a/test/unit_python/sample_files/autogen_files/two_scheme_banana.F90 b/test/unit/python/sample_files/autogen_files/two_scheme_banana.F90 similarity index 100% rename from test/unit_python/sample_files/autogen_files/two_scheme_banana.F90 rename to test/unit/python/sample_files/autogen_files/two_scheme_banana.F90 diff --git a/test/unit_python/sample_files/autogen_files/two_scheme_banana.meta b/test/unit/python/sample_files/autogen_files/two_scheme_banana.meta similarity index 100% rename from test/unit_python/sample_files/autogen_files/two_scheme_banana.meta rename to test/unit/python/sample_files/autogen_files/two_scheme_banana.meta diff --git a/test/unit_python/sample_files/autogen_files/two_scheme_banana_namelist.xml b/test/unit/python/sample_files/autogen_files/two_scheme_banana_namelist.xml similarity index 100% rename from test/unit_python/sample_files/autogen_files/two_scheme_banana_namelist.xml rename to test/unit/python/sample_files/autogen_files/two_scheme_banana_namelist.xml diff --git a/test/unit_python/sample_files/banana_namelist.xml b/test/unit/python/sample_files/banana_namelist.xml similarity index 100% rename from test/unit_python/sample_files/banana_namelist.xml rename to test/unit/python/sample_files/banana_namelist.xml diff --git a/test/unit_python/sample_files/build_cache_files/bad_ccpp_tag_build_cache.xml b/test/unit/python/sample_files/build_cache_files/bad_ccpp_tag_build_cache.xml similarity index 100% rename from test/unit_python/sample_files/build_cache_files/bad_ccpp_tag_build_cache.xml rename to test/unit/python/sample_files/build_cache_files/bad_ccpp_tag_build_cache.xml diff --git a/test/unit_python/sample_files/build_cache_files/bad_reg_tag_build_cache.xml b/test/unit/python/sample_files/build_cache_files/bad_reg_tag_build_cache.xml similarity index 100% rename from test/unit_python/sample_files/build_cache_files/bad_reg_tag_build_cache.xml rename to test/unit/python/sample_files/build_cache_files/bad_reg_tag_build_cache.xml diff --git a/test/unit_python/sample_files/build_cache_files/bad_section_tag_build_cache.xml b/test/unit/python/sample_files/build_cache_files/bad_section_tag_build_cache.xml similarity index 100% rename from test/unit_python/sample_files/build_cache_files/bad_section_tag_build_cache.xml rename to test/unit/python/sample_files/build_cache_files/bad_section_tag_build_cache.xml diff --git a/test/unit_python/sample_files/build_cache_files/example_build_cache.xml b/test/unit/python/sample_files/build_cache_files/example_build_cache.xml similarity index 100% rename from test/unit_python/sample_files/build_cache_files/example_build_cache.xml rename to test/unit/python/sample_files/build_cache_files/example_build_cache.xml diff --git a/test/unit_python/sample_files/build_cache_files/update_ccpp_build_cache.xml b/test/unit/python/sample_files/build_cache_files/update_ccpp_build_cache.xml similarity index 100% rename from test/unit_python/sample_files/build_cache_files/update_ccpp_build_cache.xml rename to test/unit/python/sample_files/build_cache_files/update_ccpp_build_cache.xml diff --git a/test/unit_python/sample_files/build_cache_files/update_init_gen_build_cache.xml b/test/unit/python/sample_files/build_cache_files/update_init_gen_build_cache.xml similarity index 100% rename from test/unit_python/sample_files/build_cache_files/update_init_gen_build_cache.xml rename to test/unit/python/sample_files/build_cache_files/update_init_gen_build_cache.xml diff --git a/test/unit_python/sample_files/build_cache_files/update_reg_build_cache.xml b/test/unit/python/sample_files/build_cache_files/update_reg_build_cache.xml similarity index 100% rename from test/unit_python/sample_files/build_cache_files/update_reg_build_cache.xml rename to test/unit/python/sample_files/build_cache_files/update_reg_build_cache.xml diff --git a/test/unit_python/sample_files/hist_config_files/amwg_hist_config b/test/unit/python/sample_files/hist_config_files/amwg_hist_config similarity index 100% rename from test/unit_python/sample_files/hist_config_files/amwg_hist_config rename to test/unit/python/sample_files/hist_config_files/amwg_hist_config diff --git a/test/unit_python/sample_files/hist_config_files/atm_in_flat b/test/unit/python/sample_files/hist_config_files/atm_in_flat similarity index 100% rename from test/unit_python/sample_files/hist_config_files/atm_in_flat rename to test/unit/python/sample_files/hist_config_files/atm_in_flat diff --git a/test/unit_python/sample_files/hist_config_files/atm_in_multi b/test/unit/python/sample_files/hist_config_files/atm_in_multi similarity index 100% rename from test/unit_python/sample_files/hist_config_files/atm_in_multi rename to test/unit/python/sample_files/hist_config_files/atm_in_multi diff --git a/test/unit_python/sample_files/hist_config_files/rad_config b/test/unit/python/sample_files/hist_config_files/rad_config similarity index 100% rename from test/unit_python/sample_files/hist_config_files/rad_config rename to test/unit/python/sample_files/hist_config_files/rad_config diff --git a/test/unit_python/sample_files/hist_config_files/user_nl_cam_flat b/test/unit/python/sample_files/hist_config_files/user_nl_cam_flat similarity index 100% rename from test/unit_python/sample_files/hist_config_files/user_nl_cam_flat rename to test/unit/python/sample_files/hist_config_files/user_nl_cam_flat diff --git a/test/unit_python/sample_files/hist_config_files/user_nl_cam_multi b/test/unit/python/sample_files/hist_config_files/user_nl_cam_multi similarity index 100% rename from test/unit_python/sample_files/hist_config_files/user_nl_cam_multi rename to test/unit/python/sample_files/hist_config_files/user_nl_cam_multi diff --git a/test/unit_python/sample_files/kumquat_namelist.xml b/test/unit/python/sample_files/kumquat_namelist.xml similarity index 100% rename from test/unit_python/sample_files/kumquat_namelist.xml rename to test/unit/python/sample_files/kumquat_namelist.xml diff --git a/test/unit_python/sample_files/namelist_files/banana_namelist.F90 b/test/unit/python/sample_files/namelist_files/banana_namelist.F90 similarity index 100% rename from test/unit_python/sample_files/namelist_files/banana_namelist.F90 rename to test/unit/python/sample_files/namelist_files/banana_namelist.F90 diff --git a/test/unit_python/sample_files/namelist_files/banana_namelist.meta b/test/unit/python/sample_files/namelist_files/banana_namelist.meta similarity index 100% rename from test/unit_python/sample_files/namelist_files/banana_namelist.meta rename to test/unit/python/sample_files/namelist_files/banana_namelist.meta diff --git a/test/unit_python/sample_files/namelist_files/cam_ccpp_scheme_namelists_double_def.F90 b/test/unit/python/sample_files/namelist_files/cam_ccpp_scheme_namelists_double_def.F90 similarity index 100% rename from test/unit_python/sample_files/namelist_files/cam_ccpp_scheme_namelists_double_def.F90 rename to test/unit/python/sample_files/namelist_files/cam_ccpp_scheme_namelists_double_def.F90 diff --git a/test/unit_python/sample_files/namelist_files/cam_ccpp_scheme_namelists_single_def.F90 b/test/unit/python/sample_files/namelist_files/cam_ccpp_scheme_namelists_single_def.F90 similarity index 100% rename from test/unit_python/sample_files/namelist_files/cam_ccpp_scheme_namelists_single_def.F90 rename to test/unit/python/sample_files/namelist_files/cam_ccpp_scheme_namelists_single_def.F90 diff --git a/test/unit_python/sample_files/namelist_files/kumquat_namelist.F90 b/test/unit/python/sample_files/namelist_files/kumquat_namelist.F90 similarity index 100% rename from test/unit_python/sample_files/namelist_files/kumquat_namelist.F90 rename to test/unit/python/sample_files/namelist_files/kumquat_namelist.F90 diff --git a/test/unit_python/sample_files/namelist_files/kumquat_namelist.meta b/test/unit/python/sample_files/namelist_files/kumquat_namelist.meta similarity index 100% rename from test/unit_python/sample_files/namelist_files/kumquat_namelist.meta rename to test/unit/python/sample_files/namelist_files/kumquat_namelist.meta diff --git a/test/unit_python/sample_files/phys_types_dup_section.meta b/test/unit/python/sample_files/phys_types_dup_section.meta similarity index 100% rename from test/unit_python/sample_files/phys_types_dup_section.meta rename to test/unit/python/sample_files/phys_types_dup_section.meta diff --git a/test/unit_python/sample_files/phys_types_no_table.meta b/test/unit/python/sample_files/phys_types_no_table.meta similarity index 100% rename from test/unit_python/sample_files/phys_types_no_table.meta rename to test/unit/python/sample_files/phys_types_no_table.meta diff --git a/test/unit_python/sample_files/physics_types_complete.F90 b/test/unit/python/sample_files/physics_types_complete.F90 similarity index 100% rename from test/unit_python/sample_files/physics_types_complete.F90 rename to test/unit/python/sample_files/physics_types_complete.F90 diff --git a/test/unit_python/sample_files/physics_types_complete.meta b/test/unit/python/sample_files/physics_types_complete.meta similarity index 100% rename from test/unit_python/sample_files/physics_types_complete.meta rename to test/unit/python/sample_files/physics_types_complete.meta diff --git a/test/unit_python/sample_files/physics_types_ddt2.F90 b/test/unit/python/sample_files/physics_types_ddt2.F90 similarity index 100% rename from test/unit_python/sample_files/physics_types_ddt2.F90 rename to test/unit/python/sample_files/physics_types_ddt2.F90 diff --git a/test/unit_python/sample_files/physics_types_ddt2.meta b/test/unit/python/sample_files/physics_types_ddt2.meta similarity index 100% rename from test/unit_python/sample_files/physics_types_ddt2.meta rename to test/unit/python/sample_files/physics_types_ddt2.meta diff --git a/test/unit_python/sample_files/physics_types_ddt_array.F90 b/test/unit/python/sample_files/physics_types_ddt_array.F90 similarity index 100% rename from test/unit_python/sample_files/physics_types_ddt_array.F90 rename to test/unit/python/sample_files/physics_types_ddt_array.F90 diff --git a/test/unit_python/sample_files/physics_types_ddt_array.meta b/test/unit/python/sample_files/physics_types_ddt_array.meta similarity index 100% rename from test/unit_python/sample_files/physics_types_ddt_array.meta rename to test/unit/python/sample_files/physics_types_ddt_array.meta diff --git a/test/unit_python/sample_files/physics_types_ddt_eul.F90 b/test/unit/python/sample_files/physics_types_ddt_eul.F90 similarity index 100% rename from test/unit_python/sample_files/physics_types_ddt_eul.F90 rename to test/unit/python/sample_files/physics_types_ddt_eul.F90 diff --git a/test/unit_python/sample_files/physics_types_ddt_eul.meta b/test/unit/python/sample_files/physics_types_ddt_eul.meta similarity index 100% rename from test/unit_python/sample_files/physics_types_ddt_eul.meta rename to test/unit/python/sample_files/physics_types_ddt_eul.meta diff --git a/test/unit_python/sample_files/physics_types_ddt_fv.F90 b/test/unit/python/sample_files/physics_types_ddt_fv.F90 similarity index 100% rename from test/unit_python/sample_files/physics_types_ddt_fv.F90 rename to test/unit/python/sample_files/physics_types_ddt_fv.F90 diff --git a/test/unit_python/sample_files/physics_types_ddt_fv.meta b/test/unit/python/sample_files/physics_types_ddt_fv.meta similarity index 100% rename from test/unit_python/sample_files/physics_types_ddt_fv.meta rename to test/unit/python/sample_files/physics_types_ddt_fv.meta diff --git a/test/unit_python/sample_files/physics_types_ddt_se.F90 b/test/unit/python/sample_files/physics_types_ddt_se.F90 similarity index 100% rename from test/unit_python/sample_files/physics_types_ddt_se.F90 rename to test/unit/python/sample_files/physics_types_ddt_se.F90 diff --git a/test/unit_python/sample_files/physics_types_ddt_se.meta b/test/unit/python/sample_files/physics_types_ddt_se.meta similarity index 100% rename from test/unit_python/sample_files/physics_types_ddt_se.meta rename to test/unit/python/sample_files/physics_types_ddt_se.meta diff --git a/test/unit_python/sample_files/physics_types_parameter.F90 b/test/unit/python/sample_files/physics_types_parameter.F90 similarity index 100% rename from test/unit_python/sample_files/physics_types_parameter.F90 rename to test/unit/python/sample_files/physics_types_parameter.F90 diff --git a/test/unit_python/sample_files/physics_types_parameter.meta b/test/unit/python/sample_files/physics_types_parameter.meta similarity index 100% rename from test/unit_python/sample_files/physics_types_parameter.meta rename to test/unit/python/sample_files/physics_types_parameter.meta diff --git a/test/unit_python/sample_files/physics_types_simple.F90 b/test/unit/python/sample_files/physics_types_simple.F90 similarity index 100% rename from test/unit_python/sample_files/physics_types_simple.F90 rename to test/unit/python/sample_files/physics_types_simple.F90 diff --git a/test/unit_python/sample_files/physics_types_simple.meta b/test/unit/python/sample_files/physics_types_simple.meta similarity index 100% rename from test/unit_python/sample_files/physics_types_simple.meta rename to test/unit/python/sample_files/physics_types_simple.meta diff --git a/test/unit_python/sample_files/ref_pres.meta b/test/unit/python/sample_files/ref_pres.meta similarity index 100% rename from test/unit_python/sample_files/ref_pres.meta rename to test/unit/python/sample_files/ref_pres.meta diff --git a/test/unit_python/sample_files/ref_pres_SourceMods.meta b/test/unit/python/sample_files/ref_pres_SourceMods.meta similarity index 100% rename from test/unit_python/sample_files/ref_pres_SourceMods.meta rename to test/unit/python/sample_files/ref_pres_SourceMods.meta diff --git a/test/unit_python/sample_files/reg_bad_xml.xml b/test/unit/python/sample_files/reg_bad_xml.xml similarity index 98% rename from test/unit_python/sample_files/reg_bad_xml.xml rename to test/unit/python/sample_files/reg_bad_xml.xml index 178ea495..57c5a178 100644 --- a/test/unit_python/sample_files/reg_bad_xml.xml +++ b/test/unit/python/sample_files/reg_bad_xml.xml @@ -106,5 +106,5 @@ Physics state variables updated by dynamical core - $SRCROOT/test/unit_python/sample_files/ref_pres.meta + $SRCROOT/test/unit/python/sample_files/ref_pres.meta diff --git a/test/unit_python/sample_files/reg_good_complete.xml b/test/unit/python/sample_files/reg_good_complete.xml similarity index 98% rename from test/unit_python/sample_files/reg_good_complete.xml rename to test/unit/python/sample_files/reg_good_complete.xml index dfc8b067..9ef13746 100644 --- a/test/unit_python/sample_files/reg_good_complete.xml +++ b/test/unit/python/sample_files/reg_good_complete.xml @@ -106,5 +106,5 @@ Physics state variables updated by dynamical core - $SRCROOT/test/unit_python/sample_files/ref_pres.meta + $SRCROOT/test/unit/python/sample_files/ref_pres.meta diff --git a/test/unit_python/sample_files/reg_good_ddt.xml b/test/unit/python/sample_files/reg_good_ddt.xml similarity index 100% rename from test/unit_python/sample_files/reg_good_ddt.xml rename to test/unit/python/sample_files/reg_good_ddt.xml diff --git a/test/unit_python/sample_files/reg_good_ddt2.xml b/test/unit/python/sample_files/reg_good_ddt2.xml similarity index 100% rename from test/unit_python/sample_files/reg_good_ddt2.xml rename to test/unit/python/sample_files/reg_good_ddt2.xml diff --git a/test/unit_python/sample_files/reg_good_ddt_array.xml b/test/unit/python/sample_files/reg_good_ddt_array.xml similarity index 100% rename from test/unit_python/sample_files/reg_good_ddt_array.xml rename to test/unit/python/sample_files/reg_good_ddt_array.xml diff --git a/test/unit_python/sample_files/reg_good_mf.xml b/test/unit/python/sample_files/reg_good_mf.xml similarity index 97% rename from test/unit_python/sample_files/reg_good_mf.xml rename to test/unit/python/sample_files/reg_good_mf.xml index c534fc20..d39f356e 100644 --- a/test/unit_python/sample_files/reg_good_mf.xml +++ b/test/unit/python/sample_files/reg_good_mf.xml @@ -41,5 +41,5 @@ Physics state variables updated by dynamical core - $SRCROOT/test/unit_python/sample_files/ref_pres.meta + $SRCROOT/test/unit/python/sample_files/ref_pres.meta diff --git a/test/unit_python/sample_files/reg_good_simple.xml b/test/unit/python/sample_files/reg_good_simple.xml similarity index 100% rename from test/unit_python/sample_files/reg_good_simple.xml rename to test/unit/python/sample_files/reg_good_simple.xml diff --git a/test/unit_python/sample_files/rotten_namelist.xml b/test/unit/python/sample_files/rotten_namelist.xml similarity index 100% rename from test/unit_python/sample_files/rotten_namelist.xml rename to test/unit/python/sample_files/rotten_namelist.xml diff --git a/test/unit_python/sample_files/write_init_files/ddt2_reg.xml b/test/unit/python/sample_files/write_init_files/ddt2_reg.xml similarity index 100% rename from test/unit_python/sample_files/write_init_files/ddt2_reg.xml rename to test/unit/python/sample_files/write_init_files/ddt2_reg.xml diff --git a/test/unit_python/sample_files/write_init_files/ddt_array_reg.xml b/test/unit/python/sample_files/write_init_files/ddt_array_reg.xml similarity index 100% rename from test/unit_python/sample_files/write_init_files/ddt_array_reg.xml rename to test/unit/python/sample_files/write_init_files/ddt_array_reg.xml diff --git a/test/unit_python/sample_files/write_init_files/ddt_reg.xml b/test/unit/python/sample_files/write_init_files/ddt_reg.xml similarity index 100% rename from test/unit_python/sample_files/write_init_files/ddt_reg.xml rename to test/unit/python/sample_files/write_init_files/ddt_reg.xml diff --git a/test/unit_python/sample_files/write_init_files/host_var_host.F90 b/test/unit/python/sample_files/write_init_files/host_var_host.F90 similarity index 100% rename from test/unit_python/sample_files/write_init_files/host_var_host.F90 rename to test/unit/python/sample_files/write_init_files/host_var_host.F90 diff --git a/test/unit_python/sample_files/write_init_files/host_var_host.meta b/test/unit/python/sample_files/write_init_files/host_var_host.meta similarity index 100% rename from test/unit_python/sample_files/write_init_files/host_var_host.meta rename to test/unit/python/sample_files/write_init_files/host_var_host.meta diff --git a/test/unit_python/sample_files/write_init_files/host_var_reg.xml b/test/unit/python/sample_files/write_init_files/host_var_reg.xml similarity index 100% rename from test/unit_python/sample_files/write_init_files/host_var_reg.xml rename to test/unit/python/sample_files/write_init_files/host_var_reg.xml diff --git a/test/unit_python/sample_files/write_init_files/mf_reg.xml b/test/unit/python/sample_files/write_init_files/mf_reg.xml similarity index 92% rename from test/unit_python/sample_files/write_init_files/mf_reg.xml rename to test/unit/python/sample_files/write_init_files/mf_reg.xml index 8b274f92..e39c9eaf 100644 --- a/test/unit_python/sample_files/write_init_files/mf_reg.xml +++ b/test/unit/python/sample_files/write_init_files/mf_reg.xml @@ -14,5 +14,5 @@ eddy_len - $SRCROOT/test/unit_python/sample_files/write_init_files/ref_theta.meta + $SRCROOT/test/unit/python/sample_files/write_init_files/ref_theta.meta diff --git a/test/unit_python/sample_files/write_init_files/missing_ICs_reg.xml b/test/unit/python/sample_files/write_init_files/missing_ICs_reg.xml similarity index 100% rename from test/unit_python/sample_files/write_init_files/missing_ICs_reg.xml rename to test/unit/python/sample_files/write_init_files/missing_ICs_reg.xml diff --git a/test/unit_python/sample_files/write_init_files/no_horiz_dim_reg.xml b/test/unit/python/sample_files/write_init_files/no_horiz_dim_reg.xml similarity index 100% rename from test/unit_python/sample_files/write_init_files/no_horiz_dim_reg.xml rename to test/unit/python/sample_files/write_init_files/no_horiz_dim_reg.xml diff --git a/test/unit_python/sample_files/write_init_files/no_req_var_reg.xml b/test/unit/python/sample_files/write_init_files/no_req_var_reg.xml similarity index 100% rename from test/unit_python/sample_files/write_init_files/no_req_var_reg.xml rename to test/unit/python/sample_files/write_init_files/no_req_var_reg.xml diff --git a/test/unit_python/sample_files/write_init_files/param_reg.xml b/test/unit/python/sample_files/write_init_files/param_reg.xml similarity index 100% rename from test/unit_python/sample_files/write_init_files/param_reg.xml rename to test/unit/python/sample_files/write_init_files/param_reg.xml diff --git a/test/unit_python/sample_files/write_init_files/phys_vars_init_check_4D.F90 b/test/unit/python/sample_files/write_init_files/phys_vars_init_check_4D.F90 similarity index 100% rename from test/unit_python/sample_files/write_init_files/phys_vars_init_check_4D.F90 rename to test/unit/python/sample_files/write_init_files/phys_vars_init_check_4D.F90 diff --git a/test/unit_python/sample_files/write_init_files/phys_vars_init_check_bvd.F90 b/test/unit/python/sample_files/write_init_files/phys_vars_init_check_bvd.F90 similarity index 100% rename from test/unit_python/sample_files/write_init_files/phys_vars_init_check_bvd.F90 rename to test/unit/python/sample_files/write_init_files/phys_vars_init_check_bvd.F90 diff --git a/test/unit_python/sample_files/write_init_files/phys_vars_init_check_cnst.F90 b/test/unit/python/sample_files/write_init_files/phys_vars_init_check_cnst.F90 similarity index 100% rename from test/unit_python/sample_files/write_init_files/phys_vars_init_check_cnst.F90 rename to test/unit/python/sample_files/write_init_files/phys_vars_init_check_cnst.F90 diff --git a/test/unit_python/sample_files/write_init_files/phys_vars_init_check_ddt.F90 b/test/unit/python/sample_files/write_init_files/phys_vars_init_check_ddt.F90 similarity index 100% rename from test/unit_python/sample_files/write_init_files/phys_vars_init_check_ddt.F90 rename to test/unit/python/sample_files/write_init_files/phys_vars_init_check_ddt.F90 diff --git a/test/unit_python/sample_files/write_init_files/phys_vars_init_check_ddt2.F90 b/test/unit/python/sample_files/write_init_files/phys_vars_init_check_ddt2.F90 similarity index 100% rename from test/unit_python/sample_files/write_init_files/phys_vars_init_check_ddt2.F90 rename to test/unit/python/sample_files/write_init_files/phys_vars_init_check_ddt2.F90 diff --git a/test/unit_python/sample_files/write_init_files/phys_vars_init_check_ddt_array.F90 b/test/unit/python/sample_files/write_init_files/phys_vars_init_check_ddt_array.F90 similarity index 100% rename from test/unit_python/sample_files/write_init_files/phys_vars_init_check_ddt_array.F90 rename to test/unit/python/sample_files/write_init_files/phys_vars_init_check_ddt_array.F90 diff --git a/test/unit_python/sample_files/write_init_files/phys_vars_init_check_host_var.F90 b/test/unit/python/sample_files/write_init_files/phys_vars_init_check_host_var.F90 similarity index 100% rename from test/unit_python/sample_files/write_init_files/phys_vars_init_check_host_var.F90 rename to test/unit/python/sample_files/write_init_files/phys_vars_init_check_host_var.F90 diff --git a/test/unit_python/sample_files/write_init_files/phys_vars_init_check_mf.F90 b/test/unit/python/sample_files/write_init_files/phys_vars_init_check_mf.F90 similarity index 100% rename from test/unit_python/sample_files/write_init_files/phys_vars_init_check_mf.F90 rename to test/unit/python/sample_files/write_init_files/phys_vars_init_check_mf.F90 diff --git a/test/unit_python/sample_files/write_init_files/phys_vars_init_check_no_horiz.F90 b/test/unit/python/sample_files/write_init_files/phys_vars_init_check_no_horiz.F90 similarity index 100% rename from test/unit_python/sample_files/write_init_files/phys_vars_init_check_no_horiz.F90 rename to test/unit/python/sample_files/write_init_files/phys_vars_init_check_no_horiz.F90 diff --git a/test/unit_python/sample_files/write_init_files/phys_vars_init_check_noreq.F90 b/test/unit/python/sample_files/write_init_files/phys_vars_init_check_noreq.F90 similarity index 100% rename from test/unit_python/sample_files/write_init_files/phys_vars_init_check_noreq.F90 rename to test/unit/python/sample_files/write_init_files/phys_vars_init_check_noreq.F90 diff --git a/test/unit_python/sample_files/write_init_files/phys_vars_init_check_param.F90 b/test/unit/python/sample_files/write_init_files/phys_vars_init_check_param.F90 similarity index 100% rename from test/unit_python/sample_files/write_init_files/phys_vars_init_check_param.F90 rename to test/unit/python/sample_files/write_init_files/phys_vars_init_check_param.F90 diff --git a/test/unit_python/sample_files/write_init_files/phys_vars_init_check_parameter.F90 b/test/unit/python/sample_files/write_init_files/phys_vars_init_check_parameter.F90 similarity index 100% rename from test/unit_python/sample_files/write_init_files/phys_vars_init_check_parameter.F90 rename to test/unit/python/sample_files/write_init_files/phys_vars_init_check_parameter.F90 diff --git a/test/unit_python/sample_files/write_init_files/phys_vars_init_check_protect.F90 b/test/unit/python/sample_files/write_init_files/phys_vars_init_check_protect.F90 similarity index 100% rename from test/unit_python/sample_files/write_init_files/phys_vars_init_check_protect.F90 rename to test/unit/python/sample_files/write_init_files/phys_vars_init_check_protect.F90 diff --git a/test/unit_python/sample_files/write_init_files/phys_vars_init_check_scalar.F90 b/test/unit/python/sample_files/write_init_files/phys_vars_init_check_scalar.F90 similarity index 100% rename from test/unit_python/sample_files/write_init_files/phys_vars_init_check_scalar.F90 rename to test/unit/python/sample_files/write_init_files/phys_vars_init_check_scalar.F90 diff --git a/test/unit_python/sample_files/write_init_files/phys_vars_init_check_simple.F90 b/test/unit/python/sample_files/write_init_files/phys_vars_init_check_simple.F90 similarity index 100% rename from test/unit_python/sample_files/write_init_files/phys_vars_init_check_simple.F90 rename to test/unit/python/sample_files/write_init_files/phys_vars_init_check_simple.F90 diff --git a/test/unit_python/sample_files/write_init_files/physics_inputs_4D.F90 b/test/unit/python/sample_files/write_init_files/physics_inputs_4D.F90 similarity index 100% rename from test/unit_python/sample_files/write_init_files/physics_inputs_4D.F90 rename to test/unit/python/sample_files/write_init_files/physics_inputs_4D.F90 diff --git a/test/unit_python/sample_files/write_init_files/physics_inputs_bvd.F90 b/test/unit/python/sample_files/write_init_files/physics_inputs_bvd.F90 similarity index 100% rename from test/unit_python/sample_files/write_init_files/physics_inputs_bvd.F90 rename to test/unit/python/sample_files/write_init_files/physics_inputs_bvd.F90 diff --git a/test/unit_python/sample_files/write_init_files/physics_inputs_cnst.F90 b/test/unit/python/sample_files/write_init_files/physics_inputs_cnst.F90 similarity index 100% rename from test/unit_python/sample_files/write_init_files/physics_inputs_cnst.F90 rename to test/unit/python/sample_files/write_init_files/physics_inputs_cnst.F90 diff --git a/test/unit_python/sample_files/write_init_files/physics_inputs_ddt.F90 b/test/unit/python/sample_files/write_init_files/physics_inputs_ddt.F90 similarity index 100% rename from test/unit_python/sample_files/write_init_files/physics_inputs_ddt.F90 rename to test/unit/python/sample_files/write_init_files/physics_inputs_ddt.F90 diff --git a/test/unit_python/sample_files/write_init_files/physics_inputs_ddt2.F90 b/test/unit/python/sample_files/write_init_files/physics_inputs_ddt2.F90 similarity index 100% rename from test/unit_python/sample_files/write_init_files/physics_inputs_ddt2.F90 rename to test/unit/python/sample_files/write_init_files/physics_inputs_ddt2.F90 diff --git a/test/unit_python/sample_files/write_init_files/physics_inputs_ddt_array.F90 b/test/unit/python/sample_files/write_init_files/physics_inputs_ddt_array.F90 similarity index 100% rename from test/unit_python/sample_files/write_init_files/physics_inputs_ddt_array.F90 rename to test/unit/python/sample_files/write_init_files/physics_inputs_ddt_array.F90 diff --git a/test/unit_python/sample_files/write_init_files/physics_inputs_host_var.F90 b/test/unit/python/sample_files/write_init_files/physics_inputs_host_var.F90 similarity index 100% rename from test/unit_python/sample_files/write_init_files/physics_inputs_host_var.F90 rename to test/unit/python/sample_files/write_init_files/physics_inputs_host_var.F90 diff --git a/test/unit_python/sample_files/write_init_files/physics_inputs_mf.F90 b/test/unit/python/sample_files/write_init_files/physics_inputs_mf.F90 similarity index 100% rename from test/unit_python/sample_files/write_init_files/physics_inputs_mf.F90 rename to test/unit/python/sample_files/write_init_files/physics_inputs_mf.F90 diff --git a/test/unit_python/sample_files/write_init_files/physics_inputs_no_horiz.F90 b/test/unit/python/sample_files/write_init_files/physics_inputs_no_horiz.F90 similarity index 100% rename from test/unit_python/sample_files/write_init_files/physics_inputs_no_horiz.F90 rename to test/unit/python/sample_files/write_init_files/physics_inputs_no_horiz.F90 diff --git a/test/unit_python/sample_files/write_init_files/physics_inputs_noreq.F90 b/test/unit/python/sample_files/write_init_files/physics_inputs_noreq.F90 similarity index 100% rename from test/unit_python/sample_files/write_init_files/physics_inputs_noreq.F90 rename to test/unit/python/sample_files/write_init_files/physics_inputs_noreq.F90 diff --git a/test/unit_python/sample_files/write_init_files/physics_inputs_param.F90 b/test/unit/python/sample_files/write_init_files/physics_inputs_param.F90 similarity index 100% rename from test/unit_python/sample_files/write_init_files/physics_inputs_param.F90 rename to test/unit/python/sample_files/write_init_files/physics_inputs_param.F90 diff --git a/test/unit_python/sample_files/write_init_files/physics_inputs_parameter.F90 b/test/unit/python/sample_files/write_init_files/physics_inputs_parameter.F90 similarity index 100% rename from test/unit_python/sample_files/write_init_files/physics_inputs_parameter.F90 rename to test/unit/python/sample_files/write_init_files/physics_inputs_parameter.F90 diff --git a/test/unit_python/sample_files/write_init_files/physics_inputs_protect.F90 b/test/unit/python/sample_files/write_init_files/physics_inputs_protect.F90 similarity index 100% rename from test/unit_python/sample_files/write_init_files/physics_inputs_protect.F90 rename to test/unit/python/sample_files/write_init_files/physics_inputs_protect.F90 diff --git a/test/unit_python/sample_files/write_init_files/physics_inputs_scalar.F90 b/test/unit/python/sample_files/write_init_files/physics_inputs_scalar.F90 similarity index 100% rename from test/unit_python/sample_files/write_init_files/physics_inputs_scalar.F90 rename to test/unit/python/sample_files/write_init_files/physics_inputs_scalar.F90 diff --git a/test/unit_python/sample_files/write_init_files/physics_inputs_simple.F90 b/test/unit/python/sample_files/write_init_files/physics_inputs_simple.F90 similarity index 100% rename from test/unit_python/sample_files/write_init_files/physics_inputs_simple.F90 rename to test/unit/python/sample_files/write_init_files/physics_inputs_simple.F90 diff --git a/test/unit_python/sample_files/write_init_files/protected_reg.xml b/test/unit/python/sample_files/write_init_files/protected_reg.xml similarity index 100% rename from test/unit_python/sample_files/write_init_files/protected_reg.xml rename to test/unit/python/sample_files/write_init_files/protected_reg.xml diff --git a/test/unit_python/sample_files/write_init_files/ref_theta.F90 b/test/unit/python/sample_files/write_init_files/ref_theta.F90 similarity index 100% rename from test/unit_python/sample_files/write_init_files/ref_theta.F90 rename to test/unit/python/sample_files/write_init_files/ref_theta.F90 diff --git a/test/unit_python/sample_files/write_init_files/ref_theta.meta b/test/unit/python/sample_files/write_init_files/ref_theta.meta similarity index 100% rename from test/unit_python/sample_files/write_init_files/ref_theta.meta rename to test/unit/python/sample_files/write_init_files/ref_theta.meta diff --git a/test/unit_python/sample_files/write_init_files/ref_two.F90 b/test/unit/python/sample_files/write_init_files/ref_two.F90 similarity index 100% rename from test/unit_python/sample_files/write_init_files/ref_two.F90 rename to test/unit/python/sample_files/write_init_files/ref_two.F90 diff --git a/test/unit_python/sample_files/write_init_files/ref_two.meta b/test/unit/python/sample_files/write_init_files/ref_two.meta similarity index 100% rename from test/unit_python/sample_files/write_init_files/ref_two.meta rename to test/unit/python/sample_files/write_init_files/ref_two.meta diff --git a/test/unit_python/sample_files/write_init_files/scalar_var_reg.xml b/test/unit/python/sample_files/write_init_files/scalar_var_reg.xml similarity index 100% rename from test/unit_python/sample_files/write_init_files/scalar_var_reg.xml rename to test/unit/python/sample_files/write_init_files/scalar_var_reg.xml diff --git a/test/unit_python/sample_files/write_init_files/simple_build_cache_template.xml b/test/unit/python/sample_files/write_init_files/simple_build_cache_template.xml similarity index 100% rename from test/unit_python/sample_files/write_init_files/simple_build_cache_template.xml rename to test/unit/python/sample_files/write_init_files/simple_build_cache_template.xml diff --git a/test/unit_python/sample_files/write_init_files/simple_host.F90 b/test/unit/python/sample_files/write_init_files/simple_host.F90 similarity index 100% rename from test/unit_python/sample_files/write_init_files/simple_host.F90 rename to test/unit/python/sample_files/write_init_files/simple_host.F90 diff --git a/test/unit_python/sample_files/write_init_files/simple_host.meta b/test/unit/python/sample_files/write_init_files/simple_host.meta similarity index 100% rename from test/unit_python/sample_files/write_init_files/simple_host.meta rename to test/unit/python/sample_files/write_init_files/simple_host.meta diff --git a/test/unit_python/sample_files/write_init_files/simple_reg.xml b/test/unit/python/sample_files/write_init_files/simple_reg.xml similarity index 100% rename from test/unit_python/sample_files/write_init_files/simple_reg.xml rename to test/unit/python/sample_files/write_init_files/simple_reg.xml diff --git a/test/unit_python/sample_files/write_init_files/suite_simple.xml b/test/unit/python/sample_files/write_init_files/suite_simple.xml similarity index 100% rename from test/unit_python/sample_files/write_init_files/suite_simple.xml rename to test/unit/python/sample_files/write_init_files/suite_simple.xml diff --git a/test/unit_python/sample_files/write_init_files/temp_adjust.F90 b/test/unit/python/sample_files/write_init_files/temp_adjust.F90 similarity index 100% rename from test/unit_python/sample_files/write_init_files/temp_adjust.F90 rename to test/unit/python/sample_files/write_init_files/temp_adjust.F90 diff --git a/test/unit_python/sample_files/write_init_files/temp_adjust.meta b/test/unit/python/sample_files/write_init_files/temp_adjust.meta similarity index 100% rename from test/unit_python/sample_files/write_init_files/temp_adjust.meta rename to test/unit/python/sample_files/write_init_files/temp_adjust.meta diff --git a/test/unit_python/sample_files/write_init_files/temp_adjust_4D.F90 b/test/unit/python/sample_files/write_init_files/temp_adjust_4D.F90 similarity index 100% rename from test/unit_python/sample_files/write_init_files/temp_adjust_4D.F90 rename to test/unit/python/sample_files/write_init_files/temp_adjust_4D.F90 diff --git a/test/unit_python/sample_files/write_init_files/temp_adjust_4D.meta b/test/unit/python/sample_files/write_init_files/temp_adjust_4D.meta similarity index 100% rename from test/unit_python/sample_files/write_init_files/temp_adjust_4D.meta rename to test/unit/python/sample_files/write_init_files/temp_adjust_4D.meta diff --git a/test/unit_python/sample_files/write_init_files/temp_adjust_bvd.F90 b/test/unit/python/sample_files/write_init_files/temp_adjust_bvd.F90 similarity index 100% rename from test/unit_python/sample_files/write_init_files/temp_adjust_bvd.F90 rename to test/unit/python/sample_files/write_init_files/temp_adjust_bvd.F90 diff --git a/test/unit_python/sample_files/write_init_files/temp_adjust_bvd.meta b/test/unit/python/sample_files/write_init_files/temp_adjust_bvd.meta similarity index 100% rename from test/unit_python/sample_files/write_init_files/temp_adjust_bvd.meta rename to test/unit/python/sample_files/write_init_files/temp_adjust_bvd.meta diff --git a/test/unit_python/sample_files/write_init_files/temp_adjust_cnst.F90 b/test/unit/python/sample_files/write_init_files/temp_adjust_cnst.F90 similarity index 100% rename from test/unit_python/sample_files/write_init_files/temp_adjust_cnst.F90 rename to test/unit/python/sample_files/write_init_files/temp_adjust_cnst.F90 diff --git a/test/unit_python/sample_files/write_init_files/temp_adjust_cnst.meta b/test/unit/python/sample_files/write_init_files/temp_adjust_cnst.meta similarity index 100% rename from test/unit_python/sample_files/write_init_files/temp_adjust_cnst.meta rename to test/unit/python/sample_files/write_init_files/temp_adjust_cnst.meta diff --git a/test/unit_python/sample_files/write_init_files/temp_adjust_no_horiz.F90 b/test/unit/python/sample_files/write_init_files/temp_adjust_no_horiz.F90 similarity index 100% rename from test/unit_python/sample_files/write_init_files/temp_adjust_no_horiz.F90 rename to test/unit/python/sample_files/write_init_files/temp_adjust_no_horiz.F90 diff --git a/test/unit_python/sample_files/write_init_files/temp_adjust_no_horiz.meta b/test/unit/python/sample_files/write_init_files/temp_adjust_no_horiz.meta similarity index 100% rename from test/unit_python/sample_files/write_init_files/temp_adjust_no_horiz.meta rename to test/unit/python/sample_files/write_init_files/temp_adjust_no_horiz.meta diff --git a/test/unit_python/sample_files/write_init_files/temp_adjust_noreq.F90 b/test/unit/python/sample_files/write_init_files/temp_adjust_noreq.F90 similarity index 100% rename from test/unit_python/sample_files/write_init_files/temp_adjust_noreq.F90 rename to test/unit/python/sample_files/write_init_files/temp_adjust_noreq.F90 diff --git a/test/unit_python/sample_files/write_init_files/temp_adjust_noreq.meta b/test/unit/python/sample_files/write_init_files/temp_adjust_noreq.meta similarity index 100% rename from test/unit_python/sample_files/write_init_files/temp_adjust_noreq.meta rename to test/unit/python/sample_files/write_init_files/temp_adjust_noreq.meta diff --git a/test/unit_python/sample_files/write_init_files/temp_adjust_param.F90 b/test/unit/python/sample_files/write_init_files/temp_adjust_param.F90 similarity index 100% rename from test/unit_python/sample_files/write_init_files/temp_adjust_param.F90 rename to test/unit/python/sample_files/write_init_files/temp_adjust_param.F90 diff --git a/test/unit_python/sample_files/write_init_files/temp_adjust_param.meta b/test/unit/python/sample_files/write_init_files/temp_adjust_param.meta similarity index 100% rename from test/unit_python/sample_files/write_init_files/temp_adjust_param.meta rename to test/unit/python/sample_files/write_init_files/temp_adjust_param.meta diff --git a/test/unit_python/sample_files/write_init_files/temp_adjust_scalar.F90 b/test/unit/python/sample_files/write_init_files/temp_adjust_scalar.F90 similarity index 100% rename from test/unit_python/sample_files/write_init_files/temp_adjust_scalar.F90 rename to test/unit/python/sample_files/write_init_files/temp_adjust_scalar.F90 diff --git a/test/unit_python/sample_files/write_init_files/temp_adjust_scalar.meta b/test/unit/python/sample_files/write_init_files/temp_adjust_scalar.meta similarity index 100% rename from test/unit_python/sample_files/write_init_files/temp_adjust_scalar.meta rename to test/unit/python/sample_files/write_init_files/temp_adjust_scalar.meta diff --git a/test/unit_python/sample_files/write_init_files/theta_ddt.F90 b/test/unit/python/sample_files/write_init_files/theta_ddt.F90 similarity index 100% rename from test/unit_python/sample_files/write_init_files/theta_ddt.F90 rename to test/unit/python/sample_files/write_init_files/theta_ddt.F90 diff --git a/test/unit_python/sample_files/write_init_files/theta_ddt.meta b/test/unit/python/sample_files/write_init_files/theta_ddt.meta similarity index 100% rename from test/unit_python/sample_files/write_init_files/theta_ddt.meta rename to test/unit/python/sample_files/write_init_files/theta_ddt.meta diff --git a/test/unit_python/sample_files/write_init_files/var_4D_reg.xml b/test/unit/python/sample_files/write_init_files/var_4D_reg.xml similarity index 100% rename from test/unit_python/sample_files/write_init_files/var_4D_reg.xml rename to test/unit/python/sample_files/write_init_files/var_4D_reg.xml diff --git a/test/unit_python/sample_files/write_init_files/var_bad_vertdim.xml b/test/unit/python/sample_files/write_init_files/var_bad_vertdim.xml similarity index 100% rename from test/unit_python/sample_files/write_init_files/var_bad_vertdim.xml rename to test/unit/python/sample_files/write_init_files/var_bad_vertdim.xml diff --git a/test/unit_python/test_atm_in_paramgen.py b/test/unit/python/test_atm_in_paramgen.py similarity index 100% rename from test/unit_python/test_atm_in_paramgen.py rename to test/unit/python/test_atm_in_paramgen.py diff --git a/test/unit_python/test_build_cache.py b/test/unit/python/test_build_cache.py similarity index 100% rename from test/unit_python/test_build_cache.py rename to test/unit/python/test_build_cache.py diff --git a/test/unit_python/test_cam_autogen.py b/test/unit/python/test_cam_autogen.py similarity index 100% rename from test/unit_python/test_cam_autogen.py rename to test/unit/python/test_cam_autogen.py diff --git a/test/unit_python/test_cam_config.py b/test/unit/python/test_cam_config.py similarity index 100% rename from test/unit_python/test_cam_config.py rename to test/unit/python/test_cam_config.py diff --git a/test/unit_python/test_create_readnl_files.py b/test/unit/python/test_create_readnl_files.py similarity index 98% rename from test/unit_python/test_create_readnl_files.py rename to test/unit/python/test_create_readnl_files.py index aa88551e..3676fd7a 100644 --- a/test/unit_python/test_create_readnl_files.py +++ b/test/unit/python/test_create_readnl_files.py @@ -409,18 +409,18 @@ def test_double_namelist_def(self): # Check logger lmsgs = [("INFO:test_double_namelist_def:Reading CAM physics " \ "namelist definition file, ", - "test/unit_python/sample_files/banana_namelist.xml'"), + "test/unit/python/sample_files/banana_namelist.xml'"), ("INFO:test_double_namelist_def:Writing metadata file, ", "unit/tmp/namelist_files/banana_namelist.meta"), ("INFO:test_double_namelist_def:Writing Fortran module, ", "unit/tmp/namelist_files/banana_namelist.F90"), ("INFO:test_double_namelist_def:Reading CAM physics " \ "namelist definition file, ", - "test/unit_python/sample_files/kumquat_namelist.xml'"), + "test/unit/python/sample_files/kumquat_namelist.xml'"), ("INFO:test_double_namelist_def:Writing metadata file, ", - "test/unit_python/tmp/namelist_files/kumquat_namelist.meta"), + "test/unit/python/tmp/namelist_files/kumquat_namelist.meta"), ("INFO:test_double_namelist_def:Writing Fortran module, ", - "test/unit_python/tmp/namelist_files/kumquat_namelist.F90")] + "test/unit/python/tmp/namelist_files/kumquat_namelist.F90")] comp_lmsgs = cmp_log.output amsg = "Test failure: Number of log output messages, " \ f"{len(comp_lmsgs)} does not match what is expected, " \ diff --git a/test/unit_python/test_hist_config.py b/test/unit/python/test_hist_config.py similarity index 100% rename from test/unit_python/test_hist_config.py rename to test/unit/python/test_hist_config.py diff --git a/test/unit_python/test_registry.py b/test/unit/python/test_registry.py similarity index 100% rename from test/unit_python/test_registry.py rename to test/unit/python/test_registry.py diff --git a/test/unit_python/test_write_init_files.py b/test/unit/python/test_write_init_files.py similarity index 100% rename from test/unit_python/test_write_init_files.py rename to test/unit/python/test_write_init_files.py From d3d0d9dd7b7075f225248aa32699aac7d63b187f Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Wed, 4 Dec 2024 23:03:14 -0700 Subject: [PATCH 17/44] Fixing build path. --- test/unit/fortran/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/fortran/CMakeLists.txt b/test/unit/fortran/CMakeLists.txt index 2677d318..a97790e4 100644 --- a/test/unit/fortran/CMakeLists.txt +++ b/test/unit/fortran/CMakeLists.txt @@ -18,7 +18,7 @@ if(CAM_SIMA_ENABLE_CODE_COVERAGE) add_link_options(--coverage) endif() -add_subdirectory(${CMAKE_SOURCE_DIR}/../../src/core_utils ${CMAKE_BINARY_DIR}/src) +add_subdirectory(${CMAKE_SOURCE_DIR}/../../../src/core_utils ${CMAKE_BINARY_DIR}/src) if(CAM_SIMA_ENABLE_TESTS OR CAM_SIMA_ENABLE_CODE_COVERAGE) set(CMAKE_BUILD_TYPE Debug) From c28c89f516ac6a4237d9e9d2c11e24c82f45e360 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Wed, 4 Dec 2024 23:09:41 -0700 Subject: [PATCH 18/44] Adding workflow_dispatch to if check for python unit tests. --- .github/workflows/python_unit_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python_unit_tests.yml b/.github/workflows/python_unit_tests.yml index fb26d41c..247954cb 100644 --- a/.github/workflows/python_unit_tests.yml +++ b/.github/workflows/python_unit_tests.yml @@ -17,7 +17,7 @@ jobs: #a PR is either opened or synced (i.e. additional commits are pushed #to branch involved in PR). python_unit_tests: - if: github.event_name == 'pull_request' || github.repository == 'ESCOMP/CAM-SIMA' + if: github.event_name == 'pull_request' || github.repository == 'ESCOMP/CAM-SIMA' || github.event_name == 'workflow_dispatch' runs-on: ubuntu-latest strategy: matrix: From 2f9b484a62d2e828d37cdbe846e18d895fec5bef Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Wed, 4 Dec 2024 23:14:06 -0700 Subject: [PATCH 19/44] Fixing python test path. --- cime_config/cam_autogen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cime_config/cam_autogen.py b/cime_config/cam_autogen.py index e08b1f5b..581c98d1 100644 --- a/cime_config/cam_autogen.py +++ b/cime_config/cam_autogen.py @@ -132,7 +132,7 @@ def _find_scheme_source(source_dirs, metadata_file_name): doctests: 1. Check that the function can correctly find source and namelist files: - >>> _find_scheme_source([os.path.join(_CAM_ROOT_DIR, "test", "unit", "sample_files", \ + >>> _find_scheme_source([os.path.join(_CAM_ROOT_DIR, "test", "unit", "python", "sample_files", \ "autogen_files")], "two_scheme_banana") # doctest: +ELLIPSIS ('...two_scheme_banana.F90', '...two_scheme_banana_namelist.xml') From ff36e21c96736345aeb6a8cf52972ef749f4c391 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Wed, 4 Dec 2024 23:18:26 -0700 Subject: [PATCH 20/44] Fixing path to root of repository. --- test/unit/python/test_atm_in_paramgen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/python/test_atm_in_paramgen.py b/test/unit/python/test_atm_in_paramgen.py index 69d0d353..5ea26d6c 100644 --- a/test/unit/python/test_atm_in_paramgen.py +++ b/test/unit/python/test_atm_in_paramgen.py @@ -30,7 +30,7 @@ #Add directory to python path: _TEST_DIR = os.path.abspath(os.path.dirname(__file__)) -_CAM_ROOT_DIR = os.path.join(_TEST_DIR, os.pardir, os.pardir) +_CAM_ROOT_DIR = os.path.join(_TEST_DIR, os.pardir, os.pardir, os.pardir) _CIME_CONF_DIR = os.path.abspath(os.path.join(_CAM_ROOT_DIR, "cime_config")) _SAMPLES_DIR = os.path.join(os.path.join(_TEST_DIR, "sample_files"), "atm_in_files") From cd5b5e4b6442240ed6d164d490209708002c78a6 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Wed, 4 Dec 2024 23:22:24 -0700 Subject: [PATCH 21/44] More python unit test path fixes. --- test/unit/python/test_create_readnl_files.py | 2 +- test/unit/python/test_hist_config.py | 2 +- test/unit/python/test_registry.py | 2 +- test/unit/python/test_write_init_files.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/unit/python/test_create_readnl_files.py b/test/unit/python/test_create_readnl_files.py index 3676fd7a..0c8a765f 100644 --- a/test/unit/python/test_create_readnl_files.py +++ b/test/unit/python/test_create_readnl_files.py @@ -22,7 +22,7 @@ import xml.etree.ElementTree as ET _TEST_DIR = os.path.dirname(os.path.abspath(__file__)) -_CAM_ROOT = os.path.abspath(os.path.join(_TEST_DIR, os.pardir, os.pardir)) +_CAM_ROOT = os.path.abspath(os.path.join(_TEST_DIR, os.pardir, os.pardir, os.pardir)) _CCPP_DIR = os.path.join(_CAM_ROOT, "ccpp_framework", "scripts") _CIME_CONFIG_DIR = os.path.join(_CAM_ROOT, "cime_config") _XML_SAMPLES_DIR = os.path.join(_TEST_DIR, "sample_files") diff --git a/test/unit/python/test_hist_config.py b/test/unit/python/test_hist_config.py index fa5435f6..57fad85f 100644 --- a/test/unit/python/test_hist_config.py +++ b/test/unit/python/test_hist_config.py @@ -20,7 +20,7 @@ import unittest __TEST_DIR = os.path.dirname(os.path.abspath(__file__)) -_CAM_ROOT = os.path.abspath(os.path.join(__TEST_DIR, os.pardir, os.pardir)) +_CAM_ROOT = os.path.abspath(os.path.join(__TEST_DIR, os.pardir, os.pardir, os.pardir)) __CIME_CONFIG_DIR = os.path.join(_CAM_ROOT, "cime_config") _SAMPLE_FILES_DIR = os.path.join(__TEST_DIR, "sample_files", "hist_config_files") diff --git a/test/unit/python/test_registry.py b/test/unit/python/test_registry.py index 6fff5360..a4198d69 100644 --- a/test/unit/python/test_registry.py +++ b/test/unit/python/test_registry.py @@ -22,7 +22,7 @@ import xml.etree.ElementTree as ET __TEST_DIR = os.path.dirname(os.path.abspath(__file__)) -_CAM_ROOT = os.path.abspath(os.path.join(__TEST_DIR, os.pardir, os.pardir)) +_CAM_ROOT = os.path.abspath(os.path.join(__TEST_DIR, os.pardir, os.pardir, os.pardir)) __REGISTRY_DIR = os.path.join(_CAM_ROOT, "src", "data") _SAMPLE_FILES_DIR = os.path.join(__TEST_DIR, "sample_files") _TMP_DIR = os.path.join(__TEST_DIR, "tmp") diff --git a/test/unit/python/test_write_init_files.py b/test/unit/python/test_write_init_files.py index 903df86d..dd3154b1 100644 --- a/test/unit/python/test_write_init_files.py +++ b/test/unit/python/test_write_init_files.py @@ -20,7 +20,7 @@ import logging __TEST_DIR = os.path.dirname(os.path.abspath(__file__)) -_CAM_ROOT = os.path.abspath(os.path.join(__TEST_DIR, os.pardir, os.pardir)) +_CAM_ROOT = os.path.abspath(os.path.join(__TEST_DIR, os.pardir, os.pardir, os.pardir)) __CCPP_DIR = os.path.join(_CAM_ROOT, "ccpp_framework", "scripts") __REGISTRY_DIR = os.path.join(_CAM_ROOT, "src", "data") _REG_SAMPLES_DIR = os.path.join(__TEST_DIR, "sample_files") From 4201e1819a0740dd87bf5abf4480fc0c542674ed Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Wed, 4 Dec 2024 23:24:26 -0700 Subject: [PATCH 22/44] One more path fix. --- test/unit/python/test_build_cache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/python/test_build_cache.py b/test/unit/python/test_build_cache.py index 39dc59d2..e211635e 100644 --- a/test/unit/python/test_build_cache.py +++ b/test/unit/python/test_build_cache.py @@ -32,7 +32,7 @@ #Add directory to python path: _CWD = os.getcwd() _CURRDIR = os.path.abspath(os.path.dirname(__file__)) -_CAM_ROOT_DIR = os.path.join(_CURRDIR, os.pardir, os.pardir) +_CAM_ROOT_DIR = os.path.join(_CURRDIR, os.pardir, os.pardir, os.pardir) _CAM_CONF_DIR = os.path.abspath(os.path.join(_CAM_ROOT_DIR, "cime_config")) _PRE_TMP_DIR = os.path.join(_CURRDIR, "tmp") _TMP_DIR = os.path.join(_PRE_TMP_DIR, "cam_build_cache") From 58a8d2d4c97a7fa61270c134c5f1d4422e67246b Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Wed, 4 Dec 2024 23:27:20 -0700 Subject: [PATCH 23/44] One more path fix. --- test/unit/python/test_cam_autogen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/python/test_cam_autogen.py b/test/unit/python/test_cam_autogen.py index 4a786aab..c5317a65 100644 --- a/test/unit/python/test_cam_autogen.py +++ b/test/unit/python/test_cam_autogen.py @@ -32,7 +32,7 @@ #Add directory to python path: _CURRDIR = os.path.abspath(os.path.dirname(__file__)) -_CAM_ROOT_DIR = os.path.join(_CURRDIR, os.pardir, os.pardir) +_CAM_ROOT_DIR = os.path.join(_CURRDIR, os.pardir, os.pardir, os.pardir) _CAM_CONF_DIR = os.path.abspath(os.path.join(_CAM_ROOT_DIR, "cime_config")) _CCPP_DIR = os.path.join(_CAM_ROOT_DIR, "ccpp_framework", "scripts") From d090ff3cf51d476505b030726e8297ea312be945 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Wed, 4 Dec 2024 23:30:49 -0700 Subject: [PATCH 24/44] One more path fix. --- test/unit/python/test_cam_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/python/test_cam_config.py b/test/unit/python/test_cam_config.py index bad32f5f..91fd9724 100644 --- a/test/unit/python/test_cam_config.py +++ b/test/unit/python/test_cam_config.py @@ -30,7 +30,7 @@ #Add directory to python path: CURRDIR = os.path.abspath(os.path.dirname(__file__)) -CAM_ROOT_DIR = os.path.join(CURRDIR, os.pardir, os.pardir) +CAM_ROOT_DIR = os.path.join(CURRDIR, os.pardir, os.pardir, os.pardir) CAM_CONF_DIR = os.path.abspath(os.path.join(CAM_ROOT_DIR, "cime_config")) #Add "cime_config" directory to python path: From 5c08bd884653c0b02287b1b2b4f32f47ab2d1212 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Wed, 4 Dec 2024 23:52:43 -0700 Subject: [PATCH 25/44] Fixing tmp file path. --- test/unit/python/test_registry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/python/test_registry.py b/test/unit/python/test_registry.py index a4198d69..adde7797 100644 --- a/test/unit/python/test_registry.py +++ b/test/unit/python/test_registry.py @@ -325,7 +325,7 @@ def test_diff_src_root_metadata_file_registry(self): remove_files([out_source, out_meta]) # Create new directory: - tmp_src_dir = os.path.join(_TMP_DIR, "test", "unit", \ + tmp_src_dir = os.path.join(_TMP_DIR, "test", "unit", "python", \ "sample_files") if not os.path.exists(tmp_src_dir): os.makedirs(tmp_src_dir) From 0fdebc8e0cdc20ffc80ec5572b04416e3e6e75e4 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Wed, 4 Dec 2024 23:54:04 -0700 Subject: [PATCH 26/44] Fixing tmp file path. --- test/unit/python/test_create_readnl_files.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/unit/python/test_create_readnl_files.py b/test/unit/python/test_create_readnl_files.py index 0c8a765f..a6681743 100644 --- a/test/unit/python/test_create_readnl_files.py +++ b/test/unit/python/test_create_readnl_files.py @@ -411,9 +411,9 @@ def test_double_namelist_def(self): "namelist definition file, ", "test/unit/python/sample_files/banana_namelist.xml'"), ("INFO:test_double_namelist_def:Writing metadata file, ", - "unit/tmp/namelist_files/banana_namelist.meta"), + "unit/python/tmp/namelist_files/banana_namelist.meta"), ("INFO:test_double_namelist_def:Writing Fortran module, ", - "unit/tmp/namelist_files/banana_namelist.F90"), + "unit/python/tmp/namelist_files/banana_namelist.F90"), ("INFO:test_double_namelist_def:Reading CAM physics " \ "namelist definition file, ", "test/unit/python/sample_files/kumquat_namelist.xml'"), From d882fb7213e0ec883475e41da600a6f76d482033 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Tue, 10 Dec 2024 13:24:04 -0700 Subject: [PATCH 27/44] Adding top level comment to core lib cmake. --- src/core_utils/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core_utils/CMakeLists.txt b/src/core_utils/CMakeLists.txt index 5e9bd139..9fd989f6 100644 --- a/src/core_utils/CMakeLists.txt +++ b/src/core_utils/CMakeLists.txt @@ -1,5 +1,9 @@ set(CORE_UTILS_SRC string_core_utils.F90) +# core_utils is not integrated into the CMake build of any top level +# project yet and this CMake is for testing purposes only. +# Making a change to this project's CMake will not impact the build of +# a parent project at this time. add_library(core_utils ${CORE_UTILS_SRC}) target_compile_options(core_utils PRIVATE -ffree-line-length-none) target_include_directories(core_utils PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) \ No newline at end of file From c5fe6cd3114be925233cb0449493d1b9f16fddd3 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Tue, 10 Dec 2024 13:32:26 -0700 Subject: [PATCH 28/44] Renaming python test script. --- test/{run_unit_tests.sh => run_python_unit_tests.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename test/{run_unit_tests.sh => run_python_unit_tests.sh} (100%) diff --git a/test/run_unit_tests.sh b/test/run_python_unit_tests.sh similarity index 100% rename from test/run_unit_tests.sh rename to test/run_python_unit_tests.sh From f59b7d077197fb723cee7d10ce3587ee29512b8a Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Mon, 16 Dec 2024 08:31:12 -0700 Subject: [PATCH 29/44] Adding missing newlines. --- .github/workflows/fortran_unit_tests.yml | 2 +- src/core_utils/string_core_utils.F90 | 2 +- test/unit/fortran/src/core_utils/test_string_core_utils.pf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/fortran_unit_tests.yml b/.github/workflows/fortran_unit_tests.yml index 1ac749f4..20c7a004 100644 --- a/.github/workflows/fortran_unit_tests.yml +++ b/.github/workflows/fortran_unit_tests.yml @@ -63,4 +63,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: code-coverage-results - path: build/cam_sima_code_coverage.html \ No newline at end of file + path: build/cam_sima_code_coverage.html diff --git a/src/core_utils/string_core_utils.F90 b/src/core_utils/string_core_utils.F90 index 4801eb43..8bcf051a 100644 --- a/src/core_utils/string_core_utils.F90 +++ b/src/core_utils/string_core_utils.F90 @@ -160,4 +160,4 @@ pure function stringify(value, separator) stringify = trim(buffer) end function stringify -end module string_core_utils \ No newline at end of file +end module string_core_utils diff --git a/test/unit/fortran/src/core_utils/test_string_core_utils.pf b/test/unit/fortran/src/core_utils/test_string_core_utils.pf index d92f67b2..9e816ee5 100644 --- a/test/unit/fortran/src/core_utils/test_string_core_utils.pf +++ b/test/unit/fortran/src/core_utils/test_string_core_utils.pf @@ -66,4 +66,4 @@ subroutine test_zero_int_seconds_to_hhmmss() actual = int_seconds_to_hhmmss(to_convert) @assertEqual("00:00:00", actual) -end subroutine test_zero_int_seconds_to_hhmmss \ No newline at end of file +end subroutine test_zero_int_seconds_to_hhmmss From 5d01c2e4b720ac883a922848367decedd2c82172 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Wed, 8 Jan 2025 08:40:59 -0700 Subject: [PATCH 30/44] Updating compile flags for unit test and adding stringify unit tests. --- src/core_utils/string_core_utils.F90 | 40 +-- src/utils/string_utils.F90 | 18 +- .../fortran/src/core_utils/CMakeLists.txt | 1 + .../src/core_utils/test_string_core_utils.pf | 237 +++++++++++++++++- 4 files changed, 262 insertions(+), 34 deletions(-) diff --git a/src/core_utils/string_core_utils.F90 b/src/core_utils/string_core_utils.F90 index 8bcf051a..2b41db3c 100644 --- a/src/core_utils/string_core_utils.F90 +++ b/src/core_utils/string_core_utils.F90 @@ -3,25 +3,27 @@ module string_core_utils implicit none private - public :: to_str ! Convert integer to left justified string - public :: int_date_to_yyyymmdd ! Convert encoded date integer to "yyyy-mm-dd" format - public :: int_seconds_to_hhmmss ! Convert integer seconds past midnight to "hh:mm:ss" format - public :: stringify ! Convert one or more values of any intrinsic data types to a character string for pretty printing + public :: core_to_str ! Convert integer to left justified string + public :: core_int_date_to_yyyymmdd ! Convert encoded date integer to "yyyy-mm-dd" format + public :: core_int_seconds_to_hhmmss ! Convert integer seconds past midnight to "hh:mm:ss" format + public :: core_stringify ! Convert one or more values of any intrinsic data types to a character string for pretty printing CONTAINS - character(len=10) pure function to_str(n) + character(len=10) pure function core_to_str(n) ! return default integer as a left justified string ! arguments integer, intent(in) :: n + ! character(len=10) :: local_str !---------------------------------------------------------------------------- - write(to_str,'(i0)') n + write(core_to_str,'(i0)') n + ! core_to_str = local_str - end function to_str + end function core_to_str - character(len=10) pure function int_date_to_yyyymmdd (date) + character(len=10) pure function core_int_date_to_yyyymmdd (date) ! Undefined behavior if date <= 0 ! Input arguments @@ -36,12 +38,12 @@ character(len=10) pure function int_date_to_yyyymmdd (date) month = (date - year*10000) / 100 day = date - year*10000 - month*100 - write(int_date_to_yyyymmdd, '(i4.4,A,i2.2,A,i2.2)') & + write(core_int_date_to_yyyymmdd, '(i4.4,A,i2.2,A,i2.2)') & year,'-',month,'-',day - end function int_date_to_yyyymmdd + end function core_int_date_to_yyyymmdd - character(len=8) pure function int_seconds_to_hhmmss (seconds) + character(len=8) pure function core_int_seconds_to_hhmmss (seconds) ! Undefined behavior if seconds outside [0, 86400] ! Input arguments @@ -56,10 +58,10 @@ character(len=8) pure function int_seconds_to_hhmmss (seconds) minutes = (seconds - hours*3600) / 60 secs = (seconds - hours*3600 - minutes*60) - write(int_seconds_to_hhmmss,'(i2.2,A,i2.2,A,i2.2)') & + write(core_int_seconds_to_hhmmss,'(i2.2,A,i2.2,A,i2.2)') & hours,':',minutes,':',secs - end function int_seconds_to_hhmmss + end function core_int_seconds_to_hhmmss !> Convert one or more values of any intrinsic data types to a character string for pretty printing. !> If `value` contains more than one element, the elements will be stringified, delimited by `separator`, then concatenated. @@ -67,12 +69,12 @@ end function int_seconds_to_hhmmss !> If `value` contains zero element or is of unsupported data types, an empty character string is produced. !> If `separator` is not supplied, it defaults to `, ` (i.e., a comma and a space). !> (KCW, 2024-02-04) - pure function stringify(value, separator) + pure function core_stringify(value, separator) use, intrinsic :: iso_fortran_env, only: int32, int64, real32, real64 class(*), intent(in) :: value(:) character(*), optional, intent(in) :: separator - character(:), allocatable :: stringify + character(:), allocatable :: core_stringify integer, parameter :: sizelimit = 1024 @@ -88,7 +90,7 @@ pure function stringify(value, separator) n = min(size(value), sizelimit) if (n == 0) then - stringify = '' + core_stringify = '' return end if @@ -153,11 +155,11 @@ pure function stringify(value, separator) write(buffer, format) value class default - stringify = '' + core_stringify = '' return end select - stringify = trim(buffer) - end function stringify + core_stringify = trim(buffer) + end function core_stringify end module string_core_utils diff --git a/src/utils/string_utils.F90 b/src/utils/string_utils.F90 index 727f397d..636df848 100644 --- a/src/utils/string_utils.F90 +++ b/src/utils/string_utils.F90 @@ -4,7 +4,8 @@ module string_utils use shr_string_mod, only: to_lower => shr_string_toLower use cam_logfile, only: iulog use cam_abortutils, only: endrun - use string_core_utils, only: to_str, int_date_to_yyyymmdd, int_seconds_to_hhmmss, stringify + use string_core_utils, only: core_int_date_to_yyyymmdd, core_int_seconds_to_hhmmss + use string_core_utils, only: core_stringify=>stringify implicit none private @@ -14,6 +15,8 @@ module string_utils public :: strlist_get_ind ! Gets the index of a given string in a list of strings public :: date2yyyymmdd ! convert encoded date integer to "yyyy-mm-dd" format public :: sec2hms ! convert integer seconds past midnight to "hh:mm:ss" format + public :: to_str + public :: stringify ! Private module variables integer, parameter :: lower_to_upper = iachar("A") - iachar("a") @@ -72,7 +75,7 @@ character(len=10) function date2yyyymmdd (date) call endrun ('DATE2YYYYMMDD: negative date not allowed') end if - date2yyyymmdd = int_date_to_yyyymmdd(date) + date2yyyymmdd = core_int_date_to_yyyymmdd(date) end function date2yyyymmdd @@ -86,10 +89,19 @@ character(len=8) function sec2hms (seconds) call endrun ('SEC2HMS: bad input seconds: '//stringify((/seconds/))) end if - sec2hms = int_seconds_to_hhmmss(seconds) + sec2hms = core_int_seconds_to_hhmmss(seconds) end function sec2hms + character(len=10) pure function to_str(n) + use string_core_utils, only: core_to_str + integer, intent(in) :: n + character(len=10) :: local_str + + local_str = core_to_str(n) + to_str = local_str + end function to_str + !========================================================================================= end module string_utils diff --git a/test/unit/fortran/src/core_utils/CMakeLists.txt b/test/unit/fortran/src/core_utils/CMakeLists.txt index b288a189..ecfeb6b6 100644 --- a/test/unit/fortran/src/core_utils/CMakeLists.txt +++ b/test/unit/fortran/src/core_utils/CMakeLists.txt @@ -1,3 +1,4 @@ add_pfunit_ctest(core_utils_tests TEST_SOURCES test_string_core_utils.pf LINK_LIBRARIES core_utils) +target_compile_options(core_utils_tests PRIVATE -ffree-line-length-none) \ No newline at end of file diff --git a/test/unit/fortran/src/core_utils/test_string_core_utils.pf b/test/unit/fortran/src/core_utils/test_string_core_utils.pf index 9e816ee5..2c6a346c 100644 --- a/test/unit/fortran/src/core_utils/test_string_core_utils.pf +++ b/test/unit/fortran/src/core_utils/test_string_core_utils.pf @@ -1,27 +1,25 @@ @test subroutine test_integer_one_to_str() use funit - use string_core_utils, only : to_str + use string_core_utils, only : core_to_str integer :: to_convert - character(len=10) :: actual to_convert = 1 - actual = to_str(to_convert) - @assertEqual("1", actual) + @assertEqual("1", core_to_str(to_convert)) end subroutine test_integer_one_to_str @test subroutine test_integer_with_leading_zeros_to_str() use funit - use string_core_utils, only : to_str + use string_core_utils, only : core_to_str integer :: to_convert character(len=10) :: actual to_convert = 001 - actual = to_str(to_convert) + actual = core_to_str(to_convert) @assertEqual("1", actual) end subroutine test_integer_with_leading_zeros_to_str @@ -29,13 +27,13 @@ end subroutine test_integer_with_leading_zeros_to_str @test subroutine test_integer_with_trailing_zeros_to_str() use funit - use string_core_utils, only : to_str + use string_core_utils, only : core_to_str integer :: to_convert character(len=10) :: actual to_convert = 100 - actual = to_str(to_convert) + actual = core_to_str(to_convert) @assertEqual("100", actual) end subroutine test_integer_with_trailing_zeros_to_str @@ -43,13 +41,13 @@ end subroutine test_integer_with_trailing_zeros_to_str @test subroutine test_one_int_date_to_yyyymmdd() use funit - use string_core_utils, only : int_date_to_yyyymmdd + use string_core_utils, only : core_int_date_to_yyyymmdd integer :: to_convert character(len=10) :: actual to_convert = 1 - actual = int_date_to_yyyymmdd(to_convert) + actual = core_int_date_to_yyyymmdd(to_convert) @assertEqual("0000-00-01", actual) end subroutine test_one_int_date_to_yyyymmdd @@ -57,13 +55,228 @@ end subroutine test_one_int_date_to_yyyymmdd @test subroutine test_zero_int_seconds_to_hhmmss() use funit - use string_core_utils, only : int_seconds_to_hhmmss + use string_core_utils, only : core_int_seconds_to_hhmmss integer :: to_convert character(len=8) :: actual to_convert = 0 - actual = int_seconds_to_hhmmss(to_convert) + actual = core_int_seconds_to_hhmmss(to_convert) @assertEqual("00:00:00", actual) end subroutine test_zero_int_seconds_to_hhmmss + +@test +subroutine test_stringify_empty_arrays() + use, intrinsic :: iso_fortran_env, only: int32, int64, real32, real64 + use funit + use string_core_utils, only: core_stringify + + character(128), allocatable :: carr(:) + integer(int32), allocatable :: i32arr(:) + integer(int64), allocatable :: i64arr(:) + logical, allocatable :: larr(:) + real(real32), allocatable :: r32arr(:) + real(real64), allocatable :: r64arr(:) + + + allocate(carr(0), i32arr(0), i64arr(0), larr(0), r32arr(0), r64arr(0)) + + @assertEqual("", core_stringify(carr)) + @assertEqual("", core_stringify(i32arr)) + @assertEqual("", core_stringify(i64arr)) + @assertEqual("", core_stringify(larr)) + @assertEqual("", core_stringify(r32arr)) + @assertEqual("", core_stringify(r64arr)) + +end subroutine test_stringify_empty_arrays + +@test +subroutine test_stringify_character_array + use funit + use string_core_utils, only: core_stringify + + character(128), allocatable :: carr(:) + allocate(carr(10)) + + carr(:) = [ character(len(carr)) :: & + ' Talc', 'Gypsum', 'Calcite', 'Fluorite', 'Apatite', & + 'Orthoclase', 'Quartz', ' Topaz', 'Corundum', 'Diamond' ] + + @assertEqual('Talc, Gypsum, Calcite, Fluorite, Apatite, Orthoclase, Quartz, Topaz, Corundum, Diamond', core_stringify(carr)) + @assertEqual('Talc Date: Wed, 8 Jan 2025 14:54:30 -0700 Subject: [PATCH 31/44] Fix incorrect 64-bit value assignment. Remove string test from GNU run due to compiler error. --- .../fortran/src/core_utils/test_string_core_utils.pf | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/unit/fortran/src/core_utils/test_string_core_utils.pf b/test/unit/fortran/src/core_utils/test_string_core_utils.pf index 2c6a346c..e429b654 100644 --- a/test/unit/fortran/src/core_utils/test_string_core_utils.pf +++ b/test/unit/fortran/src/core_utils/test_string_core_utils.pf @@ -91,7 +91,7 @@ subroutine test_stringify_empty_arrays() end subroutine test_stringify_empty_arrays -@test +@test(#ifndef= __GNUC__) subroutine test_stringify_character_array use funit use string_core_utils, only: core_stringify @@ -155,11 +155,13 @@ subroutine test_stringify_integer_extreme_values allocate(i32arr(10), i64arr(10)) - i32arr(:) = [-huge(int32), -1000, -100, -10, -1, 1, 10, 100, 1000, huge(int32)] - i64arr(:) = [-huge(int64), -1000, -100, -10, -1, 1, 10, 100, 1000, huge(int64)] + i32arr(:) = [-huge(i32arr), -1000, -100, -10, -1, 1, 10, 100, 1000, huge(i32arr)] + i64arr(:) = int(i32arr, int64) + i64arr(1) = -huge(i64arr) + i64arr(10) = huge(i64arr) @assertEqual(int32_no_separator_expected, core_stringify(i32arr)) - @assertEqual(int32_no_separator_expected, core_stringify(i64arr)) + @assertEqual(int64_no_separator_expected, core_stringify(i64arr)) @assertEqual(int32_separator_with_space_expected, core_stringify(i32arr, separator=separator_with_space)) @assertEqual(int64_separator_with_space_expected, core_stringify(i64arr, separator=separator_with_space)) From f522b4b676a26398e53c98b91e5e905bda596734 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Wed, 8 Jan 2025 14:55:11 -0700 Subject: [PATCH 32/44] Add missing reference to core library. --- cime_config/buildlib | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cime_config/buildlib b/cime_config/buildlib index 214e6182..250b9279 100755 --- a/cime_config/buildlib +++ b/cime_config/buildlib @@ -101,7 +101,8 @@ def _build_cam(): os.path.join(atm_root, "src", "history", "buffers", "src"), os.path.join(atm_root, "src", "history", "buffers", "src", "hash"), os.path.join(atm_root, "src", "history", "buffers", "src", "util"), - os.path.join(atm_root, "src", "utils")] + os.path.join(atm_root, "src", "utils"), + os.path.join(atm_root, "src", "core_utils")] for path in phys_dirs: if path not in paths: paths.append(path) From bdfe5605ac4d8633f2f4db39045b41ef8c84182e Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Thu, 9 Jan 2025 08:14:13 -0700 Subject: [PATCH 33/44] Minor code cleanup. --- src/core_utils/string_core_utils.F90 | 15 ++--- src/utils/string_utils.F90 | 91 ++++++++++++---------------- 2 files changed, 44 insertions(+), 62 deletions(-) diff --git a/src/core_utils/string_core_utils.F90 b/src/core_utils/string_core_utils.F90 index 2b41db3c..cffd8a0e 100644 --- a/src/core_utils/string_core_utils.F90 +++ b/src/core_utils/string_core_utils.F90 @@ -12,19 +12,15 @@ module string_core_utils character(len=10) pure function core_to_str(n) ! return default integer as a left justified string - - ! arguments + integer, intent(in) :: n - ! character(len=10) :: local_str - !---------------------------------------------------------------------------- write(core_to_str,'(i0)') n - ! core_to_str = local_str end function core_to_str character(len=10) pure function core_int_date_to_yyyymmdd (date) - ! Undefined behavior if date <= 0 + ! Undefined behavior if date <= 0 ! Input arguments integer, intent(in) :: date @@ -39,12 +35,12 @@ character(len=10) pure function core_int_date_to_yyyymmdd (date) day = date - year*10000 - month*100 write(core_int_date_to_yyyymmdd, '(i4.4,A,i2.2,A,i2.2)') & - year,'-',month,'-',day + year,'-',month,'-',day end function core_int_date_to_yyyymmdd character(len=8) pure function core_int_seconds_to_hhmmss (seconds) - ! Undefined behavior if seconds outside [0, 86400] + ! Undefined behavior if seconds outside [0, 86400] ! Input arguments integer, intent(in) :: seconds @@ -59,7 +55,7 @@ character(len=8) pure function core_int_seconds_to_hhmmss (seconds) secs = (seconds - hours*3600 - minutes*60) write(core_int_seconds_to_hhmmss,'(i2.2,A,i2.2,A,i2.2)') & - hours,':',minutes,':',secs + hours,':',minutes,':',secs end function core_int_seconds_to_hhmmss @@ -160,6 +156,7 @@ pure function core_stringify(value, separator) end select core_stringify = trim(buffer) + end function core_stringify end module string_core_utils diff --git a/src/utils/string_utils.F90 b/src/utils/string_utils.F90 index 636df848..ec24a840 100644 --- a/src/utils/string_utils.F90 +++ b/src/utils/string_utils.F90 @@ -5,18 +5,17 @@ module string_utils use cam_logfile, only: iulog use cam_abortutils, only: endrun use string_core_utils, only: core_int_date_to_yyyymmdd, core_int_seconds_to_hhmmss - use string_core_utils, only: core_stringify=>stringify + use string_core_utils, only: stringify=>core_stringify, to_str=>core_to_str implicit none private ! Public interface methods - public :: strlist_get_ind ! Gets the index of a given string in a list of strings - public :: date2yyyymmdd ! convert encoded date integer to "yyyy-mm-dd" format - public :: sec2hms ! convert integer seconds past midnight to "hh:mm:ss" format - public :: to_str - public :: stringify + public :: date2yyyymmdd ! Convert encoded date integer to "yyyy-mm-dd" format + public :: sec2hms ! Convert integer seconds past midnight to "hh:mm:ss" format + public :: to_str ! Convert integer to left justified string + public :: stringify ! Convert one or more values of any intrinsic data types to a character string for pretty printing ! Private module variables integer, parameter :: lower_to_upper = iachar("A") - iachar("a") @@ -24,45 +23,43 @@ module string_utils CONTAINS - !========================================================================================= - subroutine strlist_get_ind(strlist, str, ind, abort) - ! Get the index of a given string in a list of strings. Optional abort argument - ! allows returning control to caller when the string is not found. Default - ! behavior is to call endrun when string is not found. - - ! Arguments - character(len=*), intent(in) :: strlist(:) ! list of strings - character(len=*), intent(in) :: str ! string to search for - integer, intent(out) :: ind ! index of str in strlist - logical, optional, intent(in) :: abort ! flag controlling abort - - ! Local variables - integer :: m - logical :: abort_on_error - character(len=*), parameter :: sub='strlist_get_ind' - !---------------------------------------------------------------------------- - - ! Find string in list - do m = 1, size(strlist) - if (str == strlist(m)) then - ind = m - return + ! Get the index of a given string in a list of strings. Optional abort argument + ! allows returning control to caller when the string is not found. Default + ! behavior is to call endrun when string is not found. + + ! Arguments + character(len=*), intent(in) :: strlist(:) ! list of strings + character(len=*), intent(in) :: str ! string to search for + integer, intent(out) :: ind ! index of str in strlist + logical, optional, intent(in) :: abort ! flag controlling abort + + ! Local variables + integer :: m + logical :: abort_on_error + character(len=*), parameter :: sub='strlist_get_ind' + !---------------------------------------------------------------------------- + + ! Find string in list + do m = 1, size(strlist) + if (str == strlist(m)) then + ind = m + return + end if + end do + + ! String not found + abort_on_error = .true. + if (present(abort)) abort_on_error = abort + + if (abort_on_error) then + write(iulog, *) sub//': FATAL: string:', trim(str), ' not found in list:', strlist(:) + call endrun(sub//': FATAL: string not found') end if - end do - - ! String not found - abort_on_error = .true. - if (present(abort)) abort_on_error = abort - - if (abort_on_error) then - write(iulog, *) sub//': FATAL: string:', trim(str), ' not found in list:', strlist(:) - call endrun(sub//': FATAL: string not found') - end if - ! error return - ind = -1 + ! error return + ind = -1 end subroutine strlist_get_ind @@ -81,7 +78,6 @@ end function date2yyyymmdd character(len=8) function sec2hms (seconds) - ! Input arguments integer, intent(in) :: seconds if (seconds < 0 .or. seconds > 86400) then @@ -93,15 +89,4 @@ character(len=8) function sec2hms (seconds) end function sec2hms - character(len=10) pure function to_str(n) - use string_core_utils, only: core_to_str - integer, intent(in) :: n - character(len=10) :: local_str - - local_str = core_to_str(n) - to_str = local_str - end function to_str - -!========================================================================================= - end module string_utils From 80f301fcd4825fcebf10fa4e0f54ccfda65aab6e Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Thu, 9 Jan 2025 08:15:11 -0700 Subject: [PATCH 34/44] Cleaning up and adding ifx support to cmake. --- src/core_utils/CMakeLists.txt | 1 - test/unit/fortran/CMakeLists.txt | 5 +++++ test/unit/fortran/src/core_utils/CMakeLists.txt | 1 - 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/core_utils/CMakeLists.txt b/src/core_utils/CMakeLists.txt index 9fd989f6..18b9032e 100644 --- a/src/core_utils/CMakeLists.txt +++ b/src/core_utils/CMakeLists.txt @@ -5,5 +5,4 @@ set(CORE_UTILS_SRC string_core_utils.F90) # Making a change to this project's CMake will not impact the build of # a parent project at this time. add_library(core_utils ${CORE_UTILS_SRC}) -target_compile_options(core_utils PRIVATE -ffree-line-length-none) target_include_directories(core_utils PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) \ No newline at end of file diff --git a/test/unit/fortran/CMakeLists.txt b/test/unit/fortran/CMakeLists.txt index a97790e4..e74d528b 100644 --- a/test/unit/fortran/CMakeLists.txt +++ b/test/unit/fortran/CMakeLists.txt @@ -12,6 +12,11 @@ if(NOT CAM-SIMA-core-utils_IS_TOP_LEVEL) "a parent project at this time.") endif() +# Overwrite the init flags chosen by CMake +if(${CMAKE_Fortran_COMPILER_ID} MATCHES "GNU") + set(CMAKE_Fortran_FLAGS_INIT "-ffree-line-length-none") +endif() + if(CAM_SIMA_ENABLE_CODE_COVERAGE) add_compile_options(-O0 --coverage) diff --git a/test/unit/fortran/src/core_utils/CMakeLists.txt b/test/unit/fortran/src/core_utils/CMakeLists.txt index ecfeb6b6..b288a189 100644 --- a/test/unit/fortran/src/core_utils/CMakeLists.txt +++ b/test/unit/fortran/src/core_utils/CMakeLists.txt @@ -1,4 +1,3 @@ add_pfunit_ctest(core_utils_tests TEST_SOURCES test_string_core_utils.pf LINK_LIBRARIES core_utils) -target_compile_options(core_utils_tests PRIVATE -ffree-line-length-none) \ No newline at end of file From 702178ea81dfde176de16f48805e6483b7cf0321 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Thu, 9 Jan 2025 08:15:38 -0700 Subject: [PATCH 35/44] Adding multiple gnu compiler tests. --- .github/workflows/fortran_unit_tests.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/fortran_unit_tests.yml b/.github/workflows/fortran_unit_tests.yml index 20c7a004..2f3e9d66 100644 --- a/.github/workflows/fortran_unit_tests.yml +++ b/.github/workflows/fortran_unit_tests.yml @@ -15,7 +15,16 @@ concurrency: jobs: gcc-toolchain: runs-on: ubuntu-latest + strategy: + matrix: + version: [10, 11, 12] steps: + - name: Setup GFortran + env: + CC: gcc-${{ matrix.version }} + CXX: g++-${{ matrix.version }} + FC: gfortran-${{ matrix.version }} + - name: Checkout cam-sima uses: actions/checkout@v4 From 1d67d77d884652e5ef456d065233c74dcd6d9845 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Thu, 9 Jan 2025 08:25:15 -0700 Subject: [PATCH 36/44] Attempt to fix workflow. --- .github/workflows/fortran_unit_tests.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/fortran_unit_tests.yml b/.github/workflows/fortran_unit_tests.yml index 2f3e9d66..8b04df57 100644 --- a/.github/workflows/fortran_unit_tests.yml +++ b/.github/workflows/fortran_unit_tests.yml @@ -18,13 +18,11 @@ jobs: strategy: matrix: version: [10, 11, 12] + env: + CC: gcc-${{ matrix.version }} + CXX: g++-${{ matrix.version }} + FC: gfortran-${{ matrix.version }} steps: - - name: Setup GFortran - env: - CC: gcc-${{ matrix.version }} - CXX: g++-${{ matrix.version }} - FC: gfortran-${{ matrix.version }} - - name: Checkout cam-sima uses: actions/checkout@v4 From 0f29932bc8ee2a5916df449c13134f29ec58b5b7 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Thu, 9 Jan 2025 08:30:37 -0700 Subject: [PATCH 37/44] get list of installed gfortran compilers. --- .github/workflows/fortran_unit_tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/fortran_unit_tests.yml b/.github/workflows/fortran_unit_tests.yml index 8b04df57..fd28f94b 100644 --- a/.github/workflows/fortran_unit_tests.yml +++ b/.github/workflows/fortran_unit_tests.yml @@ -28,6 +28,7 @@ jobs: - name: Build pFUnit run: | + ls -larth `which gfortran`* git clone --depth 1 --branch v4.10.0 https://github.com/Goddard-Fortran-Ecosystem/pFUnit.git cd pFUnit cmake -B./build -S. From 5912455c6a25e7479d871b9d271bdfbcc9808c13 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Thu, 9 Jan 2025 08:36:52 -0700 Subject: [PATCH 38/44] Fixing list of compiler versions. --- .github/workflows/fortran_unit_tests.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/fortran_unit_tests.yml b/.github/workflows/fortran_unit_tests.yml index fd28f94b..00657e24 100644 --- a/.github/workflows/fortran_unit_tests.yml +++ b/.github/workflows/fortran_unit_tests.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - version: [10, 11, 12] + version: [12, 13, 14] env: CC: gcc-${{ matrix.version }} CXX: g++-${{ matrix.version }} @@ -28,7 +28,6 @@ jobs: - name: Build pFUnit run: | - ls -larth `which gfortran`* git clone --depth 1 --branch v4.10.0 https://github.com/Goddard-Fortran-Ecosystem/pFUnit.git cd pFUnit cmake -B./build -S. From 297985bbd878143301d9b58bc605d8f881569d28 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Thu, 9 Jan 2025 08:51:56 -0700 Subject: [PATCH 39/44] Debugging line length compile error. --- .github/workflows/fortran_unit_tests.yml | 2 +- test/unit/fortran/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/fortran_unit_tests.yml b/.github/workflows/fortran_unit_tests.yml index 00657e24..44f5e1ce 100644 --- a/.github/workflows/fortran_unit_tests.yml +++ b/.github/workflows/fortran_unit_tests.yml @@ -42,7 +42,7 @@ jobs: -B./build \ -S./test/unit/fortran cd build - make + VERBOSE=1 make - name: Run fortran unit tests run: | diff --git a/test/unit/fortran/CMakeLists.txt b/test/unit/fortran/CMakeLists.txt index e74d528b..cf108b67 100644 --- a/test/unit/fortran/CMakeLists.txt +++ b/test/unit/fortran/CMakeLists.txt @@ -14,10 +14,10 @@ endif() # Overwrite the init flags chosen by CMake if(${CMAKE_Fortran_COMPILER_ID} MATCHES "GNU") + message("Adding free line length to command line.") set(CMAKE_Fortran_FLAGS_INIT "-ffree-line-length-none") endif() - if(CAM_SIMA_ENABLE_CODE_COVERAGE) add_compile_options(-O0 --coverage) add_link_options(--coverage) From 9b4df84ba7d961510c3382420dccb9a9d88299e2 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Thu, 9 Jan 2025 08:58:17 -0700 Subject: [PATCH 40/44] Fixing line length compiler error. --- test/unit/fortran/CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/unit/fortran/CMakeLists.txt b/test/unit/fortran/CMakeLists.txt index cf108b67..965f1581 100644 --- a/test/unit/fortran/CMakeLists.txt +++ b/test/unit/fortran/CMakeLists.txt @@ -14,8 +14,7 @@ endif() # Overwrite the init flags chosen by CMake if(${CMAKE_Fortran_COMPILER_ID} MATCHES "GNU") - message("Adding free line length to command line.") - set(CMAKE_Fortran_FLAGS_INIT "-ffree-line-length-none") + add_compile_options("-ffree-line-length-none") endif() if(CAM_SIMA_ENABLE_CODE_COVERAGE) From aa01137cc3e9aa97bfdfe616ee69f44f7aee34e5 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Thu, 9 Jan 2025 09:00:57 -0700 Subject: [PATCH 41/44] Removing verbose output. --- .github/workflows/fortran_unit_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/fortran_unit_tests.yml b/.github/workflows/fortran_unit_tests.yml index 44f5e1ce..00657e24 100644 --- a/.github/workflows/fortran_unit_tests.yml +++ b/.github/workflows/fortran_unit_tests.yml @@ -42,7 +42,7 @@ jobs: -B./build \ -S./test/unit/fortran cd build - VERBOSE=1 make + make - name: Run fortran unit tests run: | From ab5d34d1e36af0ea46bfe380ae4f8b98bbd040a0 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Thu, 9 Jan 2025 09:07:28 -0700 Subject: [PATCH 42/44] Fixing artifact name conflict. --- .github/workflows/fortran_unit_tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/fortran_unit_tests.yml b/.github/workflows/fortran_unit_tests.yml index 00657e24..8e1c580a 100644 --- a/.github/workflows/fortran_unit_tests.yml +++ b/.github/workflows/fortran_unit_tests.yml @@ -51,7 +51,7 @@ jobs: - name: Upload unit test results uses: actions/upload-artifact@v4 with: - name: unit-test-results + name: unit-test-results-${{ env.FC }} path: build/test_results.xml - name: Setup GCov @@ -69,5 +69,5 @@ jobs: - name: Upload code coverage results uses: actions/upload-artifact@v4 with: - name: code-coverage-results + name: code-coverage-results-${{ env.FC }} path: build/cam_sima_code_coverage.html From eda0f52d15dff0bbb39276643c0468ef3928a05b Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Thu, 9 Jan 2025 13:05:46 -0700 Subject: [PATCH 43/44] Fix gcovr to call correct gcov version. --- .github/workflows/fortran_unit_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/fortran_unit_tests.yml b/.github/workflows/fortran_unit_tests.yml index 8e1c580a..8b298ebf 100644 --- a/.github/workflows/fortran_unit_tests.yml +++ b/.github/workflows/fortran_unit_tests.yml @@ -64,7 +64,7 @@ jobs: run: | source venv/bin/activate cd build - gcovr -r .. --filter '\.\./src' --html cam_sima_code_coverage.html --txt + gcovr --gcov-executable gcov-${{ matrix.version }} -r .. --filter '\.\./src' --html cam_sima_code_coverage.html --txt - name: Upload code coverage results uses: actions/upload-artifact@v4 From a0ec7a843ce82e8371db927f85ef1cc25a684020 Mon Sep 17 00:00:00 2001 From: Michael Waxmonsky Date: Fri, 10 Jan 2025 07:31:53 -0700 Subject: [PATCH 44/44] Removing unused variables and un-needed comment strings. --- src/utils/string_utils.F90 | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/utils/string_utils.F90 b/src/utils/string_utils.F90 index ec24a840..c3d10b79 100644 --- a/src/utils/string_utils.F90 +++ b/src/utils/string_utils.F90 @@ -17,10 +17,6 @@ module string_utils public :: to_str ! Convert integer to left justified string public :: stringify ! Convert one or more values of any intrinsic data types to a character string for pretty printing - ! Private module variables - integer, parameter :: lower_to_upper = iachar("A") - iachar("a") - integer, parameter :: upper_to_lower = iachar("a") - iachar("A") - CONTAINS subroutine strlist_get_ind(strlist, str, ind, abort) @@ -39,7 +35,6 @@ subroutine strlist_get_ind(strlist, str, ind, abort) integer :: m logical :: abort_on_error character(len=*), parameter :: sub='strlist_get_ind' - !---------------------------------------------------------------------------- ! Find string in list do m = 1, size(strlist)