[Gmp-commit] /var/hg/gmp-6.2: 2 new changesets

mercurial at gmplib.org mercurial at gmplib.org
Tue Oct 6 16:14:51 UTC 2020


details:   /var/hg/gmp-6.2/rev/ee1842b4663f
changeset: 18081:ee1842b4663f
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Tue Oct 06 18:08:01 2020 +0200
description:
Better support for make check-mini-gmp on wine or cygwin (from Niels)

details:   /var/hg/gmp-6.2/rev/4ab2a52608fb
changeset: 18082:4ab2a52608fb
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Tue Oct 06 18:14:32 2020 +0200
description:
ChangeLog

diffstat:

 ChangeLog                |   4 ++++
 Makefile.am              |   2 +-
 mini-gmp/ChangeLog       |   4 ++++
 mini-gmp/tests/run-tests |  28 ++++++++++++++++++----------
 4 files changed, 27 insertions(+), 11 deletions(-)

diffs (90 lines):

diff -r 09e101b6f2ff -r 4ab2a52608fb ChangeLog
--- a/ChangeLog	Tue Sep 22 15:12:57 2020 +0200
+++ b/ChangeLog	Tue Oct 06 18:14:32 2020 +0200
@@ -1,3 +1,7 @@
+020-10-06  Niels M\xc3\xb6ller  <nisse at lysator.liu.se>
+
+	* Makefile.am: Better support for make check-mini-gmp on wine or cygwin.
+
 2020-09-21  Torbjörn Granlund  <tg at gmplib.org>
 
 	* mpz/n_pow_ui.c: Detect and report overflow.
diff -r 09e101b6f2ff -r 4ab2a52608fb Makefile.am
--- a/Makefile.am	Tue Sep 22 15:12:57 2020 +0200
+++ b/Makefile.am	Tue Oct 06 18:14:32 2020 +0200
@@ -436,7 +436,7 @@
 	abs_srcdir="`cd $(srcdir) && pwd`" ; \
 	$(MKDIR_P) mini-gmp/tests \
 	&& cd mini-gmp/tests \
-	&& TEST_LIBRARY_PATH="../../.libs"  \
+	&& TEST_SHLIB_DIR="${abs_top_builddir}/.libs" \
 	   $(MAKE) -f "$$abs_srcdir/mini-gmp/tests/Makefile" \
 		VPATH="$$abs_srcdir/mini-gmp/tests" \
 		srcdir="$$abs_srcdir/mini-gmp/tests" \
diff -r 09e101b6f2ff -r 4ab2a52608fb mini-gmp/ChangeLog
--- a/mini-gmp/ChangeLog	Tue Sep 22 15:12:57 2020 +0200
+++ b/mini-gmp/ChangeLog	Tue Oct 06 18:14:32 2020 +0200
@@ -1,3 +1,7 @@
+2020-10-06  Niels Möller  <nisse at lysator.liu.se>
+
+	* tests/run-tests: Better support for make check on wine or cygwin.
+
 2020-09-10 Marco Bodrato <bodrato at mail.dm.unipi.it>
 
 	* tests/t-mpq_double.c (mpq_get_d_exact_p): Cleanup.
diff -r 09e101b6f2ff -r 4ab2a52608fb mini-gmp/tests/run-tests
--- a/mini-gmp/tests/run-tests	Tue Sep 22 15:12:57 2020 +0200
+++ b/mini-gmp/tests/run-tests	Tue Oct 06 18:14:32 2020 +0200
@@ -28,6 +28,22 @@
 
 export srcdir
 
+if [ -n "$TEST_SHLIB_DIR" ] ; then
+  # Prepend to LD_LIBRARY_PATH, if it is alredy set.
+  LD_LIBRARY_PATH="${TEST_SHLIB_DIR}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
+  # For MACOS
+  DYLD_LIBRARY_PATH="$TEST_SHLIB_DIR"
+  # For Windows
+  PATH="${TEST_SHLIB_DIR}:${PATH}"
+  # For Wine
+  WINEPATH="${TEST_SHLIB_DIR}"
+
+  export LD_LIBRARY_PATH
+  export DYLD_LIBRARY_PATH
+  export PATH
+  export WINEPATH
+fi
+
 # When used in make rules, we sometimes get the filenames VPATH
 # expanded, but usually not.
 find_program () {
@@ -38,6 +54,8 @@
 	*)
 	  if [ -x "$1" ] ; then
 	      echo "./$1"
+	  elif [ -x "$1.exe" ] ; then
+	      echo "./$1.exe"
 	  else
 	      echo "$srcdir/$1"
 	  fi
@@ -54,20 +72,10 @@
   fi
 }
 
-TEST_LD_LIBRARY_PATH="$LD_LIBRARY_PATH"
-TEST_DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH"
-
-if [ "$TEST_LIBRARY_PATH" ] ; then
-  TEST_LD_LIBRARY_PATH="$TEST_LIBRARY_PATH:$TEST_LD_LIBRARY_PATH"
-  TEST_DYLD_LIBRARY_PATH="$TEST_LIBRARY_PATH:$TEST_DYLD_LIBRARY_PATH"
-fi
-
 test_program () {
   testname=`basename "$1" .exe`
   testname=`basename "$testname" -test`
   if [ -z "$EMULATOR" ] || head -1 "$1" | grep '^#!' > /dev/null; then
-    LD_LIBRARY_PATH="$TEST_LD_LIBRARY_PATH" \
-    DYLD_LIBRARY_PATH="$TEST_DYLD_LIBRARY_PATH" \
     "$1" $testflags
   else
     $EMULATOR "$1" $testflags



More information about the gmp-commit mailing list