From 8aa1bf1f5cd6cdadccb45675e2084a6414aea8b7 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Thu, 20 Mar 2008 10:04:55 +0000 Subject: [PATCH] fix the make check machinery. The support/filetools check fails, but the problem is in the test itself git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23847 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/Makefile.am | 6 +++--- src/frontends/tests/boost.cpp | 5 ++++- src/frontends/tests/test_biblio | 2 +- src/support/Makefile.am | 15 +++++++-------- src/support/tests/boost.cpp | 6 ++++-- src/support/tests/test_convert | 2 +- src/support/tests/test_filetools | 2 +- src/support/tests/test_lstrings | 2 +- 8 files changed, 22 insertions(+), 18 deletions(-) diff --git a/src/frontends/Makefile.am b/src/frontends/Makefile.am index ededa99a5e..bf19075192 100644 --- a/src/frontends/Makefile.am +++ b/src/frontends/Makefile.am @@ -29,17 +29,17 @@ liblyxfrontends_la_SOURCES = \ EXTRA_DIST = tests/test_biblio TESTS = \ - test_biblio + tests/test_biblio check_PROGRAMS = \ biblio -biblio_LDADD = $(BOOST_REGEX) +biblio_LDADD = $(BOOST_LIBS) $(BOOST_REGEX) biblio_SOURCES = \ tests/biblio.cpp \ tests/boost.cpp makeregfiles: ${check_PROGRAMS} for all in ${check_PROGRAMS} ; do \ - ./$$all > ${srcdir}/regfiles/$$all ; \ + ./$$all > ${srcdir}/tests/regfiles/$$all ; \ done diff --git a/src/frontends/tests/boost.cpp b/src/frontends/tests/boost.cpp index da848fa8b4..ba895204bc 100644 --- a/src/frontends/tests/boost.cpp +++ b/src/frontends/tests/boost.cpp @@ -15,13 +15,16 @@ #include #include +using namespace std; namespace boost { +#ifndef BOOST_NO_EXCEPTIONS void throw_exception(exception const & /*e*/) { BOOST_ASSERT(false); } +#endif void assertion_failed(char const * /*expr*/, char const * /*function*/, @@ -30,4 +33,4 @@ void assertion_failed(char const * /*expr*/, char const * /*function*/, ::abort(); } -} +} // namespace boost diff --git a/src/frontends/tests/test_biblio b/src/frontends/tests/test_biblio index 54961feb44..20fac7d27b 100755 --- a/src/frontends/tests/test_biblio +++ b/src/frontends/tests/test_biblio @@ -1,6 +1,6 @@ #!/bin/sh -regfile=`cat ${srcdir}/regfiles/biblio` +regfile=`cat ${srcdir}/tests/regfiles/biblio` output=`./biblio` test "$regfile" = "$output" diff --git a/src/support/Makefile.am b/src/support/Makefile.am index c9d7a68286..daa62e532b 100644 --- a/src/support/Makefile.am +++ b/src/support/Makefile.am @@ -135,29 +135,28 @@ EXTRA_DIST += \ TESTS = \ - test_convert \ - test_filetools \ - test_lstrings + tests/test_convert \ + tests/test_filetools \ + tests/test_lstrings check_PROGRAMS = \ check_convert \ check_filetools \ check_lstrings -check_convert_LDADD = ../debug.o convert.o docstring.o lstrings.o unicode.o \ +check_convert_LDADD = liblyxsupport.la \ $(BOOST_LIBS) $(QT4_CORE_LIB) check_convert_LDFLAGS = $(QT4_CORE_LDFLAGS) check_convert_SOURCES = \ tests/check_convert.cpp \ tests/boost.cpp -check_filetools_LDADD = ../debug.o libsupport.la $(BOOST_LIBS) +check_filetools_LDADD = liblyxsupport.la $(BOOST_LIBS) check_filetools_SOURCES = \ tests/check_filetools.cpp \ tests/boost.cpp -check_lstrings_LDADD = ../debug.o lstrings.o convert.o docstring.o unicode.o \ - $(QT4_CORE_LIB) +check_lstrings_LDADD = liblyxsupport.la $(BOOST_LIBS) $(QT4_CORE_LIB) check_lstrings_LDFLAGS = $(QT4_CORE_LDFLAGS) check_lstrings_SOURCES = \ tests/check_lstrings.cpp \ @@ -165,5 +164,5 @@ check_lstrings_SOURCES = \ makeregfiles: ${check_PROGRAMS} for all in ${check_PROGRAMS} ; do \ - ./$$all > ${srcdir}/regfiles/$$all ; \ + ./$$all > ${srcdir}/tests/regfiles/$$all ; \ done diff --git a/src/support/tests/boost.cpp b/src/support/tests/boost.cpp index 204898567e..ba895204bc 100644 --- a/src/support/tests/boost.cpp +++ b/src/support/tests/boost.cpp @@ -15,13 +15,16 @@ #include #include +using namespace std; namespace boost { +#ifndef BOOST_NO_EXCEPTIONS void throw_exception(exception const & /*e*/) { BOOST_ASSERT(false); } +#endif void assertion_failed(char const * /*expr*/, char const * /*function*/, @@ -30,5 +33,4 @@ void assertion_failed(char const * /*expr*/, char const * /*function*/, ::abort(); } - -} +} // namespace boost diff --git a/src/support/tests/test_convert b/src/support/tests/test_convert index ae65fa9bee..b73258638c 100755 --- a/src/support/tests/test_convert +++ b/src/support/tests/test_convert @@ -1,6 +1,6 @@ #!/bin/sh -regfile=`cat ${srcdir}/regfiles/convert` +regfile=`cat ${srcdir}/tests/regfiles/convert` output=`./check_convert` test "$regfile" = "$output" diff --git a/src/support/tests/test_filetools b/src/support/tests/test_filetools index 3e67aacec8..c77608b1d9 100755 --- a/src/support/tests/test_filetools +++ b/src/support/tests/test_filetools @@ -1,6 +1,6 @@ #!/bin/sh -regfile=`cat ${srcdir}/regfiles/filetools` +regfile=`cat ${srcdir}/tests/regfiles/filetools` output=`./check_filetools` test "$regfile" = "$output" diff --git a/src/support/tests/test_lstrings b/src/support/tests/test_lstrings index 09ce1c29dc..a05c82baad 100755 --- a/src/support/tests/test_lstrings +++ b/src/support/tests/test_lstrings @@ -1,6 +1,6 @@ #!/bin/sh -regfile=`cat ${srcdir}/regfiles/lstrings` +regfile=`cat ${srcdir}/tests/regfiles/lstrings` output=`./check_lstrings` test "$regfile" = "$output" -- 2.39.5