c.exp 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # This program is free software; you can redistribute it and/or modify
  2. # it under the terms of the GNU General Public License as published by
  3. # the Free Software Foundation; either version 2 of the License, or
  4. # (at your option) any later version.
  5. #
  6. # This program is distributed in the hope that it will be useful,
  7. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  9. # GNU General Public License for more details.
  10. #
  11. # You should have received a copy of the GNU General Public License
  12. # along with this program; if not, write to the Free Software
  13. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  14. if [info exists lang_library_path] then {
  15. unset lang_library_path
  16. unset lang_link_flags
  17. }
  18. if [info exists lang_test_file] then {
  19. unset lang_test_file
  20. }
  21. load_lib libitm-dg.exp
  22. load_gcc_lib gcc-dg.exp
  23. # If a testcase doesn't have special options, use these.
  24. if ![info exists DEFAULT_CFLAGS] then {
  25. set DEFAULT_CFLAGS "-O2"
  26. }
  27. # Initialize dg.
  28. dg-init
  29. # Gather a list of all tests.
  30. set tests [lsort [find $srcdir/$subdir *.c]]
  31. set ld_library_path $always_ld_library_path
  32. append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST]
  33. set_ld_library_path_env_vars
  34. # Main loop.
  35. dg-runtest $tests "" $DEFAULT_CFLAGS
  36. # All done.
  37. dg-finish