Commit Graph
68 Commits
Author SHA1 Message Date
Michael Stahl c0b1d1bf57 cppunittester: make tracking down temp file leaks easier
Temp files created before first test method don't see LO_TESTNAME

Change-Id: Iff74abf574f5151980f463646f11c1b32ad0c241
2014-10-15 00:04:33 +02:00
Stephan Bergmann b2725b7d1b Keep TestFixture alive until outputter is done with it
Change-Id: Ifd921efa971f7a9a5c47f42c5d56a3deb1c3a0b3
2014-06-04 11:05:58 +02:00
Stephan Bergmann 9e13afeaf6 Cover ctors/dtors of our TestFixtures under the protectors, too
Change-Id: I4c3030e5a205bd102d0427e74d2fe3b828ff5ae6
2014-06-04 08:55:12 +02:00
Stephan Bergmann bf2e8fadd8 dlclose confuses LeakSanitizer
...so just do not bother unloading the protector libs again

Change-Id: I33caa7beaac3b5e6c4a4836061def24fc5372b70
2014-05-28 08:55:10 +02:00
Michael Meeks 02638a0865 cppunit: always compile with debugging symbols on windows.
Also cleanup some makefile pieces and give better error warnings.

Change-Id: I9f20d60f26d5828f60664941946c266c7d166f32
2014-05-24 20:05:46 +01:00
Michael Meeks ef02ced3ec Win32 - warn of extraordinary behaviour with LoadLibrary and long PATHs
Change-Id: I0a8ee157aa548a5b04df67a2355e3f4fd15e84cd
2014-05-20 14:06:32 +01:00
Tor Lillqvist f9980adc43 Avoid the annoying line wrapping
Change-Id: I3ac2f0bf676491231bcd60eb91e8a36bc6c00620
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2014-05-06 16:55:26 +02:00
Markus Mohrhard 4439abe30f show the failure message again at the end of the test
Change-Id: Ia0bcbf0943aaa20dc5333dc4d18030ecf88e594e
2014-04-29 02:15:43 +02:00
Tor Lillqvist ca54d37245 Add a test listener that outputs failures to stderr as they happen
Makes them intermix properly with debugging output from the tested
functionality.

After the test has run, don't repeat the failure messages, just print a short
summary.

Change-Id: I6b491d3a34094df2da11df5e404adb63299de342
2014-04-24 10:43:56 +03:00
Tor Lillqvist 5723599896 Add informative comment about cross-compiling to iOS in particular
Change-Id: I7c38efdafea13bb5ae5e8a5e1cb07e77853b5c4b
2014-04-24 09:25:38 +03:00
Takeshi Abe 1ec8367608 Avoid possible memory leaks in case of exceptions
Change-Id: I047fd88a89900153089a55b6af123f11fb8bde55
2014-04-24 00:13:28 +09:00
Stephan Bergmann 82861c562f Properly cover in #ifdef TIMETESTS
Change-Id: Iff8f992e5260150b9ba108698b506f5a9ec7dea2
2014-04-03 15:29:22 +02:00
Stephan Bergmann dc9feb69f8 Move invariant writes outside loop
Change-Id: Ia254fe382a00be13a631fcc1b23f940352d8d3ba
2014-03-31 13:35:02 +02:00
Norbert Thiebaud c176cb8907 decorate tempfile name's to help identify leaks' author
unottols TempFile class check in debug bod for
and env variable LO_TESTNAME.. if present it use that as the root
for the tempfile filename.

cppunitteset framework is augmented so that it export such
LO_TESNAME using the cppunit testName(), after replacement of
non-alphnum characters by _

Change-Id: Iebb9545d3bd789083afbeaf4c64eab086b56049a
2014-03-30 20:20:39 -05:00
Stephan Bergmann 70cc2b191b First batch of adding SAL_OVERRRIDE to overriding function declarations
...mostly done with a rewriting Clang plugin, with just some manual tweaking
necessary to fix poor macro usage.

