summaryrefslogtreecommitdiff
path: root/solenv/gbuild/CppunitTest.mk
AgeCommit message (Collapse)Author
2017-10-06gbuild: more verbose forwarding of LinkTarget functionsMichael Stahl
The forwarding of LinkTarget subclass functions to LinkTarget functions is currently done in a very elegant way that only requires listing the bare function names once, but the downside is that the subclass functions aren't defined in a way that "git grep" or "ctags" can find, so replace that with more verbose copy-paste definitions. Change-Id: I4bd7f1b1bc0904ae345958e39403ab508db584a1 Reviewed-on: https://gerrit.libreoffice.org/43196 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-08-22unotest: really run every CppunitTest with its own user profileMichael Stahl
Apparently a sw unit test randomly read a partially written autotbl.fmt that was written by another unit test, in particular the file workdir/unittest/user/config/autotbl.fmt. The tests are actually started with -env:UserInstallation=$(call gb_Helper_make_url,$(call gb_CppunitTest_get_target,$*).user) to prevent exactly this problem, but unfortunately it's then overridden by a call to rtl::Bootstrap::set(), which overrides even command line arguments, from test::BootstrapFixtureBase::setUp(). Change-Id: I618574e94755ea38caf9583f3dcf7715396bca48 Reviewed-on: https://gerrit.libreoffice.org/41432 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-07-21migrate to boost::gettextCaolán McNamara
* all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl * all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string") * ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching MODULE .mo files * UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui goes from l10n target to normal one, so the res/lang.zips of UI files go away * translation via Translation::get(hrc-define-key, imbued-std::locale) * python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there to keep finding the .hrc file uniform) so magic numbers can go away there * java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation mechanism * en-US res files go away, their strings are now the .hrc keys in the source code * remaining .res files are replaced by .mo files * in .res/.ui-lang-zip files, the old scheme missing translations of strings results in inserting the english original so something can be found, now the standard fallback of using the english original from the source key is used, so partial translations shrink dramatically in size * extract .hrc strings with hrcex which backs onto xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap * extract .ui strings with uiex which backs onto xgettext --add-comments --no-wrap * qtz for gettext translations is generated at runtime as ascii-ified crc32 of content + "|" + msgid * [API CHANGE] remove deprecated binary .res resouce loader related uno apis com::sun::star::resource::OfficeResourceLoader com::sun::star::resource::XResourceBundleLoader com::sun::star::resource::XResourceBundle when translating strings via uno apis com.sun.star.resource.StringResourceWithLocation can continue to be used Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
2017-07-18More avoidance of invoking gdb with LD_LIBRARY_PATH setStephan Bergmann
...similar to 785eb0ed14cde731c2795f68f004f0b811cfe387 "gbuild: try to avoid invoking gdb with LD_LIBRARY_PATH set", this time for DEBUGCPPUNIT=TRUE in addition to CPPUNITTRACE="gdb --args" Change-Id: I3e2cc5abf76947dc4c7b4d6caa3fd5720720e050
2017-06-13remove TDE integration (vclplug, address book, config backend)Michael Stahl
It has ~no users, can't even be built on modern Linuxes, and it annoys folks who want to refactor VCL. Per ESC decision from 2017-06-08, remove --enable-tde and --enable-tdeab. Change-Id: I51ce4786f29f8fcac2e2bb2a654c41fbfbbd8afd Reviewed-on: https://gerrit.libreoffice.org/38718 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-06-05gb_SUPPRESS_TESTS to build tests but not run themStephan Bergmann
Change-Id: I390b97bbacfc123b952be2b54cf1333b4d5c24a7
2017-03-22gbuild: MSVC: unbreak CPPUNITTRACE='$(DEVENV)'Michael Stahl
... which is unlikely to contain the strings "gdb" or "lldb". (regression from c38a4d9ce248b4b3fcc9208b25dfa599fe506ac0) Change-Id: I355069ec512232898b246d2b0bf8912831f0c80a
2017-02-21When building with clang-cl on Windows, build CLR code with MSVCStephan Bergmann
...as clang-cl doesn't support the /clr switch. * In configure.ac, capture the MSCV version (that would be used if CC hadn't been overridden to use clang-cl) into MSVC_CXX. * The logic which flags to pass into gb_CObject__command_pattern is coded into the platform-agnostic LinkTarget.mk, so it's too late to try and filter all relevant flags in com_GCC_class.mk, depending on whether a given .cxx file is a normal one built with the normal $CXX or a special /clr one built with $MSVC_CXX. Thus, a new CxxClrObject class had to be introduced that captures this information early. * When building with clang-cl, the generated config_host/config_*.h files contain values suitable for clang-cl, but not for MSVC. But the .cxx files compiled with MSVC happen to include config_global.h, and would fail. Hack around that problem for now by introducing a hard-coded, minimal solenv/clang-cl/config_global.h that is found first when buliding such a CxxClrObject. Needs cleaning-up properly. Change-Id: Iff8aac51c0b4fa906b14503c692640dda0996d33 Reviewed-on: https://gerrit.libreoffice.org/34509 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-01-04gbuild: CppunitTest: export VCL_HIDE_WINDOWSMichael Stahl
This currently has no effect and so the CppunitTest_cppcanvas_emfplus pops up an annoying window. (regression from 181932b31ea9c07a9bec3677e73b67a9a6d4e3f2) Change-Id: I26314d98f10f6b39ca1c28821ccd0de6ba2a4358
2016-12-09Fix removal of the temporary dyldpathfileStephan Bergmann
Change-Id: I2a4efc9ade69ab53da81c72528e18ecb99e99757
2016-12-06Make the CPPUNITTRACE="lldb --" thing work again (on macOS)Tor Lillqvist
It doesn't seem to work (any longer in 10.12) to pass DYLD_LIBRARY_PATH in the environment to the process to be run under lldb. We need to make lldb execute an explicit 'settings set target.env-vars' command. Use a temporary file to pass that command. I could not figure out where to call the gb_CppunitTest_POSTGDBTRACE macro I define, to remove the temporary file, sorry. Help appreciated. Change-Id: I46bd05f14623639e6ce10112b92ef497cdbb0755
2016-11-28add cppunit tests to gbuildtojsonMarkus Mohrhard
Change-Id: I655190464e2b4289f5c51b194821f9288272d301 Reviewed-on: https://gerrit.libreoffice.org/31271 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2016-11-22Exit gb_CppunitTest_localized loop on first failureStephan Bergmann
...instead of ignoring failures in every but the last iteration Change-Id: Ie80e78f75aaec5e9b1625c2e1ef740adf31fab1b
2016-11-21add missing deps on ui filesDavid Tardon
Change-Id: I28bb2a33c02d8eadced584d3d3f2b62b2e847324
2016-11-20gbuild allow unitest to run once per lang in WITH_LANG_LISTNorbert Thiebaud
this is motivated by the new screenshot feature the initial proposed solution involved running make screenshot once per lang which took ~6 hours for --with-lang=ALL on tb68 a reasonnably big windows slavebot. with this patch, one can run make screenshot just once and get all the screenshot the elapsed time is 36 inutes on the same box/same config a 10x improvement. Change-Id: I4339caebf915c118aa455de2a7e56e1a4e413939 Reviewed-on: https://gerrit.libreoffice.org/30970 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2016-09-29gbuild: try to avoid invoking gdb with LD_LIBRARY_PATH setMichael Stahl
Commit b078e0d638514b298616838fae090b8294bac32f introduced the problem that gdb will load via LD_LIBRARY_PATH the libpython3.5m.so.1.0 from INSTDIR instead of the one from the system, which makes it unhappy (at least on Fedora 24). Try to hack around that by detecting that the user wants to run gdb, and passing in a command "set environment LD_LIBRARY_PATH ..." so that "run" inside gdb uses the custom LD_LIBRARY_PATH but gdb itself does not. Change-Id: I1d29d2af1a77ffab3e718a876c17c29de444c6d9 Reviewed-on: https://gerrit.libreoffice.org/29349 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-08-30Fix placement of EXTRA_ENV_VARSStephan Bergmann
Change-Id: Id9ae15aaf24b65abfcb4006490836eae8a1d8db6
2016-08-30Hack for shaky VCL test under ASanStephan Bergmann
Change-Id: I0c89d1c23ddc1d0d6cd98d95ef31622a30d4862b
2016-08-18screenshots: unset VCL_HIDE_WINDOWSKatarina Behrens
Those screenshot cppunit tests need to run in non-headless mode with dialog windows exposed (i.e. VCL_HIDE_WINDOWS must not be set) To preserve the current behaviour (VCL_HIDE_WINDOWS is set always on Win and Mac, and in use_vcl_non_headless case on Linux), introduce 2 new variables: gb_CppunitTest_show_windows: unset VCL_HIDE_WINDOWS unconditionally gb_CppunitTest_hide_windows: set VCL_HIDE_WINDOWS=1 if HEADLESS is empty (i.e. let's not use emptiness of HEADLESS as an indicator, as it is empty in 2 mutually exclusive cases) Change-Id: Ib2f7a9cfb1202944d10856c44b6ac7c41156b333
2016-08-17enable password export tests under macosxCaolán McNamara
gerrit says they build with this cert folder disable variable in place Change-Id: Ibf711a01e6c055613c65dd94d85b523e7c8b5acd
2016-06-15tdf#98955 hardware_concurrency not ideal for thread poolsAshod Nakashian
A new static member getPreferredConcurrency added to comphelper::ThreadPool to return a configurable max number of threads. By default the new function returns the hardware_concurrency value provided by std::thread. When MAX_CONCURRENCY envar is defined, the return value is limited to whatever is set there. Three call-sites that used std::thread::hardware_concurrency have been replaced with getPreferredConcurrency. Unittests added to cover the functionality of the new member. Unittests are capped to 4 threads. Change-Id: I3332e393a88a5ed436316fa712ed920a4b37f4af Reviewed-on: https://gerrit.libreoffice.org/26254 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-16add VALGRIND_GDB also for normal unit testsMarkus Mohrhard
Change-Id: I1920ece6ca683403d72a68b6705da2dea7c9ad9b
2016-04-16fix crash in perfcheckMarkus Mohrhard
Change-Id: I8e053f5f0c6994c44485f61f5b3dc489271b8c5f
2015-11-17make CPPUNITTRACE=TRUE a shortcut for debuging on WNTBjoern Michaelsen
Change-Id: Ie834e1e1592163977435f0af6dde04c4fe86c1bf Reviewed-on: https://gerrit.libreoffice.org/19977 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2015-11-17refactor unittest help messageBjoern Michaelsen
- get platform switch logic out of shell script - platform specific stuff should be in $(GBUILDDIR)/platform, if possible - do not suggest shell-polluting exports, which might lead to confusion later, suggest setting the var as a one-off addition to the make command - move exception caching down, as it is assumed to be used rather rarely Change-Id: I01db3ca07582a6c6213ebac86fddabb28c925d50 Reviewed-on: https://gerrit.libreoffice.org/19976 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2015-10-05Fix gb_CppunitTest__use_vcl dependenciesStephan Bergmann
Regression introduced with 41c66312885393614c274897fd75a25c2ddf6ba0 "The 'svp' 'plug-in' library is empty so don't build it at all" Change-Id: I534173372ee21e16c78693f60957706bbf61c1c8
2015-09-25Replace GUIBASE with USING_X11Samuel Mehrbrodt
That's what it actually means. Also make it a boolean Change-Id: I249e18351253b34b5dada28e2a9c6bc0c06b730c Reviewed-on: https://gerrit.libreoffice.org/18688 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-09-03remove KDE3 support, --enable-kde and --enable-kdeabMichael Stahl
With the new RHEL6-era baseline TDF can finally ship KDE4 support. Change-Id: I227278b576a3ed2f2aaa751d41b469ca92dc78b3 Reviewed-on: https://gerrit.libreoffice.org/18267 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-09-02percheck: produce similar stats than off-tree callgrindNorbert Thiebaud
Change-Id: I7035ea6f2d9ffe92282533064d69b75e2c1989e1
2015-08-31sal: don't use --target as parameter to cppunittesterMichael Stahl
CppunitTest_libreofficekit_tiledrendering hangs because the soffice_main exits due to the unrecognized command line arg --target. Use a -env:VARIABLE argument instead, which is filtered out by rtl_getAppCommandArg() so does not reach the soffice_main code. (regression from 87514b0907dfbb479e2646b5ff951c68babf3417) Change-Id: I2c801305398dccfb447e4e5c44726f42bf2a72ef
2015-08-31log resource usage of unit tests on UNX platformsMarkus Mohrhard
Change-Id: I3788eae60f73bc42488bf2e4961922962f7e505b Reviewed-on: https://gerrit.libreoffice.org/18155 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-07-01gbuild: CppunitTest: don't hang with DEBUGCPPUNIT=TRUE ...Michael Stahl
... if the process exits before the "bt" command, because then gdb will print an error that there is no stack and stop the script before "quit". Change-Id: I0f3a1381e17dda7e8a7d958e0cbc96676bbc23ce
2015-05-28More aggressive system malloc memory checking for linux unit tests.Michael Meeks
Change-Id: If8e70dc25c537fcf12de0853d91c30f0e6f92e31 Reviewed-on: https://gerrit.libreoffice.org/15940 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-05-22Revert "gbuild: allow recording of CppunitTests and PythonTests too"Michael Stahl
This reverts commit 5a7816b971c51ea4b642738a065e90d4d9bf12d7.
2015-05-21gbuild: allow recording of CppunitTests and PythonTests tooMichael Stahl
Since these don't use soffice they need to be tweaked to use RR varaiable. Unfortunately rr crashes in some CppunitTest so don't enable that now. Unfortunately rr crashes in PythonTest. Change-Id: I2143618fa2181e36b6aaeded43637cb3481f5e47
2015-05-18Revert "gbuild: CppunitTest: allow specifying arguments with CPPUNITTEST_ARGS"Michael Stahl
This reverts commit 1b6be726449fb9b1ff54bc99a1b8839621444ddc. It turned out not to be necessary, see commit 9ce371fa1626bb845e702ceef66a730547b313a8
2015-04-26--enable-mergelibs: Turns out we don't need to install saxMatúš Kukan
We are lucky, saxparser(expwrap) is only needed to build localedata* libs which are only runtime dependencies, and can be built *after* libmerged. So, simplify and move runtime deps to CppunitTest. This reverts commits 59cea45ec247df1acb691308c940ff97673e4c48 and partially 5e45637568ceefee21fe329a5254881963fecd7a Change-Id: I1a1fb4a48fd1a22a9b3a48f0eb0f123649c113b0
2015-04-25gbuild: CppunitTest: allow specifying arguments with CPPUNITTEST_ARGSMichael Stahl
Change-Id: Ied595f97c2a6501a7e80a378a474689c43ad60d9
2015-03-20The 'svp' "plug-in" library is empty so don't build it at allTor Lillqvist
Its code is in the vcl library nowadays. Change-Id: Idb659e541226724004660102f6641c38a2312c27
2015-02-27gbuild: CppunitTest: always use unittest configurationMichael Stahl
The sc_subsequent_filters_test was failing because of a lock file because it did not use the unittest configuration. Refactor gb_CppunitTest_use_configuration so it uses both the instdir and unittest configuration to prevent such errors. In case there ever is a test that does not work with the unittest configuration it should call gb_CppunitTest_use_instdir_configuration. Change-Id: Ibc00d42f8b6102d50d922f51173120798fa45c6e
2014-12-21Remove unused gb_*_disable_compiler_pluginsStephan Bergmann
Change-Id: Ia6395282916011d75a4fa01aa12e96d866621411
2014-12-18Introduce gb_*_set_external_codeStephan Bergmann
...to harmonize the mechanisms to not define LIBO_INTERNAL_ONLY for extension code and CppunitTest_odk_checkapi. (It also needs to revert any -Wundef, as the config_host/config_*.h files will not be included, so the HAVE_* macros will be undefined.) This obsoletes the need for RTL_DISABLE_FAST_STRING. Change-Id: If5eacba80c349efb90762aade8f2ea6d2db7e314
2014-12-07solenv: no need to advertise lldb/devenv on Linux in unittest-failed.shMiklos Vajna
Change-Id: I1dd1b7804defdf363599c17dee3ab1333cf46ee7
2014-12-04Add gb_CppunitTest_use_confpreinit:Andrzej Hunt
For unit tests that use the VCL event loop we can use this to avoid the otherwise required restart. Change-Id: I48265d7e7188a4efaa6f87432c762320331c0c78
2014-10-29Improve framework for callgrind performance unit testsMatúš Kukan
Do not abort in tests which take longer then before. Since 4f5f6d2444a24138c3d3d378771f87cb06427195 we have nice tool to collect callgrind results, store them.. Also, make it not necessary to duplicate anything. Any test can be turned into a performance test by using callgrindStart/callgrindDump. You only need to duplicate the makefile name in gb_Module_add_perfcheck_targets. So, if the test is run as part of 'perfcheck', it runs under callgrind, otherwise it behaves like a regular unit test. Change-Id: I7acbb855b1823c9a32ba126abb57dccc767ca239
2014-10-24Beware gb_CppunitTest_use_library_files plus gb_CppunitTest_use_componentStephan Bergmann
...it causes the library's objects to be loaded twice, causing potential trouble with static data. So introduce gb_Cppunit_set_componentfile, processing the library's source component file into an additional workdir/CppuntiTest/ component file referencing the test library. (This required to drop the gb_Helper_abbreviate_dirs bric-a-brac, as it would do $W replacement into file URLs contained in the resulting .component file.) Change-Id: I57847e549817d25cca53a13effd7d408e0c99f9a
2014-10-13enhance perfcheck failing messageLaurent Godard
add the expected number Change-Id: Ib068288f7efbfebc2705c6084dc34a651def1986 Reviewed-on: https://gerrit.libreoffice.org/11948 Reviewed-by: Matúš Kukan <matus.kukan@collabora.com> Tested-by: Matúš Kukan <matus.kukan@collabora.com>
2014-10-09Remove jvmfwk plugin featureStephan Bergmann
...which was effectively unused; there only ever was a single sunjavaplugin that is now folded directly into jvmfwk. Leaves room for further clean up. Change-Id: I14dd2a3a09bd1ce9a8c3f5c156628ec11d954a0b
2014-09-15gbuild command for disabling usage of compiler plugins for a targetLuboš Luňák
to be used by odk/ checkapi test Change-Id: I6bbb508cc6950a63218e8e4f3364306c7c79b087
2014-09-15two missing CppunitTest gbuild functionsLuboš Luňák
Change-Id: Ie56471d30dfcd8883d54ff00cb85af945649b9b1