0008-libvtv-test-fix.patch 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. From 51e98cbe7c3b71e2b351254b6f82eb6b7bdfb7d1 Mon Sep 17 00:00:00 2001
  2. From: Szabolcs Nagy <nsz@port70.net>
  3. Date: Sat, 20 Aug 2016 21:20:29 +0000
  4. Subject: [PATCH 8/8] libvtv-test-fix
  5. ---
  6. libvtv/configure | 3 +++
  7. libvtv/configure.ac | 1 +
  8. libvtv/testsuite/Makefile.am | 2 ++
  9. libvtv/testsuite/Makefile.in | 33 +++++++++++++++++------------
  10. libvtv/testsuite/lib/libvtv.exp | 5 +++++
  11. libvtv/testsuite/libvtv-test-support.exp.in | 1 +
  12. 6 files changed, 31 insertions(+), 14 deletions(-)
  13. create mode 100644 libvtv/testsuite/libvtv-test-support.exp.in
  14. diff --git a/libvtv/configure b/libvtv/configure
  15. index ea1a17f..93e4d8e 100755
  16. --- a/libvtv/configure
  17. +++ b/libvtv/configure
  18. @@ -15465,6 +15465,8 @@ ac_config_files="$ac_config_files Makefile"
  19. if test "x$VTV_SUPPORTED" = "xyes"; then
  20. ac_config_files="$ac_config_files testsuite/Makefile"
  21. + ac_config_files="$ac_config_files testsuite/libvtv-test-support.exp"
  22. +
  23. fi
  24. case "$target_os" in
  25. @@ -16628,6 +16630,7 @@ do
  26. "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
  27. "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
  28. "testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;;
  29. + "testsuite/libvtv-test-support.exp") CONFIG_FILES="$CONFIG_FILES testsuite/libvtv-test-support.exp" ;;
  30. *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
  31. esac
  32. diff --git a/libvtv/configure.ac b/libvtv/configure.ac
  33. index 19c6508..31ce1ba 100644
  34. --- a/libvtv/configure.ac
  35. +++ b/libvtv/configure.ac
  36. @@ -174,6 +174,7 @@ _EOF
  37. . ${multi_basedir}/config-ml.in
  38. AS_UNSET([ml_norecursion])
  39. ])
  40. + AC_CONFIG_FILES(testsuite/libvtv-test-support.exp)
  41. fi
  42. case "$target_os" in
  43. diff --git a/libvtv/testsuite/Makefile.am b/libvtv/testsuite/Makefile.am
  44. index 561b7e2..6c5e5fc 100644
  45. --- a/libvtv/testsuite/Makefile.am
  46. +++ b/libvtv/testsuite/Makefile.am
  47. @@ -11,3 +11,5 @@ EXPECT = $(shell if test -f $(top_builddir)/../expect/expect; then \
  48. _RUNTEST = $(shell if test -f $(top_srcdir)/../dejagnu/runtest; then \
  49. echo $(top_srcdir)/../dejagnu/runtest; else echo runtest; fi)
  50. RUNTEST = "$(_RUNTEST) $(AM_RUNTESTFLAGS)"
  51. +
  52. +all-local: libatomic-test-support.exp
  53. diff --git a/libvtv/testsuite/Makefile.in b/libvtv/testsuite/Makefile.in
  54. index e19e13e..60754ce 100644
  55. --- a/libvtv/testsuite/Makefile.in
  56. +++ b/libvtv/testsuite/Makefile.in
  57. @@ -52,7 +52,8 @@ build_triplet = @build@
  58. host_triplet = @host@
  59. target_triplet = @target@
  60. subdir = testsuite
  61. -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
  62. +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
  63. + $(srcdir)/libvtv-test-support.exp.in
  64. ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
  65. am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
  66. $(top_srcdir)/../config/depstand.m4 \
  67. @@ -68,7 +69,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
  68. am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
  69. $(ACLOCAL_M4)
  70. mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
  71. -CONFIG_CLEAN_FILES =
  72. +CONFIG_CLEAN_FILES = libvtv-test-support.exp
  73. CONFIG_CLEAN_VPATH_FILES =
  74. SOURCES =
  75. am__can_run_installinfo = \
  76. @@ -260,6 +261,8 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
  77. $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
  78. cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
  79. $(am__aclocal_m4_deps):
  80. +libvtv-test-support.exp: $(top_builddir)/config.status $(srcdir)/libvtv-test-support.exp.in
  81. + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
  82. mostlyclean-libtool:
  83. -rm -f *.lo
  84. @@ -320,7 +323,7 @@ distclean-DEJAGNU:
  85. check-am: all-am
  86. $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU
  87. check: check-am
  88. -all-am: Makefile
  89. +all-am: Makefile all-local
  90. installdirs:
  91. install: install-am
  92. install-exec: install-exec-am
  93. @@ -420,19 +423,21 @@ uninstall-am:
  94. .MAKE: check-am install-am install-strip
  95. -.PHONY: all all-am check check-DEJAGNU check-am clean clean-generic \
  96. - clean-libtool distclean distclean-DEJAGNU distclean-generic \
  97. - distclean-libtool dvi dvi-am html html-am info info-am install \
  98. - install-am install-data install-data-am install-dvi \
  99. - install-dvi-am install-exec install-exec-am install-html \
  100. - install-html-am install-info install-info-am install-man \
  101. - install-pdf install-pdf-am install-ps install-ps-am \
  102. - install-strip installcheck installcheck-am installdirs \
  103. - maintainer-clean maintainer-clean-generic mostlyclean \
  104. - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
  105. - uninstall uninstall-am
  106. +.PHONY: all all-am all-local check check-DEJAGNU check-am clean \
  107. + clean-generic clean-libtool distclean distclean-DEJAGNU \
  108. + distclean-generic distclean-libtool dvi dvi-am html html-am \
  109. + info info-am install install-am install-data install-data-am \
  110. + install-dvi install-dvi-am install-exec install-exec-am \
  111. + install-html install-html-am install-info install-info-am \
  112. + install-man install-pdf install-pdf-am install-ps \
  113. + install-ps-am install-strip installcheck installcheck-am \
  114. + installdirs maintainer-clean maintainer-clean-generic \
  115. + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
  116. + ps ps-am uninstall uninstall-am
  117. +all-local: libatomic-test-support.exp
  118. +
  119. # Tell versions [3.59,3.63) of GNU make to not export all variables.
  120. # Otherwise a system limit (for SysV at least) may be exceeded.
  121. .NOEXPORT:
  122. diff --git a/libvtv/testsuite/lib/libvtv.exp b/libvtv/testsuite/lib/libvtv.exp
  123. index edf5fdd..70e2d0e 100644
  124. --- a/libvtv/testsuite/lib/libvtv.exp
  125. +++ b/libvtv/testsuite/lib/libvtv.exp
  126. @@ -47,6 +47,8 @@ load_gcc_lib timeout-dg.exp
  127. load_gcc_lib torture-options.exp
  128. load_gcc_lib fortran-modules.exp
  129. +load_file libvtv-test-support.exp
  130. +
  131. set dg-do-what-default run
  132. #
  133. @@ -74,6 +76,7 @@ proc libvtv_init { args } {
  134. global ALWAYS_CFLAGS
  135. global CFLAGS
  136. global TOOL_EXECUTABLE TOOL_OPTIONS
  137. + global BUILD_CC
  138. global GCC_UNDER_TEST
  139. global TESTING_IN_BUILD_TREE
  140. global target_triplet
  141. @@ -89,6 +92,8 @@ proc libvtv_init { args } {
  142. if ![info exists GCC_UNDER_TEST] then {
  143. if [info exists TOOL_EXECUTABLE] {
  144. set GCC_UNDER_TEST $TOOL_EXECUTABLE
  145. + } elseif [info exists BUILD_CC] {
  146. + set GCC_UNDER_TEST $BUILD_CC
  147. } else {
  148. set GCC_UNDER_TEST "[find_gcc]"
  149. }
  150. diff --git a/libvtv/testsuite/libvtv-test-support.exp.in b/libvtv/testsuite/libvtv-test-support.exp.in
  151. new file mode 100644
  152. index 0000000..972f8d5
  153. --- /dev/null
  154. +++ b/libvtv/testsuite/libvtv-test-support.exp.in
  155. @@ -0,0 +1 @@
  156. +set BUILD_CC "@CC@"
  157. --
  158. 2.8.1