Change-Id: I71fa20213e86be10de332ece0aa273239df7b61a
2014-03-26 16:39:26 +01:00
Takeshi Abe 3b2f956ba6 Drop duplicate #include
Change-Id: Ife8ebbb5e46704c5d2ff46cc345b4ed926e7dc12
2013-12-02 01:02:06 +09:00
Stephan Bergmann 72c2f30cbf -Werror,-Wtautological-constant-out-of-range-compare
Change-Id: I99ae1590067d66f0af968833bc75d773ad3cb15c
2012-12-10 11:00:10 +01:00
Stephan Bergmann 1465fd6537 Fail fast
Change-Id: I17d6ab71ec7bcf40dccb2c9ffe3d9f2e6b10f01c
2012-11-22 08:29:07 +01:00
Michael Meeks ed9a361801 android: fix cppunit testing 2012-11-21 18:59:39 +00:00
Michael Meeks f78a2bcce8 re-base on ALv2 code. Includes:
Patch contributed by Herbert Duerr:
    #i118662# remove berkeleyDB from module xmlhelp (author=orwitt)
    http://svn.apache.org/viewvc?view=revision&revision=1213188
    #i119141# remove ISCII converter for now
    http://svn.apache.org/viewvc?view=revision&revision=1306246
    make exceptions for cppunittester verbose
    http://svn.apache.org/viewvc?view=revision&revision=1174831

    Patches contributed by Pedro Giffuni:
    Avoid some uses of non portable #!/bin/bash in shell scripts.
    http://svn.apache.org/viewvc?view=revision&revision=1235297

    Patch contributed by Oliver-Rainer Wittmann
    88652: applied patch, remove unicows deps
    http://svn.apache.org/viewvc?view=revision&revision=1177585

drop OS/2 code, remove in-line assembler ARM atomics,
and obsolete armarch header.
2012-11-21 14:52:11 +00:00
Tor Lillqvist ef8b179309 Be consistent with surrounding code
Change-Id: Ice88c3912c2fd0d99156acaa8e15518acab3b55b
2012-10-11 11:15:49 +03:00
Tor Lillqvist 62fddc0c00 WaE: 'fn' may be used uninitialized in this function
Change-Id: Ib918bd537b30fe5dc48396fc7e952147003e3b19
2012-10-11 11:15:47 +03:00
Tor Lillqvist d3721e5000 Handle CppUnit::DynamicLibraryManagerException
Change-Id: I81f9b133ffb03c225b276639f60ad5e7f38ec1ef
2012-08-17 20:28:49 +03:00
Michael Meeks 328e2263fb targetted re-work of cppunit pieces. 2012-06-27 19:13:11 +01:00
Tor Lillqvist ae3f7ccaab Recognize unoexceptionprotector and unobootstrapprotector 2012-04-16 01:46:37 +02:00
Michael Stahl 3c854f6d31 WaE: initialization order 2012-04-13 18:31:26 +02:00
Caolán McNamara d117d97418 push and pop protectors around runner run, hopefully fixes windows build 2012-04-13 16:48:53 +01:00
Caolán McNamara 8d7e8a0a3b setup/teardown default component context once before/after all tests
avoids the problems of dangling uno singletons invalidated after the first
dispose and the chain of other singletons that don't expect to need to
re-initialize, etc.

reenable editeng cppunit test

inherit i18npool cppunit test from unotest base

