]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
tests: fix "make check" under VPATH builds
authorRoumen Petrov <bugtrack@roumenpetrov.info>
Sun, 12 Jan 2014 19:37:30 +0000 (21:37 +0200)
committerDaiki Ueno <ueno@gnu.org>
Tue, 28 Jan 2014 07:48:07 +0000 (16:48 +0900)
Previously, we generated init.cfg in $builddir, while tests/init.sh
reads its configuration file (init.cfg) from $srcdir.  This patch
moves the auto-generated part into a separate file
($builddir/init-env) and read the file from $srcdir/init.cfg.

gettext-tools/ChangeLog
gettext-tools/configure.ac
gettext-tools/tests/ChangeLog
gettext-tools/tests/init-env.in [moved from gettext-tools/tests/init.cfg.in with 100% similarity]
gettext-tools/tests/init.cfg [new file with mode: 0644]

index 8d0820c3269b69bc6a310a5011dc451f4f9bc62c..d70e7918e822e9206a3e75c7c3af20a7b78ae54a 100644 (file)
@@ -1,3 +1,10 @@
+2014-01-28  Roumen Petrov <bugtrack@roumenpetrov.info>  (tiny change)
+
+       tests: fix "make check" under VPATH builds
+       Reported at:
+       <https://lists.gnu.org/archive/html/bug-gettext/2014-01/msg00012.html>.
+       * configure.ac: Output init-env instead of init.cfg.
+
 2013-07-25  Daiki Ueno  <ueno@gnu.org>
 
        tests: allow each test to run individually without 'make'
index 348ba87f54b72f682d61c36316fac758d3ba0949..b721106e1422d1c689aa1682c7bcb54c83274c52 100644 (file)
@@ -549,11 +549,11 @@ AC_CONFIG_FILES([m4/Makefile])
 
 AC_CONFIG_FILES([tests/Makefile])
 
-AC_CONFIG_FILES([tests/init.cfg], [changequote(<<,>>)
+AC_CONFIG_FILES([tests/init-env], [changequote(<<,>>)
   # Replace occurrences of make variables with shell variables so they
   # can be adjusted in test scripts.
-  sed -e 's|\$(\([^)]*\))|${\1}|g' < tests/init.cfg > tests/init.cfg.tmp
-  mv tests/init.cfg.tmp tests/init.cfg
+  sed -e 's|\$(\([^)]*\))|${\1}|g' < tests/init-env > tests/init-env.tmp
+  mv tests/init-env.tmp tests/init-env
   changequote([,])])
 
 AC_CONFIG_FILES([gnulib-tests/Makefile])
index 9a3268d48f6083263f5af3521a9924ed9d9fafa2..2413c484409bdba530dc40bf90946227c774244b 100644 (file)
@@ -1,3 +1,12 @@
+2014-01-28  Roumen Petrov <bugtrack@roumenpetrov.info>  (tiny change)
+
+       tests: fix "make check" under VPATH builds
+       Reported at:
+       <https://lists.gnu.org/archive/html/bug-gettext/2014-01/msg00012.html>.
+       * init-env: New file renamed from init.cfg.in.
+       * init.cfg.in: Remove.
+       * init.cfg: Read $builddir/init-env.
+
 2014-01-28  Roumen Petrov <bugtrack@roumenpetrov.info>  (tiny change)
 
        Support configuration with absolute path.
diff --git a/gettext-tools/tests/init.cfg b/gettext-tools/tests/init.cfg
new file mode 100644 (file)
index 0000000..6917e72
--- /dev/null
@@ -0,0 +1,2 @@
+test -f "./init-env" \
+  && . "./init-env"