| load_lib libgomp-dg.exp |
| load_gcc_lib gcc-dg.exp |
| |
| if { $blddir != "" } { |
| set libstdc++_library_path "../libstdc++-v3/src/.libs" |
| set shlib_ext [get_shlib_extension] |
| if { ![file exists "${blddir}/${libstdc++_library_path}/libstdc++.a"] |
| && ![file exists "${blddir}/${libstdc++_library_path}/libstdc++.${shlib_ext}"] } { |
| verbose -log "No libstdc++ library found, will not execute c++ tests" |
| unset libstdc++_library_path |
| return |
| } |
| lappend lang_library_paths ${libstdc++_library_path} |
| } elseif { ![info exists GXX_UNDER_TEST] } { |
| verbose -log "GXX_UNDER_TEST not defined, will not execute c++ tests" |
| return |
| } |
| if { $blddir != "" } { |
| set lang_source_re {^.*\.[cC]$} |
| set lang_include_flags [exec sh ${blddir}/../libstdc++-v3/scripts/testsuite_flags --build-includes] |
| } |
| lappend ALWAYS_CFLAGS "compiler=$GXX_UNDER_TEST" |
| |
| # If a testcase doesn't have special options, use these. |
| if ![info exists DEFAULT_CFLAGS] then { |
| set DEFAULT_CFLAGS "-O2" |
| } |
| |
| # Initialize dg. |
| dg-init |
| |
| # Turn on OpenMP. |
| lappend ALWAYS_CFLAGS "additional_flags=-fopenmp" |
| |
| # Gather a list of all tests. |
| set tests [lsort [concat \ |
| [find $srcdir/$subdir *.C] \ |
| [find $srcdir/$subdir/../libgomp.c-c++-common *.c]]] |
| |
| set ld_library_path $always_ld_library_path |
| if { $blddir != "" } { |
| append ld_library_path ":${blddir}/${libstdc++_library_path}" |
| } |
| append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST] |
| set_ld_library_path_env_vars |
| |
| # Main loop. |
| dg-runtest $tests "" $DEFAULT_CFLAGS |
| |
| if { $blddir != "" } { |
| unset lang_source_re |
| unset lang_include_flags |
| unset libstdc++_library_path |
| unset lang_library_paths |
| } |
| |
| # All done. |
| dg-finish |