drop LibreOfficeProtector, do "throwable" work in setUp/tearDown not
in ctors/dtors
2012-04-13 13:15:25 +01:00
Szabolcs Dezsi d6bc02f8c4 Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operator 2012-04-06 20:03:42 +02:00
Tor Lillqvist 128749140f More hacking on static linking (iOS) support 2012-03-21 00:00:05 +02:00
Tor Lillqvist 59dfa55180 cppunittester hacks for iOS, intermediate commit
For iOS cppunit plugins aren't really "plugins" (shared libraries),
but just static archives. In the real main program of a cppunit app
(such are not yet written), which calls the lo_main() (the
SAL_IMPLEMENT_MAIN() in cppunittester.cxx) we specifically will call
the initialize methods of the CppUnitTestPlugIns that we statically
link to the app executable. Hopefully that will work out as expected.
2012-02-22 22:35:55 +02:00
Matúš Kukan a9e130ab82 sal: convert to gbuild 2011-12-19 10:14:53 +01:00
Norbert Thiebaud 8fc6fc97d5 remove include of pch header from sal 2011-11-27 13:18:15 -06:00
Caolán McNamara 528a225ddb get TestResult dtor before osl::Module dtor 2011-10-15 12:18:43 +01:00
Caolán McNamara 68b1861ace easier to find leaks if the test harness doesn't leak 2011-10-01 15:35:19 +01:00
Caolán McNamara ec0581d042 add a simple timer for unit tests 2011-09-21 09:47:38 +01:00
Stephan Bergmann d996328cd5 sb140: #i113503# mixing system CppUnit and OOo STLport does not work, backed out a6913c9677c2
For LibO, that just means replacing sal/cppunit.h with sal/precppunit.hxx.
2011-09-12 22:47:50 +02:00
Tor Lillqvist 2495f15abb Do use _CrtDbgReport() in a _DEBUG (enable-dbgutil, non-pro) build 2011-08-17 20:59:45 +03:00
Tor Lillqvist d2218f8e26 iOS hacking for cppunittester
We don't need sal/main.h in salinit.cxx as far as I can see.

Add stuff to sal/main.h so that we can link an iOS executable that
actually will run, and hack the makefile so that cppunittester builds
successfully.

Of course, a cppunittester executable built here won't be usable for
anything interesting as we don't build any dynamic libraries of
LibreOffice code for iOS, so there is nothing to pass on the command
line to load. But hey, baby steps, experimentation, doing work in the
public, commit often, etc...
2011-07-09 13:50:19 +03:00
Caolán McNamara a31275041c missing else, *cough* 2011-07-01 10:40:22 +01:00
Caolán McNamara 5a85cf5045 rearrange the cppunittester to allow makeFixture time exceptions catchable 2011-06-30 15:59:09 +01:00
Tor Lillqvist afff438426 Do build cppunittester when cross-compiling after all 2011-06-16 19:03:23 +03:00
Tor Lillqvist 47a7b9021f Always compare CROSS_COMPILING explicitly to "YES" 2011-06-06 09:17:34 +03:00
Tor Lillqvist 613eefe4f1 Cannot do unit testing when cross-compiling 2011-05-22 02:11:04 +03:00
Caolán McNamara c568ecd03b remove ADAPT_EXT_STL 2011-04-05 11:54:26 +01:00
Fridrich Štrba 24c7ee76e9 Work around Visual Studio lameness with "max" 2011-03-23 18:06:12 +01:00
Jan Holesovsky 4be7cca60b Merge commit 'ooo/DEV300_m103'
Conflicts:
	codemaker/source/bonobowrappermaker/corbaoptions.cxx
	codemaker/source/cppumaker/cppuoptions.cxx
	codemaker/source/cunomaker/cunooptions.cxx
	codemaker/source/idlmaker/idloptions.cxx
	codemaker/source/javamaker/javaoptions.cxx
	cppu/source/typelib/typelib.cxx
	idlc/source/options.cxx
	offapi/com/sun/star/util/PathSubstitution.idl
	offapi/drafts/com/sun/star/form/ListEntryEvent.idl
	offapi/drafts/com/sun/star/form/XBindableValue.idl
	offapi/drafts/com/sun/star/form/XListEntryListener.idl
	offapi/drafts/com/sun/star/form/XListEntrySink.idl
	offapi/drafts/com/sun/star/form/XListEntrySource.idl
	offapi/drafts/com/sun/star/form/XValueBinding.idl
	registry/tools/checksingleton.cxx
	registry/tools/options.hxx
	registry/tools/regcompare.cxx
	registry/tools/regmerge.cxx
	sal/cppunittester/cppunittester.cxx
	sal/osl/unx/socket.c
	sal/osl/w32/diagnose.c
	sal/prj/d.lst
	sal/rtl/source/alloc_fini.cxx
	sal/rtl/source/alloc_global.c
	sal/rtl/source/makefile.mk
