From a78ec21feaca928ffc8ba8964ef161dc0436b448 Mon Sep 17 00:00:00 2001 From: Christian Thaeter Date: Wed, 14 Jan 2009 01:49:47 +0100 Subject: [PATCH 1/6] ERROR_SET_* macros for different logging levels --- src/lib/error.h | 49 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/src/lib/error.h b/src/lib/error.h index b6fb8a416..100ad7c7b 100644 --- a/src/lib/error.h +++ b/src/lib/error.h @@ -64,8 +64,10 @@ lumiera_err LUMIERA_ERROR_##err = "LUMIERA_ERROR_" #err ":" msg /** * Helper macro to raise an error for the current thread. * This macro eases setting an error. It adds NoBug logging support to the low level error handling. + * Used for unexpected errors which can be handled without any problems. * @param flag NoBug flag describing the subsystem where the error was raised * @param err name of the error without the 'LUMIERA_ERROR_' prefix (example: NO_MEMORY) + * @param extra optional string (or NULL) which adds some more context to the error, can be a temporary */ #define LUMIERA_ERROR_SET(flag, err, extra) \ do { \ @@ -74,11 +76,56 @@ lumiera_err LUMIERA_ERROR_##err = "LUMIERA_ERROR_" #err ":" msg lumiera_error_set(LUMIERA_ERROR_##err, theextra); \ } while (0) +/** + * Helper macro to raise an error for the current thread. + * Same as LUMIERA_ERROR_SET(), but logs at 'LOG_ALERT' level. + * Use this when the application is about to do a emergency shutdown. + * @param flag NoBug flag describing the subsystem where the error was raised + * @param err name of the error without the 'LUMIERA_ERROR_' prefix (example: NO_MEMORY) + * @param extra optional string (or NULL) which adds some more context to the error, can be a temporary + */ +#define LUMIERA_ERROR_SET_ALERT(flag, err, extra) \ + do { \ + const char* theextra = extra; \ + ALERT (flag, "%s%s%s", strchr(LUMIERA_ERROR_##err, ':')+1, theextra?": ":"", theextra?theextra:""); \ + lumiera_error_set(LUMIERA_ERROR_##err, theextra); \ + } while (0) + +/** + * Helper macro to raise an error for the current thread. + * Same as LUMIERA_ERROR_SET(), but logs at 'LOG_CRIT' level. + * Use this when a requested task can not be completed (maybe user intervention is necessary). + * @param flag NoBug flag describing the subsystem where the error was raised + * @param err name of the error without the 'LUMIERA_ERROR_' prefix (example: NO_MEMORY) + * @param extra optional string (or NULL) which adds some more context to the error, can be a temporary + */ +#define LUMIERA_ERROR_SET_CRITICAL(flag, err, extra) \ + do { \ + const char* theextra = extra; \ + CRITICAL (flag, "%s%s%s", strchr(LUMIERA_ERROR_##err, ':')+1, theextra?": ":"", theextra?theextra:"");\ + lumiera_error_set(LUMIERA_ERROR_##err, theextra); \ + } while (0) + +/** + * Helper macro to raise an error for the current thread. + * Same as LUMIERA_ERROR_SET(), but logs at 'LOG_WARNING' level. + * Use this when a not unexected error happens which can be handled. + * @param flag NoBug flag describing the subsystem where the error was raised + * @param err name of the error without the 'LUMIERA_ERROR_' prefix (example: NO_MEMORY) + * @param extra optional string (or NULL) which adds some more context to the error, can be a temporary + */ +#define LUMIERA_ERROR_SET_WARNING(flag, err, extra) \ + do { \ + const char* theextra = extra; \ + WARN (flag, "%s%s%s", strchr(LUMIERA_ERROR_##err, ':')+1, theextra?": ":"", theextra?theextra:""); \ + lumiera_error_set(LUMIERA_ERROR_##err, theextra); \ + } while (0) + /** * Set error state for the current thread. * If the error state of the current thread was cleared, then set it, else preserve the old state. * @param nerr name of the error with 'LUMIERA_ERROR_' prefix (example: LUMIERA_ERROR_NO_MEMORY) - * @param extra a string (possibly a constructed tmpbuf) which adds some more context to the error occured this will be copied + * @param extra a string (possibly a constructed tmpbuf) which adds some more context to the error, can be a temporary * @return old state, that is NULL for success, when the state was cleared and a pointer to a pending * error when the error state was already set */ From 9665aa1df93b3eeebc2b05a5528439267c6b93fa Mon Sep 17 00:00:00 2001 From: Christian Thaeter Date: Wed, 14 Jan 2009 14:50:25 +0100 Subject: [PATCH 2/6] Apply log levels to existing errors --- src/backend/filedescriptor.c | 6 +++--- src/backend/filehandle.c | 9 ++++++--- src/backend/filehandlecache.c | 3 ++- src/backend/mmap.c | 3 ++- src/common/config.c | 2 +- src/common/config_typed.c | 8 ++++---- src/common/plugin.c | 2 +- 7 files changed, 19 insertions(+), 14 deletions(-) diff --git a/src/backend/filedescriptor.c b/src/backend/filedescriptor.c index 8f68e3e42..e27bf66f0 100644 --- a/src/backend/filedescriptor.c +++ b/src/backend/filedescriptor.c @@ -141,7 +141,7 @@ lumiera_filedescriptor_acquire (const char* name, int flags, LList filenode) INFO (filedescriptor, "try creating dir: %s", dir); if (mkdir (dir, 0777) == -1 && errno != EEXIST) { - LUMIERA_ERROR_SET (filedescriptor, ERRNO, name); + LUMIERA_ERROR_SET_CRITICAL (filedescriptor, ERRNO, name); goto error; } *slash = '/'; @@ -152,14 +152,14 @@ lumiera_filedescriptor_acquire (const char* name, int flags, LList filenode) fd = creat (name, 0666); if (fd == -1) { - LUMIERA_ERROR_SET (filedescriptor, ERRNO, name); + LUMIERA_ERROR_SET_CRITICAL (filedescriptor, ERRNO, name); goto error; } close (fd); if (stat (name, &fdesc.stat) != 0) { /* finally, no luck */ - LUMIERA_ERROR_SET (filedescriptor, ERRNO, name); + LUMIERA_ERROR_SET_CRITICAL (filedescriptor, ERRNO, name); goto error; } } diff --git a/src/backend/filehandle.c b/src/backend/filehandle.c index 2197a0805..86d9107f2 100644 --- a/src/backend/filehandle.c +++ b/src/backend/filehandle.c @@ -84,7 +84,8 @@ lumiera_filehandle_handle (LumieraFilehandle self) fd = open (lumiera_filedescriptor_name (self->descriptor), lumiera_filedescriptor_flags (self->descriptor) & LUMIERA_FILE_MASK); if (fd == -1) { - LUMIERA_ERROR_SET (filehandle, ERRNO, lumiera_filedescriptor_name (self->descriptor)); + FIXME ("Handle EMFILE etc with the resourcecollector"); + LUMIERA_ERROR_SET_CRITICAL (filehandle, ERRNO, lumiera_filedescriptor_name (self->descriptor)); } else { @@ -92,13 +93,15 @@ lumiera_filehandle_handle (LumieraFilehandle self) if (fstat (fd, &st) == -1) { close (fd); - LUMIERA_ERROR_SET (filehandle, ERRNO, lumiera_filedescriptor_name (self->descriptor)); + fd = -1; + LUMIERA_ERROR_SET_CRITICAL (filehandle, ERRNO, lumiera_filedescriptor_name (self->descriptor)); } else if (!lumiera_filedescriptor_samestat (self->descriptor, &st)) { close (fd); + fd = -1; /* Woops this is not the file we expected to use */ - LUMIERA_ERROR_SET (filehandle, FILE_CHANGED, lumiera_filedescriptor_name (self->descriptor)); + LUMIERA_ERROR_SET_CRITICAL (filehandle, FILE_CHANGED, lumiera_filedescriptor_name (self->descriptor)); } } self->fd = fd; diff --git a/src/backend/filehandlecache.c b/src/backend/filehandlecache.c index 23dd5fb74..fcec07202 100644 --- a/src/backend/filehandlecache.c +++ b/src/backend/filehandlecache.c @@ -84,8 +84,9 @@ lumiera_filehandlecache_handle_acquire (LumieraFilehandlecache self, LumieraFile /* allocate new filehandle if we are below the limit or no cached handles are available (overallocating) */ NOTICE (filehandlecache, "overallocating filehandle"); ret = lumiera_filehandle_new (desc); + TODO ("use resourcecollector here"); if (!ret) - LUMIERA_ERROR_SET (filehandlecache, FILEHANDLECACHE_NOHANDLE, lumiera_filedescriptor_name (desc)); + LUMIERA_ERROR_SET_ALERT (filehandlecache, FILEHANDLECACHE_NOHANDLE, lumiera_filedescriptor_name (desc)); else --self->available; } diff --git a/src/backend/mmap.c b/src/backend/mmap.c index f39bafc12..d06c8effb 100644 --- a/src/backend/mmap.c +++ b/src/backend/mmap.c @@ -124,6 +124,7 @@ lumiera_mmap_init (LumieraMMap self, LumieraFile file, off_t start, size_t size) { TODO ("check if current mmapped size exceeds configured as_size (as_size be smaller than retrieved from getrlimit())"); + TODO ("use resourcecllector here"); switch (strategy++) { case FIRST_TRY: @@ -173,7 +174,7 @@ lumiera_mmap_init (LumieraMMap self, LumieraFile file, off_t start, size_t size) break; case GIVE_UP: - LUMIERA_ERROR_SET (mmap, MMAP_SPACE, lumiera_filedescriptor_name (file->descriptor)); + LUMIERA_ERROR_SET_ALERT (mmap, MMAP_SPACE, lumiera_filedescriptor_name (file->descriptor)); goto espace; } diff --git a/src/common/config.c b/src/common/config.c index 34d78dcdb..af994ab64 100644 --- a/src/common/config.c +++ b/src/common/config.c @@ -208,7 +208,7 @@ lumiera_config_get (const char* key, const char** value) *value = item->delim+1; } else - LUMIERA_ERROR_SET (configsys, CONFIG_NO_ENTRY, key); + LUMIERA_ERROR_SET_WARNING (configsys, CONFIG_NO_ENTRY, key); } } else diff --git a/src/common/config_typed.c b/src/common/config_typed.c index 4fb55e6cc..aec3fce6c 100644 --- a/src/common/config_typed.c +++ b/src/common/config_typed.c @@ -82,7 +82,7 @@ lumiera_config_number_get (const char* key, long long* value) } } else - LUMIERA_ERROR_SET (configsys, CONFIG_NO_ENTRY, key); + LUMIERA_ERROR_SET_WARNING (configsys, CONFIG_NO_ENTRY, key); } } @@ -208,7 +208,7 @@ lumiera_config_string_get (const char* key, const char** value) *value = scan_string (raw_value); } else - LUMIERA_ERROR_SET (configsys, CONFIG_NO_ENTRY, key); + LUMIERA_ERROR_SET_WARNING (configsys, CONFIG_NO_ENTRY, key); } } @@ -253,7 +253,7 @@ lumiera_config_wordlist_get (const char* key, const char** value) *value = raw_value; } else - LUMIERA_ERROR_SET (configsys, CONFIG_NO_ENTRY, key); + LUMIERA_ERROR_SET_WARNING (configsys, CONFIG_NO_ENTRY, key); TODO ("remove the ERROR_SET because config_get sets it already? also in all other getters in this file"); } @@ -322,7 +322,7 @@ lumiera_config_word_get (const char* key, const char** value) *value = scan_word (raw_value); } else - LUMIERA_ERROR_SET (configsys, CONFIG_NO_ENTRY, key); + LUMIERA_ERROR_SET_WARNING (configsys, CONFIG_NO_ENTRY, key); } } diff --git a/src/common/plugin.c b/src/common/plugin.c index e5045b8e9..ae71ea8b3 100644 --- a/src/common/plugin.c +++ b/src/common/plugin.c @@ -289,7 +289,7 @@ lumiera_plugin_register (LumieraPlugin plugin) } else { - LUMIERA_ERROR_SET (plugin, PLUGIN_REGISTER, plugin->name); + LUMIERA_ERROR_SET_CRITICAL (plugin, PLUGIN_REGISTER, plugin->name); } } return !!lumiera_error_peek(); From 4172bdf17f66308df407f807f565d8d51e63f3f2 Mon Sep 17 00:00:00 2001 From: Christian Thaeter Date: Thu, 15 Jan 2009 01:34:01 +0100 Subject: [PATCH 3/6] move vgsuppression to tests/tool, it will only needed for running tests --- Makefile.am | 1 + src/tool/Makefile.am | 6 ------ src/tool/SConscript | 2 -- tests/tool/Makefile.am | 24 ++++++++++++++++++++++++ tests/tool/SConscript | 14 ++++++++++++++ {src => tests}/tool/vgsuppression.c | 0 6 files changed, 39 insertions(+), 8 deletions(-) create mode 100644 tests/tool/Makefile.am create mode 100644 tests/tool/SConscript rename {src => tests}/tool/vgsuppression.c (100%) diff --git a/Makefile.am b/Makefile.am index c8703c6fa..ac8c0a1b4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -64,6 +64,7 @@ include $(top_srcdir)/icons/Makefile.am include $(top_srcdir)/tests/lib/Makefile.am include $(top_srcdir)/tests/components/Makefile.am include $(top_srcdir)/tests/Makefile.am +include $(top_srcdir)/tests/tool/Makefile.am #EXTRA_DIST += admin debian doc depcomp README.BUILD LICENSE \ # cinelerra-cvs-current.spec diff --git a/src/tool/Makefile.am b/src/tool/Makefile.am index f9445f934..4f6d14b6e 100644 --- a/src/tool/Makefile.am +++ b/src/tool/Makefile.am @@ -24,12 +24,6 @@ luidgen_LDADD = liblumiera.la $(NOBUGMT_LUMIERA_LIBS) liblumiera luidgen_SOURCES = $(lumitool_srcdir)/luidgen.c -noinst_PROGRAMS += vgsuppression -vgsuppression_CPPFLAGS = $(AM_CPPFLAGS) -std=gnu99 -Wall -Werror -vgsuppression_LDADD = liblumiera.la $(NOBUGMT_LUMIERA_LIBS) -ldl liblumieracommon.la liblumieraproc.la -lboost_regex-mt -lboost_program_options-mt -ldl -vgsuppression_SOURCES = $(lumitool_srcdir)/vgsuppression.c - - noinst_PROGRAMS += rsvg-convert rsvg_convert_CPPFLAGS = $(AM_CPPFLAGS) $(LUMIERA_GUI_CFLAGS) -std=gnu99 -Wall -Werror rsvg_convert_LDADD = -lcairo -lglib-2.0 -lgthread-2.0 -lrsvg-2 diff --git a/src/tool/SConscript b/src/tool/SConscript index 0ca19490d..bea1305ed 100644 --- a/src/tool/SConscript +++ b/src/tool/SConscript @@ -7,7 +7,6 @@ Import('env','envGtk','artifacts','core') support_lib = artifacts['support'] -vgsuppr = env.Program('#$BINDIR/vgsuppression','vgsuppression.c', LIBS=core) ## for suppressing false valgrind alarms luidgen = env.Program('#$BINDIR/luidgen', 'luidgen.c', LIBS=support_lib) ## for rendering SVG icons (uses librsvg) rsvg = envGtk.Program('#$BINDIR/rsvg-convert','rsvg-convert.c') @@ -17,7 +16,6 @@ rsvg = envGtk.Program('#$BINDIR/rsvg-convert','rsvg-convert.c') artifacts['tools'] = [ env.Program('#$BINDIR/hello-world','hello.c') #### hello world (checks C build) + env.Program('#$BINDIR/try', 'try.cpp') #### to try out some feature... + luidgen - + vgsuppr + rsvg ] diff --git a/tests/tool/Makefile.am b/tests/tool/Makefile.am new file mode 100644 index 000000000..be9f5b5ef --- /dev/null +++ b/tests/tool/Makefile.am @@ -0,0 +1,24 @@ +# Copyright (C) Lumiera.org +# 2008 Christian Thaeter +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +lumitesttool_srcdir = $(top_srcdir)/tests/tool + +noinst_PROGRAMS += vgsuppression +vgsuppression_CPPFLAGS = $(AM_CPPFLAGS) -std=gnu99 -Wall -Werror +vgsuppression_LDADD = liblumiera.la $(NOBUGMT_LUMIERA_LIBS) -ldl liblumieracommon.la liblumieraproc.la -lboost_regex-mt -lboost_program_options-mt -ldl +vgsuppression_SOURCES = $(lumitesttool_srcdir)/vgsuppression.c + diff --git a/tests/tool/SConscript b/tests/tool/SConscript new file mode 100644 index 000000000..83e25b99d --- /dev/null +++ b/tests/tool/SConscript @@ -0,0 +1,14 @@ +# -*- python -*- +## +## SConscript - SCons buildscript for tool subdirectory (called by SConstruct) +## + +Import('env','envGtk','artifacts','core') + +support_lib = artifacts['support'] + +vgsuppr = env.Program('#$BINDIR/vgsuppression','vgsuppression.c', LIBS=core) ## for suppressing false valgrind alarms + +# build additional test +artifacts['tools'] = [vgsuppr] + diff --git a/src/tool/vgsuppression.c b/tests/tool/vgsuppression.c similarity index 100% rename from src/tool/vgsuppression.c rename to tests/tool/vgsuppression.c From e4208803e069bf5788a00e14fba73f92c5af2ea8 Mon Sep 17 00:00:00 2001 From: Christian Thaeter Date: Fri, 16 Jan 2009 00:10:20 +0100 Subject: [PATCH 4/6] FIX: use .lum extension for the pluginexample.c --- tests/Makefile.am | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index e1f01fc90..750acb887 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -78,13 +78,12 @@ test_config_LDADD = \ check_LTLIBRARIES += examplepluginc.la examplepluginc_la_SOURCES = $(tests_srcdir)/plugin/examplepluginc/example_plugin.c examplepluginc_la_CPPFLAGS = $(AM_CPPFLAGS) -std=gnu99 -Wall -Werror -DLUMIERA_PLUGIN -I$(top_srcdir)/src/ -examplepluginc_la_LDFLAGS = -module -avoid-version -no-undefined -rpath /dev/null +examplepluginc_la_LDFLAGS = -module -avoid-version -no-undefined -rpath /dev/null -shrext .lum check_PROGRAMS += test-interfaces test_interfaces_SOURCES = $(tests_srcdir)/common/test-interfaces.c test_interfaces_CPPFLAGS = $(AM_CPPFLAGS) -std=gnu99 -Wall -Werror test_interfaces_LDADD = liblumiera.la $(LUMIERA_PLUGIN_LIBS) $(NOBUGMT_LUMIERA_LIBS) liblumieracommon.la liblumieraproc.la -ldl -lboost_program_options-mt -lboost_regex-mt -test_interfaces_DEPENDENCIES = examplepluginc.la liblumiera.la check_PROGRAMS += test-filemmap test_filemmap_SOURCES = $(tests_srcdir)/backend/test-filemmap.c From bb8ad9fbd51713cdb9515e3dcaa69153dba44f04 Mon Sep 17 00:00:00 2001 From: Christian Thaeter Date: Fri, 16 Jan 2009 02:18:58 +0100 Subject: [PATCH 5/6] move threads back into the backend --- src/backend/Makefile.am | 11 +++-------- src/{lib => backend}/thread-wrapper.hpp | 2 +- src/{lib => backend}/threads.c | 2 +- src/{lib => backend}/threads.h | 0 src/gui/guistart.cpp | 2 +- src/lib/Makefile.am | 2 -- tests/lib/subsystem-runner-test.cpp | 2 +- tests/lib/thread-wrapper-test.cpp | 2 +- 8 files changed, 8 insertions(+), 15 deletions(-) rename src/{lib => backend}/thread-wrapper.hpp (99%) rename src/{lib => backend}/threads.c (99%) rename src/{lib => backend}/threads.h (100%) diff --git a/src/backend/Makefile.am b/src/backend/Makefile.am index 75bcc0d7e..c2161cc82 100644 --- a/src/backend/Makefile.am +++ b/src/backend/Makefile.am @@ -25,6 +25,7 @@ liblumierabackend_la_LIBADD = liblumiera.la liblumierabackend_la_SOURCES = \ $(liblumierabackend_la_srcdir)/mediaaccessfacade.cpp \ $(liblumierabackend_la_srcdir)/backend.c \ + $(liblumierabackend_la_srcdir)/threads.c \ $(liblumierabackend_la_srcdir)/file.c \ $(liblumierabackend_la_srcdir)/filehandle.c \ $(liblumierabackend_la_srcdir)/filedescriptor.c \ @@ -39,6 +40,7 @@ liblumierabackend_la_SOURCES = \ noinst_HEADERS += \ $(liblumierabackend_la_srcdir)/backend.h \ + $(liblumierabackend_la_srcdir)/threads.h \ $(liblumierabackend_la_srcdir)/file.h \ $(liblumierabackend_la_srcdir)/filehandle.h \ $(liblumierabackend_la_srcdir)/filedescriptor.h \ @@ -46,11 +48,4 @@ noinst_HEADERS += \ $(liblumierabackend_la_srcdir)/mmap.h \ $(liblumierabackend_la_srcdir)/mmapings.h \ $(liblumierabackend_la_srcdir)/mmapcache.h - $(liblumierabackend_la_srcdir)/backend.h \ - $(liblumierabackend_la_srcdir)/file.h \ - $(liblumierabackend_la_srcdir)/filehandle.h \ - $(liblumierabackend_la_srcdir)/filedescriptor.h \ - $(liblumierabackend_la_srcdir)/filehandlecache.h \ - $(liblumierabackend_la_srcdir)/mmap.h \ - $(liblumierabackend_la_srcdir)/mmapings.h \ - $(liblumierabackend_la_srcdir)/mmapcache.h + diff --git a/src/lib/thread-wrapper.hpp b/src/backend/thread-wrapper.hpp similarity index 99% rename from src/lib/thread-wrapper.hpp rename to src/backend/thread-wrapper.hpp index 1edc110ee..3c60cda09 100644 --- a/src/lib/thread-wrapper.hpp +++ b/src/backend/thread-wrapper.hpp @@ -29,7 +29,7 @@ #include "lib/sync.hpp" extern "C" { -#include "lib/threads.h" +#include "backend/threads.h" } #include diff --git a/src/lib/threads.c b/src/backend/threads.c similarity index 99% rename from src/lib/threads.c rename to src/backend/threads.c index 128187095..d0feec9b8 100644 --- a/src/lib/threads.c +++ b/src/backend/threads.c @@ -23,7 +23,7 @@ //TODO: Lumiera header includes// -#include "lib/threads.h" +#include "threads.h" //TODO: internal/static forward declarations// diff --git a/src/lib/threads.h b/src/backend/threads.h similarity index 100% rename from src/lib/threads.h rename to src/backend/threads.h diff --git a/src/gui/guistart.cpp b/src/gui/guistart.cpp index 86a8a0ab4..e0e3b2930 100644 --- a/src/gui/guistart.cpp +++ b/src/gui/guistart.cpp @@ -53,7 +53,7 @@ #include "gui/guifacade.hpp" #include "gui/notification-service.hpp" #include "common/subsys.hpp" -#include "lib/thread-wrapper.hpp" +#include "backend/thread-wrapper.hpp" #include "lib/singleton.hpp" extern "C" { diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am index ab9567089..10ad2f8ed 100644 --- a/src/lib/Makefile.am +++ b/src/lib/Makefile.am @@ -28,7 +28,6 @@ liblumiera_la_SOURCES = \ $(liblumiera_la_srcdir)/rwlock.c \ $(liblumiera_la_srcdir)/condition.c \ $(liblumiera_la_srcdir)/reccondition.c \ - $(liblumiera_la_srcdir)/threads.c \ $(liblumiera_la_srcdir)/luid.c \ $(liblumiera_la_srcdir)/safeclib.c \ $(liblumiera_la_srcdir)/psplay.c \ @@ -54,7 +53,6 @@ noinst_HEADERS += \ $(liblumiera_la_srcdir)/rwlock.h \ $(liblumiera_la_srcdir)/condition.h \ $(liblumiera_la_srcdir)/reccondition.h \ - $(liblumiera_la_srcdir)/threads.h \ $(liblumiera_la_srcdir)/luid.h \ $(liblumiera_la_srcdir)/safeclib.h \ $(liblumiera_la_srcdir)/psplay.h \ diff --git a/tests/lib/subsystem-runner-test.cpp b/tests/lib/subsystem-runner-test.cpp index 06cf5ccfd..99d1fd11f 100644 --- a/tests/lib/subsystem-runner-test.cpp +++ b/tests/lib/subsystem-runner-test.cpp @@ -27,7 +27,7 @@ #include "common/option.hpp" #include "include/symbol.hpp" -#include "lib/thread-wrapper.hpp" +#include "backend/thread-wrapper.hpp" #include "lib/error.hpp" #include "lib/query.hpp" #include "lib/util.hpp" diff --git a/tests/lib/thread-wrapper-test.cpp b/tests/lib/thread-wrapper-test.cpp index e7eb0c5ab..0183cf391 100644 --- a/tests/lib/thread-wrapper-test.cpp +++ b/tests/lib/thread-wrapper-test.cpp @@ -24,7 +24,7 @@ #include "lib/test/run.hpp" #include "include/symbol.hpp" -#include "lib/thread-wrapper.hpp" +#include "backend/thread-wrapper.hpp" #include "lib/sync.hpp" #include From 7d19d195490501892615beff0220184dc0888c2e Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Sat, 17 Jan 2009 14:27:35 +0100 Subject: [PATCH 6/6] SCons: integrated building vgsuppression into the test SConscript --- tests/SConscript | 4 ++++ tests/tool/SConscript | 14 -------------- 2 files changed, 4 insertions(+), 14 deletions(-) delete mode 100644 tests/tool/SConscript diff --git a/tests/SConscript b/tests/SConscript index e914ca001..0a3b5e314 100644 --- a/tests/SConscript +++ b/tests/SConscript @@ -63,6 +63,10 @@ artifacts['testsuite'] = ts = ( [ testExecutable(env, dir) for dir in ['lib','co +# for creating a Valgrind-Suppression file +vgsuppr = env.Program('#$BINDIR/vgsuppression','tool/vgsuppression.c', LIBS=core) ## for suppressing false valgrind alarms +artifacts['tools'] += [vgsuppr] +Depends(ts,vgsuppr) # diff --git a/tests/tool/SConscript b/tests/tool/SConscript deleted file mode 100644 index 83e25b99d..000000000 --- a/tests/tool/SConscript +++ /dev/null @@ -1,14 +0,0 @@ -# -*- python -*- -## -## SConscript - SCons buildscript for tool subdirectory (called by SConstruct) -## - -Import('env','envGtk','artifacts','core') - -support_lib = artifacts['support'] - -vgsuppr = env.Program('#$BINDIR/vgsuppression','vgsuppression.c', LIBS=core) ## for suppressing false valgrind alarms - -# build additional test -artifacts['tools'] = [vgsuppr] -