Commit Graph
34 Commits
Author SHA1 Message Date
Stephan Bergmann 84e0627cbd Don't let PythonTest_solenv_python fail due to Emacs lock files in SRCDIR
Emacs has a habit of placing lock files next to files being edited, which are
actually dangling symlinks not pointing at actual files, but where the symlink
content itself encodes some information about who locked the file.

When such a lock file happens to be present in the source tree during `make
PythonTest_solenv_python`, the latter fails because shutil.copytree by default
copies files pointed at by symlinks, instead of the symlinks themselves, and
causes an error if that fails.

An alternative fix would be to call shutil.copytree with symlinks=true (copy
symlinks, not the files pointed at) or ignore_dangling_symlinks=true (don't fail
if a dangling symlink can't be copied).  But for now just don't copy any of
those additional files that Emacs likes to place next to edited files (and which
are also all ignored in our .gitignore).

Change-Id: Ib731a5395fe8d40767878c17b1fb422b914bb329
Reviewed-on: https://gerrit.libreoffice.org/48898
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-30 21:10:51 +01:00
Michael Stahl 3deee910ab gbuild: handle GENCXXCLROBJECTS in gbuildtojson
Change-Id: Ib5808a715e4ba0e0a5d9eea8260ea72fd85ccda2
2017-11-24 12:53:04 +01:00
Caolán McNamara 00657aef09 migrate to boost::gettext
* 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-21 08:20:50 +01:00
Armin Le Grand 83535a28c5 emfplus: create a wmf/emf/emf+ primitive based importer
First steps to organize an importer that can read/interpret
wmf/emf/emf+ and deliver a primitive representation for
the content by parsing it. Use the same mechanisms as
already applied for Svg, so to reuse abilities to keep
original binary data to allow save again and embedding in
files and have an implemented replacement bitmap based
representation. For this, unify the used helper classes
to handle more than just Svg. For 1st try, add test code
and static bool switches

Change-Id: I6e0a82943541d811a8f8d65a84115569fcd8cee7
2017-07-15 11:01:29 +02:00
Markus Mohrhard b7b159d79c remove the old collaboration feature based on telepathy
Change-Id: I1f08d6ef43b76e7bae41ac33bb954f506ae7c485
Reviewed-on: https://gerrit.libreoffice.org/36542
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-04-14 03:32:37 +02:00
Miklos Vajna b00f3c87ac Revert "Is gbuildtojson missing support for ExternalPackage?"
This reverts commit d8a47a2311. It does
not seem to be necessary after ee9cb85e9a
(gpgme: change gb_LinkTarget__use_gpgmepp to depend on package,
2017-03-10) fixed the root cause.

Change-Id: I0e421d29d37853b0f4dd9d2ce4acf0cc1d09882f
2017-03-14 16:29:33 +01:00
Stephan Bergmann d8a47a2311 Is gbuildtojson missing support for ExternalPackage?
(Now that xmlsecurity/Executable_pdfverify.mk mentions that since
f764d67da4 "Fix Executable_pdfverify dependencies
on Linux".)  Probably---but how am I supposed to fix that tempfile mess?  So
just take xmlsecurity out of the module list until somebody knowledgeable about
gbuildtojson fixes that.

[...]
> mkdir -p /data/lo/core/TMPDIR/gbuildaeu7wqev/GbuildToJson/CppunitTest/
> mkdir -p /data/lo/core/TMPDIR/gbuildaeu7wqev/LinkTarget/CppunitTest/
> LD_LIBRARY_PATH=/data/lo/core/instdir/program:/data/lo/core/instdir/program:/data/lo/core/workdir/UnpackedTarball/cppunit/src/cppunit/.libs LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}"/data/lo/core/instdir/program:/data/lo/core/instdir/program"   /data/lo/core/TMPDIR/gbuildaeu7wqev/LinkTarget/Executable/gbuildtojson --makefile=/data/lo/core/TMPDIR/gbuild.X1C36q --linktarget=/data/lo/core/TMPDIR/gbuild.0zidFs --ilibtarget=/data/lo/core/TMPDIR/gbuild.LCl6Cf --cxxobjects=/data/lo/core/TMPDIR/gbuild.r4VEGz --yaccobjects=/data/lo/core/TMPDIR/gbuild.V6y0Sc --objcobjects=/data/lo/core/TMPDIR/gbuild.LBrqAl --objcxxobjects=/data/lo/core/TMPDIR/gbuild.WVv4ht --cxxclrobjects=/data/lo/core/TMPDIR/gbuild.H6vJbO --asmobjects=/data/lo/core/TMPDIR/gbuild.8hALYD --lexobjects=/data/lo/core/TMPDIR/gbuild.DOfpRn --gencobjects=/data/lo/core/TMPDIR/gbuild.0ErRmu --gencxxobjects=/data/lo/core/TMPDIR/gbuild.w2TAEg --cobjects=/data/lo/core/TMPDIR/gbuild.igfxay --javaobjects=/data/lo/core/TMPDIR/gbuild.WcfpOt --pythonobjects=/data/lo/core/TMPDIR/gbuild.O4Myeb --cflags=/data/lo/core/TMPDIR/gbuild.GRNm3B --cflagsappend=/data/lo/core/TMPDIR/gbuild.IwFfCF --cxxflags=/data/lo/core/TMPDIR/gbuild.FBXArw --cxxflagsappend=/data/lo/core/TMPDIR/gbuild.nKdQ4d --objcflags=/data/lo/core/TMPDIR/gbuild.ZbiwYX --objcflagsappend=/data/lo/core/TMPDIR/gbuild.Ahmn93 --objcxxflags=/data/lo/core/TMPDIR/gbuild.4PbfJo --objcxxflagsappend=/data/lo/core/TMPDIR/gbuild.DgMO0i --cxxclrflags=/data/lo/core/TMPDIR/gbuild.St2OX9 --cxxclrflagsappend=/data/lo/core/TMPDIR/gbuild.6UuMxo --defs=/data/lo/core/TMPDIR/gbuild.wbazch --include=/data/lo/core/TMPDIR/gbuild.KgrLWd --linked_libs=/data/lo/core/TMPDIR/gbuild.x4MaDG --linked_static_libs=/data/lo/core/TMPDIR/gbuild.OulkWx > /data/lo/core/TMPDIR/gbuildaeu7wqev/GbuildToJson/CppunitTest/libtest_xmlsecurity_dialogs_test.so
> [build EPK] gpgme
> touch /data/lo/core/TMPDIR/gbuildaeu7wqev/ExternalPackage/gpgme
> touch: cannot touch '/data/lo/core/TMPDIR/gbuildaeu7wqev/ExternalPackage/gpgme': No such file or directory
> make: *** [/data/lo/core/TMPDIR/gbuildqy7pkkpc/solenv/gbuild/ExternalPackage.mk:33: /data/lo/core/TMPDIR/gbuildaeu7wqev/ExternalPackage/gpgme] Error 1
> E
> ======================================================================
> ERROR: test_gbuildtojson (gbuildtojson.CheckGbuildToJsonModules)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/data/lo/core/solenv/qa/python/gbuildtojson.py", line 142, in test_gbuildtojson
>     subprocess.check_call([self.bash, bashscriptname.replace('\\', '/')])
>   File "/data/lo/core/instdir/program/python-core-3.5.0/lib/subprocess.py", line 271, in check_call
>     raise CalledProcessError(retcode, cmd)
> subprocess.CalledProcessError: Command '['bash', '/data/lo/core/TMPDIR/gbuild707bz2lq']' returned non-zero exit status 2
>
> ----------------------------------------------------------------------
> Ran 2 tests in 53.237s
>
> FAILED (errors=1)
>
> Error: a unit test failed, please do one of:
> make PythonTest_solenv_python CPPUNITTRACE="gdb --args"
>     # for interactive debugging on Linux
> make PythonTest_solenv_python VALGRIND=memcheck
>     # for memory checking
> make PythonTest_solenv_python DEBUGCPPUNIT=TRUE
>     # for exception catching
>
> make[1]: *** [/data/lo/core/solenv/gbuild/PythonTest.mk:36: /data/lo/core/workdir/PythonTest/solenv_python/done] Error 1
> make: *** [Makefile:161: PythonTest_solenv_python] Error 2

Change-Id: If8717f42657ae63ba468b5945f98e02090df58c9
2017-03-05 15:09:42 +01:00
Stephan Bergmann 0a99b5a1b7 When building with clang-cl on Windows, build CLR code with MSVC
...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-02-21 10:18:58 +00:00
jan Iversen 69a3cd1604 unittest gbuildtojson
Rename of FLEX to LEX needs to be done in the unittest as well.

Change-Id: Ic038fa01d65edb5724c3d9dc8a04c72c6367372d
2017-01-26 15:38:29 +01:00
Stephan Bergmann 5bc9eaaac3 fix test
Change-Id: Id915626324a692d8ec87cc6899c3de298682348b
2017-01-16 20:51:37 +01:00
Christian Lohmaier fe471fec19 gbuildtoide: builddir is not necessarily same as srcdir
Change-Id: Ied9f9abcc75f2edcd518ac247907f573aa21f35e
Reviewed-on: https://gerrit.libreoffice.org/31158
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2016-12-04 12:44:12 +00:00
Bjoern Michaelsen 65541cfaa1 store makefile for targets in json too
Change-Id: Iae2f497da5d0ee4f8961a5655573e45a562dd76d
Reviewed-on: https://gerrit.libreoffice.org/31116
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2016-11-25 02:06:16 +00:00
Bjoern Michaelsen e62fc464f2 use gbuild prefix for tempdirs
Change-Id: Icc262c51fd70ae35b44722be8d4ab767b69ae2a8
Reviewed-on: https://gerrit.libreoffice.org/31094
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2016-11-25 02:05:34 +00:00
Bjoern Michaelsen 1fcd5c48a0 rename the core parts of this from gbuildtoide to gbuildtojson
- the json stuff is universal and not limited in use to IDEs
- the IDE stuff should keep its gbuildtoide name

Change-Id: If4f190fc6dffba219334d57a53c826515ed57c34
Reviewed-on: https://gerrit.libreoffice.org/31093
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2016-11-25 02:05:02 +00:00
Bjoern Michaelsen c5b8bd0333 Revert "Revert "improvements to gbuildtoide""
This reverts commit ab9c578ed1, except for
the problematic copy-all-SRCDIR top-level test.

Change-Id: Ie9c2fd725199768ec04852a9bc09b09a331ce6ad
Reviewed-on: https://gerrit.libreoffice.org/31092
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2016-11-25 02:04:02 +00:00
Michael Stahl ab9c578ed1 Revert "improvements to gbuildtoide"
This reverts commit 294bfdfaad.

Unfortunately this shutil.copytree(self.srcdirnative, self.tempsrc)
copies the entire SOURCEROOT into /tmp, with WORKDIR too if it's not
an out-of-tree build, which is quite an excessive use of space,
tmpfs or otherwise, and will no doubt make CI very happy.
2016-11-22 21:25:21 +01:00
Bjoern Michaelsen 294bfdfaad improvements to gbuildtoide
- move supported module selection from the test directly into gbuild, it
  should not be possible now to have 'make gbuildtoide' failing, it
  should skip problematic parts
- move from whitelisting to blacklisting bad modules
- toplevel 'make gbuildtoide' should work now, so add test (limit to
  non-Windows for now, as Windows is stupid and slow)
- remove spurious debug output in test

Change-Id: I9838dd2fa091e5fb3e56f414f60164086e8f2076
Reviewed-on: https://gerrit.libreoffice.org/31072
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2016-11-22 14:45:54 +00:00
Andrea Gelmini b9b03c7383 Fix typos (also in the code)
Change-Id: I45d45513b102f4fdcb55e8de20b95b37f66ea463
Reviewed-on: https://gerrit.libreoffice.org/30658
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2016-11-07 15:44:24 +00:00
Bjoern Michaelsen 735e5bb855 populate library path to gbuildtojson in tests
the test environment clears LD_LIBRARY_PATH as it seems to cause trouble for
make in ASAN. "make gbuildtoide" only runs the gbuildtojson exe, so make sure
it gets the LD_LIBRARY_PATH that was filtered out from the make that starts it.

Change-Id: I69ee0024232092aebcd1e8e11b002d6f7eb55c84
Reviewed-on: https://gerrit.libreoffice.org/30433
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2016-10-31 11:09:38 +00:00
Bjoern Michaelsen bbd44f8f89 for now, use a limited subset for testing on windows as it is so slow
Change-Id: I06f77d8aa0a82bd3bb065095a64849d07d11c6a3
Reviewed-on: https://gerrit.libreoffice.org/30311
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2016-10-26 22:41:50 +00:00
Bjoern Michaelsen dd8c8d81de add test for running gbuildtoide on non-build modules
- do concat for json in C++, everything else seems fragile on Windows
- have APPEND vars separately
- check that gbuildtoide work on modules without a full build (modulo
  some blacklisted "creative" ones)

Change-Id: I6fe267fee7d1b77d758072303729387dfeb8e6c8
Reviewed-on: https://gerrit.libreoffice.org/30293
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2016-10-26 22:41:32 +00:00
Michael Stahl aa70294ffc normalize existing emacs/vim mode-lines in python files
Bunch of these were setting C++ or Make modes and icky tabs...

Also, reportedly Emacs can figure out to enable python-mode
automatically.

Change-Id: I50072488fb92cb4d27aa3f74f717a28ae3967543
2016-10-26 22:16:08 +02:00
Michael Stahl dad2f1440c fix "TabError: inconsistent use of tabs and spaces in indentation"
Change-Id: Iff27ff4a01dc8c20b01a6247554b6cc7195a2306
2016-10-26 21:08:31 +02:00
Miklos Vajna 3803460589 solenv: fix Windows build
Traceback (most recent call last):
File "C:cygwinhometdflodejenkinsworkspacelo_gerritConfigwindows_msc_dbgutil_32solenvqapythongbuildtoide.py", line 32, in test_gbuildtoide
del(os.environ['LD_LIBRARY_PATH']) # built with ASAN; prevent that
File "C:cygwinhometdflodejenkinsworkspacelo_gerritConfigwindows_msc_dbgutil_32instdirprogram\python-core-3.3.0libos.py", line 692, in __delitem__
raise KeyError(key) from None
KeyError: 'LD_LIBRARY_PATH'

Change-Id: I1575caf90cafffd71dd28fedc46b5e3570848be8
Reviewed-on: https://gerrit.libreoffice.org/30304
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Michael Stahl <mstahl@redhat.com>
2016-10-26 18:53:00 +00:00
Michael Stahl 5ac920be30 solenv: don't run make with LD_LIBRARY_PATH set
In a build with -fsanitize=address, this fails with:

Change-Id: Ida0d4445d7f829545b493e9dd4c2c4ef33960850
make: symbol lookup error: instdir/program/libfreebl3.so: undefined symbol: __asan_option_detect_stack_use_after_return
2016-10-26 15:23:06 +02:00
Michael Stahl 6677759c29 solenv: force gbuildtoide test to use the same "make" as the caller
Possibly mis-matching make binaries could be the reason behind failures
that have been observed on Jenkins:

make[3]: Entering directory '/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/windows_msc_dbgutil_32/solenv/qa/python/selftest'
make[3]: *** internal error: invalid --jobserver-fds string 'gmake_semaphore_5488'.  Stop.

Also, to enable this: Revert "Revert "prep WinResTarget for WNT in testdir""

This reverts commit 6e261cb19e.

Change-Id: Idb858b5eeced91f19c9dd5600c4fdc5370b73cc5
Reviewed-on: https://gerrit.libreoffice.org/30226
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-10-24 19:05:11 +00:00
Giuseppe Castagno 6e261cb19e Revert "prep WinResTarget for WNT in testdir"
Still random failures in Gerrit Windows builds.

This reverts commit f5c54089b5.

Change-Id: Iec48d2388691577ccd675b9a73941cedceebd527
Reviewed-on: https://gerrit.libreoffice.org/30103
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Reviewed-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu>
Tested-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu>
2016-10-20 13:10:15 +00:00
Bjoern Michaelsen f5c54089b5 prep WinResTarget for WNT in testdir
Change-Id: I04c050dca1212d247c9b11a996ba8f37c0a6492f
Reviewed-on: https://gerrit.libreoffice.org/29825
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2016-10-18 11:27:01 +00:00
Bjoern Michaelsen 45a7137c67 tearDown/clean up solenv test tempdir
Change-Id: I2fc5497b0aeadbc43e967f338a3b8718995f2a5c
2016-10-14 01:07:51 +02:00
Bjoern Michaelsen bc6c26d3c1 fix license, this is entirely new content
Change-Id: Icf1818fb894d039eeb4e7f1306a53ac4322fa075
2016-10-14 01:07:50 +02:00
Bjoern Michaelsen 5cfcd6809f add gbuildtoide support for exes
Change-Id: I320ee341651dd0c92de5176c10aa5290afea1d38
2016-10-14 01:07:48 +02:00
Bjoern Michaelsen fcb7ee7aad use tempdir for test
Change-Id: Ie218f87dc2f1c1b6031cc08f2027cfcf392c6c21
2016-10-13 23:25:40 +02:00
Bjoern Michaelsen f2061f85bf add initial json export for gbuild data
- also add gbuild selftest to test this (and possibly more later)

Change-Id: Ia4ef41095613e596f39d107df700e929579ba45f
Reviewed-on: https://gerrit.libreoffice.org/29744
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2016-10-13 09:02:25 +00:00
Bjoern Michaelsen 7f77e6840d add a testbed for gbuild
Change-Id: Ie6e54c291f92dfede113a1d0fa20771482d93605
Reviewed-on: https://gerrit.libreoffice.org/29743
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2016-10-13 09:01:45 +00:00