2011-03-23 16:59:59 +01:00
Norbert Thiebaud d7fc91fcd1 Merge commit 'ooo/DEV300_m101' into integration/dev300_m101
* commit 'ooo/DEV300_m101': (185 commits)
  chart52: cleanup unused legend entry stuff in preparation of issue #i82802#
  masterfix: #i10000# add missing dependency in offapi
  sb138: #i115619# fix for MinGW
  sb138: #i115619#, #i116038# use osl_setThreadName in binaryurp
  sb138: #i115619# osl_setThreadName
  gridsort: i116682: update UnoControlDialog to reflect XDialog
  gridsort: minor changes to the new API: - renamed XMutableGridDataModel::setRowHeading to updateRowHeading for consistency reasons - renamed XSortableGridDataModel to XSortableGridData - actually, this is not a full-fledged model in itself.
  gridsort: grid control related unit tests (first set, more to come)
  sb138: #i116038# fresh implementation of binary URP bridge
  chart52: #28670# make the legend within charts resizeable - part 2
  gridsort: re-did the column resizing - introduced XGridColumn.Flexibility, determining to which degree the column is resized during auto-column-resizing - removed XGridColumn.PreferredWidth - there really is no need for this anymore now - documented the relationship between XGridColumn.Flexibility and XGridColumn.Resizeable - re-implemented TableControl_Impl::impl_ni_updateColumnWidths, with (hopefully) less magic
  sb139: #i116530# improve Java URP bridge error notification by utilizing the java.lang.Throwable cause facility
  gridsort: document the relationship between soorting the data and notifying XGridDataListeners
  gridsort: introduce XGridColumn::DataModelIndex. this allows for column removal/insertion at the GridColumnModel, without the need to touch the GridDataModel
  locales34: #i112431# adapt documentation to reality
  gridsort: introduce XSortableGridDataModel::removeColumnSort
  gridsort: #163172# added UNO API support for sorting grid data. Implementation still unfinished. Things missing in the SortableGridData implementation - add as listener to the delegator, so we're notified of changes - translate and multiplex those changes - do own notifications (XGridDataListener.dataChanged) when the sort order changed - (possibly) update the sort order when the data in the current sort-column changed
  gridsort: made the row title a row heading, being an Any instead of a string
  gridsort: XMutableGridData: renamed updateRow to updateRowData for consistency; introduced updateRowToolTip as shortcut for multiple updateCellToolTip calls
  gridsort: updateCell->updateCellData, setCellToolTip->updateCellToolTip; in both methods, have (Col,Row) params instead of (Row,Col), for consistency reasons
  ...

