-
Notifications
You must be signed in to change notification settings - Fork 1
/
fortun.f90
37 lines (27 loc) · 995 Bytes
/
fortun.f90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
!------------------------------------------------------------------------
!
!> Main program fortun.
!
!> fortun looks for files starting with 'test_' and compiles them if
!> needed, then it runs the test written in these files
!
!------------------------------------------------------------------------
program fortun
use fortun_input, only : check_arguments, get_cwd
use fortun_generate, only : generate
implicit none
character(len=1024) :: cwd !< current working directory
character(len=1024) :: test_cmd !< command to run the tests
!-- process input: command line arguments, etc
if (.not.check_arguments()) then ! todo: display help/usage
print *, "pb arguments"
stop
end if
!-- generation of test executable
call get_cwd(cwd)
call generate(trim(cwd), trim(cwd))
!-- run all tests
test_cmd = "./fortun_test" !< only for linux now, should provide a better way
call system(trim(test_cmd))
!-- display results
end program fortun