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

mercurial at gmplib.org mercurial at gmplib.org
Tue Nov 15 11:58:25 UTC 2016


details:   /var/hg/gmp/rev/f52e3e815e76
changeset: 17101:f52e3e815e76
user:      Torbjorn Granlund <tg at gmplib.org>
date:      Tue Nov 15 12:57:55 2016 +0100
description:
(TESTS): New variable, allowing separation of compilation and running of tests.

details:   /var/hg/gmp/rev/56aa2e31fb8f
changeset: 17102:56aa2e31fb8f
user:      Torbjorn Granlund <tg at gmplib.org>
date:      Tue Nov 15 12:58:15 2016 +0100
description:
Allow empty tests list.

diffstat:

 mini-gmp/tests/Makefile  |   5 ++++-
 mini-gmp/tests/run-tests |  10 ++++++----
 2 files changed, 10 insertions(+), 5 deletions(-)

diffs (40 lines):

diff -r ebb44438be48 -r 56aa2e31fb8f mini-gmp/tests/Makefile
--- a/mini-gmp/tests/Makefile	Mon Nov 14 20:41:20 2016 +0100
+++ b/mini-gmp/tests/Makefile	Tue Nov 15 12:58:15 2016 +0100
@@ -31,6 +31,9 @@
 	t-double t-cmp_d t-gcd t-lcm t-import t-comb t-signed \
 	t-sqrt t-root t-powm t-logops t-bitops t-scan t-str \
 	t-reuse t-aorsmul t-limbs t-cong t-pprime_p
+# Default TESTS to all tests, allowing overriding TESTS for building tests
+# without running them.
+TESTS = $(CHECK_PROGRAMS)
 
 MISC_OBJS = hex-random.o mini-random.o testutils.o
 
@@ -57,4 +60,4 @@
 #   mpz_cmp_d, mpz_popcount, mpz_hamdist, mpz_ui_pow_ui
 
 check: $(CHECK_PROGRAMS)
-	$(srcdir)/run-tests $(CHECK_PROGRAMS)
+	$(srcdir)/run-tests $(TESTS)
diff -r ebb44438be48 -r 56aa2e31fb8f mini-gmp/tests/run-tests
--- a/mini-gmp/tests/run-tests	Mon Nov 14 20:41:20 2016 +0100
+++ b/mini-gmp/tests/run-tests	Tue Nov 15 12:58:15 2016 +0100
@@ -100,11 +100,13 @@
   shift
 done
 
-if [ $# -eq 0 ] ; then
-  for f in *-test; do test_program "./$f"; done
-else
+# Comment out special handling for zero arguments to support separate
+# tests-build/tests-run.
+#if [ $# -eq 0 ] ; then
+#  for f in *-test; do test_program "./$f"; done
+#else
   for f in "$@" ; do test_program `find_program "$f"`; done
-fi
+#fi
 
 if [ $failed -eq 0 ] ; then
   banner="All $all tests passed"


More information about the gmp-commit mailing list