Conflicts:
	bridges/inc/bridges/remote/bridgeimpl.hxx
	bridges/inc/bridges/remote/connection.h
	bridges/inc/bridges/remote/context.h
	bridges/inc/bridges/remote/helper.hxx
	bridges/inc/bridges/remote/mapping.hxx
	bridges/inc/bridges/remote/proxy.hxx
	bridges/inc/bridges/remote/remote.h
	bridges/inc/bridges/remote/remote.hxx
	bridges/inc/bridges/remote/stub.hxx
	bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
	bridges/source/remote/context/context.cxx
	bridges/source/remote/static/helper.cxx
	bridges/source/remote/static/mapping.cxx
	bridges/source/remote/static/proxy.cxx
	bridges/source/remote/static/remote.cxx
	bridges/source/remote/static/remote_types.cxx
	bridges/source/remote/static/remote_types.hxx
	bridges/source/remote/static/stub.cxx
	bridges/source/remote/urp/urp_bridgeimpl.cxx
	bridges/source/remote/urp/urp_bridgeimpl.hxx
	bridges/source/remote/urp/urp_cache.h
	bridges/source/remote/urp/urp_cache.hxx
	bridges/source/remote/urp/urp_dispatch.cxx
	bridges/source/remote/urp/urp_dispatch.hxx
	bridges/source/remote/urp/urp_environment.cxx
	bridges/source/remote/urp/urp_job.cxx
	bridges/source/remote/urp/urp_job.hxx
	bridges/source/remote/urp/urp_log.cxx
	bridges/source/remote/urp/urp_log.hxx
	bridges/source/remote/urp/urp_marshal.cxx
	bridges/source/remote/urp/urp_marshal.hxx
	bridges/source/remote/urp/urp_marshal_decl.hxx
	bridges/source/remote/urp/urp_property.hxx
	bridges/source/remote/urp/urp_propertyobject.cxx
	bridges/source/remote/urp/urp_propertyobject.hxx
	bridges/source/remote/urp/urp_reader.cxx
	bridges/source/remote/urp/urp_reader.hxx
	bridges/source/remote/urp/urp_replycontainer.hxx
	bridges/source/remote/urp/urp_threadid.cxx
	bridges/source/remote/urp/urp_threadid.hxx
	bridges/source/remote/urp/urp_unmarshal.cxx
	bridges/source/remote/urp/urp_unmarshal.hxx
	bridges/source/remote/urp/urp_writer.cxx
	bridges/source/remote/urp/urp_writer.hxx
	cppu/source/threadpool/threadpool.cxx
	cppu/util/target.pmk
	cppuhelper/qa/propertysetmixin/comp_propertysetmixin.cxx
	cppuhelper/source/interfacecontainer.cxx
	cpputools/source/regcomplazy/regcomplazy.cxx
	jurt/prj/d.lst
	jvmfwk/source/elements.cxx
	offapi/com/sun/star/awt/grid/GridDataEvent.idl
	offapi/com/sun/star/awt/grid/XGridColumn.idl
	offapi/com/sun/star/awt/tab/makefile.mk
	offapi/com/sun/star/chart2/ExplicitIncrementData.idl
	offapi/com/sun/star/chart2/XPlotter.idl
	offapi/com/sun/star/chart2/XUndoHelper.idl
	offapi/com/sun/star/document/MediaDescriptor.idl
	offapi/com/sun/star/document/makefile.mk
	offapi/com/sun/star/linguistic2/XLanguageGuessing.idl
	offapi/com/sun/star/script/ModuleInfo.idl
	offapi/com/sun/star/script/ModuleType.idl
	offapi/com/sun/star/text/TextMarkupType.idl
	offapi/com/sun/star/util/XTextSearch.idl
	offapi/com/sun/star/xml/sax/XFastAttributeList.idl
	pyuno/source/loader/makefile.mk
	remotebridges/source/bridge/bridge_connection.cxx
	remotebridges/source/bridge/bridge_connection.hxx
	remotebridges/source/bridge/bridge_provider.cxx
	remotebridges/source/bridge/remote_bridge.cxx
	remotebridges/source/bridge/remote_bridge.hxx
	remotebridges/source/dynamicloader/dynamicloader.cxx
	remotebridges/source/factory/bridgefactory.cxx
	remotebridges/source/factory/bridgeimpl.cxx
	remotebridges/source/factory/bridgeimpl.hxx
	remotebridges/source/factory/makefile.mk
	sal/cppunittester/cppunittester.cxx
	sal/inc/osl/diagnose.h
	sal/osl/os2/system.h
	sal/osl/unx/diagnose.c
	sal/osl/unx/file_misc.cxx
	sal/osl/unx/process_impl.cxx
	sal/osl/w32/diagnose.c
	sal/osl/w32/process.cxx
	sal/prj/build.lst
	sal/qa/rtl/math/makefile.mk
	sal/qa/rtl/math/rtl_math.cxx
	sal/qa/rtl/math/rtl_old_testint64.cxx
	sal/qa/rtl/math/test_rtl_math.cxx
	sal/systools/win32/kill/kill.cxx
	sal/textenc/tencinfo.c
	sal/util/sal.map
	stoc/source/inspect/introspection.cxx
	stoc/source/security/file_policy.cxx
	stoc/source/simpleregistry/simpleregistry.cxx
2011-03-08 22:29:39 -06:00
sb bf5a377913 debuglevels: #i117073# Linux/GCC needs SAL_LOADMODULE_GLOBAL for exception handling to work 2011-02-28 08:57:47 +01:00
Frank Schoenheit [fs] 2daf5ba78e debuglevels: ooops - removed a line of code not intended to be committed 2011-02-26 21:52:40 +01:00