cosmetics
This commit is contained in:
parent
1e77115a23
commit
029dcf9dab
@ -10,5 +10,5 @@ source: ../../../modules/default_build_paths.cmake
|
||||
[src]
|
||||
source: ../../../modules/src.cmake
|
||||
|
||||
[git]
|
||||
[git_info]
|
||||
source: ../../../modules/git_info/git_info.cmake
|
3
test/fc_git_info/src/CMakeLists.txt
Normal file
3
test/fc_git_info/src/CMakeLists.txt
Normal file
@ -0,0 +1,3 @@
|
||||
include_directories(${PROJECT_BINARY_DIR})
|
||||
|
||||
add_executable(example example.F90)
|
16
test/fc_git_info/src/example.F90
Normal file
16
test/fc_git_info/src/example.F90
Normal file
@ -0,0 +1,16 @@
|
||||
program example
|
||||
|
||||
implicit none
|
||||
logical :: test_ok
|
||||
|
||||
! file generated at build time
|
||||
#include "git_info.h"
|
||||
|
||||
test_ok = len(GIT_COMMIT_HASH) > 0 .and. &
|
||||
len(GIT_COMMIT_AUTHOR) > 0 .and. &
|
||||
len(GIT_COMMIT_DATE) > 0 .and. &
|
||||
len(GIT_BRANCH) > 0
|
||||
|
||||
if (test_ok) print *, 'Test OK!'
|
||||
|
||||
end program
|
@ -1,2 +0,0 @@
|
||||
include_directories("${PROJECT_BINARY_DIR}")
|
||||
add_executable(example example.F90)
|
@ -1,11 +0,0 @@
|
||||
program example
|
||||
implicit none
|
||||
logical :: test_ok
|
||||
! file generated on run-time
|
||||
#include "git_info.h"
|
||||
test_ok = len(GIT_COMMIT_HASH) > 0 .and. &
|
||||
len(GIT_COMMIT_AUTHOR) > 0 .and. &
|
||||
len(GIT_COMMIT_DATE) > 0 .and. &
|
||||
len(GIT_BRANCH) > 0
|
||||
if (test_ok) print *,'Test OK!'
|
||||
end program
|
@ -133,8 +133,8 @@ def test_fc():
|
||||
assert 'Hello World!' in stdout
|
||||
|
||||
|
||||
def test_fc_gitinfo():
|
||||
stdout, stderr = configure_build_and_exe('fc_gitinfo', 'python setup.py --fc=gfortran')
|
||||
def test_fc_git_info():
|
||||
stdout, stderr = configure_build_and_exe('fc_git_info', 'python setup.py --fc=gfortran')
|
||||
assert 'Test OK!' in stdout
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user