https://svn.lrde.epita.fr/svn/oln/trunk/milena
Index: ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
Speed up execution times of tests on the median operators.
* tests/tests.mk (LONG_TESTS_CXXFLAGS): New.
Set to -O3.
* tests/level/approx/Makefile.am, tests/level/naive/Makefile.am
(median_CXXFLAGS): New.
Set to $(LONG_TESTS_CXXFLAGS).
level/approx/Makefile.am | 10 ++++++++++
level/naive/Makefile.am | 10 ++++++++++
tests.mk | 8 ++++++--
3 files changed, 26 insertions(+), 2 deletions(-)
Index: tests/tests.mk
--- tests/tests.mk (revision 1658)
+++ tests/tests.mk (working copy)
@@ -8,7 +8,11 @@
#
# AM_CXXFLAGS = $(CXXFLAGS_STRICT) $(CXXFLAGS_DEBUG)
#
-# when oln.m4 is available in the distribution, instead of using the
-# hand-made TESTS_CXXFLAGS.
+# when oln.m4 (or just a part of it) is available in the distribution,
+# instead of using the hand-made TESTS_CXXFLAGS.
TESTS_CXXFLAGS = @TESTS_CXXFLAGS@
AM_CXXFLAGS = $(TESTS_CXXFLAGS)
+
+# FIXME: Likewise, we should compute these values at configure time.
+# Hard-code them for the moment.
+LONG_TESTS_CXXFLAGS = -O3
Index: tests/level/approx/Makefile.am
--- tests/level/approx/Makefile.am (revision 1658)
+++ tests/level/approx/Makefile.am (working copy)
@@ -6,5 +6,15 @@
median
median_SOURCES = median.cc
+# FIXME: The current median test is way too long to run. Break it
+# into two tests: a fast one, executed during `make check', compiled
+# with no optimization, using a small kernel and a small image; and a
+# second one, run during `make check-full', using a big kernel on a
+# normal image (e.g. Lena) and full optimization (`-O3').
+#
+# For the moment, we just have the second test. We run it during
+# target `check', but we shall move it to target `check-full' as soon
+# as a smaller and faster test is written.
+median_CXXFLAGS = $(LONG_TESTS_CXXFLAGS)
TESTS = $(check_PROGRAMS)
Index: tests/level/naive/Makefile.am
--- tests/level/naive/Makefile.am (revision 1658)
+++ tests/level/naive/Makefile.am (working copy)
@@ -6,5 +6,15 @@
median
median_SOURCES = median.cc
+# FIXME: The current median test is way too long to run. Break it
+# into two tests: a fast one, executed during `make check', compiled
+# with no optimization, using a small kernel and a small image; and a
+# second one, run during `make check-full', using a big kernel on a
+# normal image (e.g. Lena) and full optimization (`-O3').
+#
+# For the moment, we just have the second test. We run it during
+# target `check', but we shall move it to target `check-full' as soon
+# as a smaller and faster test is written.
+median_CXXFLAGS = $(LONG_TESTS_CXXFLAGS)
TESTS = $(check_PROGRAMS)