OSDN Git Service

Don't link to or test existence of libgfortranbegin
[pf3gnuchains/gcc-fork.git] / libgomp / testsuite / libgomp.fortran / fortran.exp
1 set lang_library_path   "../libgfortran/.libs"
2 set lang_link_flags     "-lgfortran"
3 set lang_test_file_found 0
4
5 load_lib libgomp-dg.exp
6
7 # Initialize dg.
8 dg-init
9
10 if { $blddir != "" } {
11     if [file exists "${blddir}/${lang_library_path}/libgfortran.a"] {
12         set lang_test_file "${lang_library_path}/libgfortran.a"
13         set lang_test_file_found 1
14     } else {
15         puts "No libgfortran library found, will not execute fortran tests"
16     }
17 } elseif [info exists GFORTRAN_UNDER_TEST] {
18     set lang_test_file_found 1
19     # Needs to exist for libgomp.exp.
20     set lang_test_file ""
21 } else {
22     puts "GFORTRAN_UNDER_TEST not defined, will not execute fortran tests"
23 }
24
25 if { $lang_test_file_found } {
26     # Gather a list of all tests.
27     set tests [lsort [find $srcdir/$subdir *.\[fF\]{,90,95,03,08}]]
28
29     if { $blddir != "" } {
30         set ld_library_path "$always_ld_library_path:${blddir}/${lang_library_path}"
31     } else {
32         set ld_library_path "$always_ld_library_path"
33     }
34     append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST]
35     set_ld_library_path_env_vars
36
37     # Main loop.
38     gfortran-dg-runtest $tests ""
39 }
40
41 # All done.
42 dg-finish