1
0
mirror of https://github.com/TREX-CoE/trexio.git synced 2024-12-22 20:35:44 +01:00

Fix fortran test

This commit is contained in:
Anthony Scemama 2023-01-04 13:38:17 +01:00
parent fd75a1cf95
commit 72c100476f
2 changed files with 22 additions and 9 deletions

View File

@ -61,7 +61,7 @@ jobs:
if: failure()
uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2
with:
name: test-report-ubuntu-debug
name: test-report-ubuntu
path: test-suite.log
- name: create virtual environment
@ -107,7 +107,7 @@ jobs:
if: failure()
uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2
with:
name: test-report-ubuntu-debug
name: test-report-ubuntu-2
path: test-suite.log
- name: maintainer clean
@ -142,7 +142,7 @@ jobs:
if: failure()
uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2
with:
name: test-report-ubuntu-debug
name: test-report-macos
path: test-suite.log
- name: clean

View File

@ -1646,7 +1646,7 @@ trexio_cp(const char* source, const char* dest)
if (trexio_inquire(dest) == TREXIO_SUCCESS) {
/* Destination file already exists */
return TREXIO_FILE_ERROR;
};
}
/* Call cp */
@ -1685,12 +1685,25 @@ trexio_cp(const char* source, const char* dest)
#+begin_src f90 :tangle prefix_fortran.f90
interface
integer(trexio_exit_code) function trexio_cp (source, destination) bind(C, name="trexio_cp")
integer(trexio_exit_code) function trexio_cp_c (source, destination) bind(C, name="trexio_cp")
use, intrinsic :: iso_c_binding
import
character(kind=c_char), dimension(*) :: source, destination
end function trexio_cp
end function trexio_cp_c
end interface
integer(trexio_exit_code) function trexio_cp (source, destination)
use, intrinsic :: iso_c_binding
implicit none
character(len=*), intent(in) :: source
character(len=*), intent(in) :: destination
character(len=len_trim(source)+1) :: source_c
character(len=len_trim(destination)+1) :: destination_c
source_c = trim(source) // c_null_char
destination_c = trim(destination) // c_null_char
trexio_cp = trexio_cp_c(source_c, destination_c)
end function trexio_cp
#+end_src
*** Python