Commit Graph
22 Commits
Author SHA1 Message Date
Michael Stahl 01b0d6da7f unotest.py: refactor confusing mess of openDoc functions
Change-Id: I148332c639510c55dea2d09bc7aa695708fbf34c
2017-09-07 21:44:57 +02:00
jmzambon 52523f39af tdf#97362: CheckBookmarks unittest migrated to python (check_bookmarks.py)
Change-Id: Ie5fa41d4346d921ed905795b76ea3c3e90b3d4a2
Reviewed-on: https://gerrit.libreoffice.org/38080
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2017-05-27 16:48:36 +02:00
Miklos Vajna 3902bb7a45 Revert "comphelper: fix MSVC hang in ThreadPool::shutdown()"
As it causes "unopkg.bin:
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/comphelper/source/misc/threadpool.cxx:96:
comphelper::ThreadPool::~ThreadPool(): Assertion `mbTerminate' failed."
in
<https://ci.libreoffice.org/job/lo_gerrit/8283/Config=linux_clang_dbgutil_64/console>
and also locally. Revert till it's clear if that assert() should be a
SAL_WARN() or unopkg has to be fixed.

This reverts commit 9899ffd244.

Change-Id: I72902f7da410012340aa8231d84c6871a3f7b976
2017-03-13 12:11:04 +01:00
Michael Stahl 9899ffd244 comphelper: fix MSVC hang in ThreadPool::shutdown()
Commit aa68c99d88 added some code using
std::condition_variable to comphelper.

Built with MSVC 2017, this causes many cppunittester.exe processes to
deadlock in ThreadPool::shutdown():

    maTasksChanged.notify_all();

This ultimately calls NtReleaseKeyedEvent(), which never returns.

The reason appears to be a bug in Windows 7, for which a "hotfix"[1] is
avaiable here, but it's apparently not distributed via Windows Update
so we likely can't rely on users or even developers having this installed.

However, the documentation of DllMain[2] and ExitProcess[3] indicates
that during shutdown, by the time global destructors are invoked
all threads other than the one that called ExitProcess have already
been terminated.

Returning from main() implicitly calls ExitProcess [4].

As it turns out the problem only happens for some CppUnitTests because
soffice.bin will call ThreadPool::shutdown() from Desktop::doShutdown()
while it is still safe.

[1] http://support.microsoft.com/kb/2582203
[2] https://msdn.microsoft.com/en-US/library/windows/desktop/ms682583(v=vs.85).aspx
[3] https://msdn.microsoft.com/en-us/library/windows/desktop/ms682658(v=vs.85).aspx
[4] https://blogs.msdn.microsoft.com/oldnewthing/20100827-00/?p=13023

Change-Id: I6137461ca7efe9a5fbe4f8f8478fb96de3570469
Reviewed-on: https://gerrit.libreoffice.org/35066
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-03-11 10:08:06 +00:00
Andrea Gelmini 446568bfad Fix typos
Change-Id: I139e6948e92a7bcdce5a2197b9d3754cb9549a33
Reviewed-on: https://gerrit.libreoffice.org/34781
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-02 12:45:15 +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 f636e53ea9 unotest.py: call the magic bootstrap init function once only
Change-Id: I5f775234f44c23386af19f973a9f895a39fa31d5
2015-08-06 13:22:58 +02:00
Matthew J. Francis 3b25116986 Python 2.7 compatibility for unotest.py
Change-Id: Ic7a54b211f6d55ff50cad0fde12058fe33e8892e
2015-06-26 19:05:21 +08:00
Laurent Godard 187445b2d2 Uno api sidebar unit test tdf#91806
- python test subsequentcheck
- correct deck setTitle APi (UI update)
- enhance UnoInProcess for flexiility in loading parameter

Change-Id: Id04cb78c6162ac84fb3bfd8577f84763109d993e
Reviewed-on: https://gerrit.libreoffice.org/16180
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2015-06-23 06:38:56 +00:00
Tor Lillqvist 00ab36a16d The --nofirststartwizard option is a no-op
Change-Id: Id481af38ebb51224f4f8493cccfb4eb4fd1e268f
2015-03-29 23:51:03 +03:00
Stephan Bergmann 49df6e0d8c Adapt file URL hackery to Windows
Change-Id: Icee10aae97e9bcef7a3db7e966c1c4ef6780fc1d
2015-02-09 17:34:06 +01:00
Lionel Elie Mamane 3e8c54916e copy test file to workdir to avoid overwriting
Change-Id: I2acc5cd6a57bb6a18f3f20177b3bcf2b8469a834
Reviewed-on: https://gerrit.libreoffice.org/14272
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
2015-02-03 13:24:34 +00:00
Michael Stahl 816e5063b8 framework, unotest: do not override UserInstallation from environment
The PythonTest_dbaccess_python may fail in incremental builds because of
stale JVM path in workdir/unittest/user/config/javasettings_Linux_X86_64.xml
so it's better to use the fresh UserInstallation that is already passed
in from PythonTest.mk.  To make that work, tolerate non-existing path in
SubstitutePathVariables::SetPredefinedPathVariables() at least when
running in the build environment, which is probably better than
effectively running with "/" as UserInstallation anyway...

This partially reverts commit 6dbb6275eb.

Change-Id: I4d42d53c049056590662828360c4ce5a29af0f4b
2014-10-22 14:10:16 +02:00
Bjoern Michaelsen 6dbb6275eb fdo84315: add integration test for basic LibreOffice Base functionality
Thanks to Stephan for helping with the test environment setup:

sbergman@redhat.com:  Do the same "set UserInstallation to user profile dir in
test/user-template" in UnoInProcess's setUp as is done in
test::BootstrapFixtureBase::setUp (unotest/source/cpp/bootstrapfixturebase.cxx)
for CppunitTests.  That way, these tests all use the workdir/unittest/
UserInstallation concurrently, but they at least do not run into the gotcha in
SubstitutePathVariables::SetPredefinedPathVariables
(framework/source/services/substitutepathvars.cxx) to only set the
PREDEFVAR_USERPATH if PATH_EXISTS.

Change-Id: Iad058098a4c69cb567e2d3222af3c7d4ba993271
2014-10-07 16:16:46 +02:00
Stephan Bergmann 9828206408 Demystify magic ponies
Change-Id: I7e619daf8743d3471ece72d81f6cf1bb61741646
2014-06-04 08:55:11 +02:00
Michael Stahl 2c092f352e make the PythonTest run on WNT
- fix the PATH
- file url needs to start with file:///X:/ (three slashes, literal :)

Change-Id: I0d16d1e946fd06ba5523961c23c3b46872c0c050
2013-09-22 11:08:34 +02:00
David Ostrovsky 6e8eb540c8 Migrate CheckFields unit test to python
Change-Id: Ia765b37888b4095a735015e792f06fc89201d1a3
Reviewed-on: https://gerrit.libreoffice.org/4294
Reviewed-by: Noel Power <noel.power@suse.com>
Tested-by: Noel Power <noel.power@suse.com>
2013-06-18 09:23:20 +00:00
David Ostrovsky 3c0a9bb59e fdo#55814 migrate java unit test to python
Change-Id: Ib7ef29354f5d43abd9e67745dd6d3fccaec8612e
2013-04-27 11:56:30 +02:00
Stephan Bergmann fd0ecb1897 Make informative output more obvious
Change-Id: I9088da9fd2eb1b3ea6be6fda85e058abe8d57286
2013-04-26 11:29:10 +02:00
David Ostrovsky f21d1faf6d clean up PythonTests
Conflicts:
	sw/PythonTest_sw_python.mk

Change-Id: I8dc937df02efb686bf19d6606b9b42b6f0abf742
2013-04-22 18:21:58 +02:00
Michael Stahl ebeae438db move Python tests in-process
This is nice to make them more easily debuggable.
A series of crude hacks are employed to bootstrap enough services from
python so the current tests run.
This is only tested with system python3 on Fedora.

Change-Id: I5e06741e55ead7fddec41ff776ff8ca5d2399469
Reviewed-on: https://gerrit.libreoffice.org/3215
Reviewed-by: David Ostrovsky <David.Ostrovsky@gmx.de>
Tested-by: David Ostrovsky <David.Ostrovsky@gmx.de>
2013-04-09 05:52:49 +00:00
David Ostrovsky 0e68bac852 set up python unit test infrastructure
Extract boostraping code from convwatch.py to unotest.py. Use python builtin
unittest module as unit test framework. Specify the unit test modules in make
file. Another option would be to use discover mode of unittest module.

Add __pycache__ to global .gitignore to keep the source directory clean.
Another option would be to deliver the unit tests to workdir prior to test
execution.

Currently only system python3 is supported.

Change-Id: I2692817673f786e950e1176a17c7675f989755b6
Reviewed-on: https://gerrit.libreoffice.org/3214
Reviewed-by: David Ostrovsky <David.Ostrovsky@gmx.de>
Tested-by: David Ostrovsky <David.Ostrovsky@gmx.de>
2013-04-09 05:52:23 +00:00