Age | Commit message (Collapse) | Author |
|
so when a test fails, we don't get spurious additional stacktraces
Change-Id: Id2885be9ca628fc25a55f90f6c5c1b50f887a37a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104928
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Python 2 support was retained for use with --enable-python=system
on RHEL7 and SLES. The time has arrived to remove it.
Some .py files that were imported from third parties are not changed to
enable easier replacement with updated versions if necessary.
solenv/gdb should continue to support Python 2.
bin/get-bugzilla-attachments-by-mimetype requires Python 2 to access
Launchpad.
Change-Id: I26414ae8e9f8402c90336af82020135685694217
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91697
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
|
|
0e68bac85293e2d60fa6db3e46de8b74ab5d502b "set up python unit test
infrastructure" had introduced unotest/source/python/org/libreoffice/unotest.py
with the comment and commented-out code. It claims it has extraced "boostraping
code from convwatch.py to unotest.py", but I can't find a trace in the git
history of a prior incarnation of that comment and commented-out code. It is
unclear what problem exactly the commenting-out of the check was supposed to
address. So put the check in place and see what, if anything, breaks.
(The commented-out return appears to be truly unnecessary, and has been removed
completely.)
Change-Id: Ie2108d70fbe076cd0832bd23bfb29fc60eedffef
Reviewed-on: https://gerrit.libreoffice.org/80029
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I151508c5d0b5d010f55d2324d36659ab5715a70c
Reviewed-on: https://gerrit.libreoffice.org/77274
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
|
|
After b9757f5cfdb62b24e79eeb4c0ef0c8b98056cecf "loplugin:useuniqueptr in
vcl/svdata" ASan/UBSan builds started to fail (like
<https://ci.libreoffice.org//job/lo_ubsan/1025/>) at the end of
PythonTest_dbaccess_python (and probably other PythonTests), when during exit
the static utl::ConfigManager instance already happens to be destroyed by the
time the static ImplSVData's mpSettingsConfigItem is destroyed (which would
normally be cleared during DeInitVCL, if PythonTests would call that, and which
in the past had thus simply been leaked in PythonTests when that
mpSettingsConfigItem was a plain pointer instead of std::unique_ptr).
So ensure that PythonTests that initialize VCL also call DeInitVCL, via a new
private_deinitTestEnvironment, complementing the existing
private_initTestEnvironment.
However, while private_initTestEnvironment is called once (typically via
UnoInProcess.setUp, which internally makes sure to only call it once) as soon as
the first executed test needs it, private_deinitTestEnvironment must be called
once after the lasts test needing it has executed. The only way that I found to
do that is to override unittest.TextTestResult's stopTestRun method, which is
called once after all tests have been executed. Hence a new test runner setup
in unotest/source/python/org/libreoffice/unittest.py that is now called from
solenv/gbuild/PythonTest.mk.
That revealed a few places in PythonTests that didn't yet close/delete documents
that they had opened, which has now been added.
One remaining problem then is that classes like SwXTextDocument and friends call
Application::GetSolarMutex from their dtors, via sw::UnoImplPtrDeleter (a "Smart
pointer class ensuring that the pointed object is deleted with a locked
SolarMutex", sw/inc/unobaseclass.hxx). That means that any PyUNO proxies to
such C++ objects that remain alive after private_deinitTestEnvironment will
cause issues at exit, when Python does a final garbage collection of those
objects. The ultimate fix will be to remove that unhelpful UnoImplPtrDeleter
and its locking of SolarMutex from the dtors of UNO objects; until then, the
Python code is now sprinkled with some HACKs to make sure all those PyUNO
proxies are released in a timely fashion (see the comment in
unotest/source/python/org/libreoffice/unittest.py for details). (Also, it would
probably help if UnoInProcess didn't keep a local self.xDoc around referencing
(just) the last result of calling one of its open* methods, confusingly making
it the responsibility of UnoInProcess to close that one document while making it
the responsibility of the test code making the other UnoInProcess.open* calls to
close any other documents.)
Change-Id: Ief27c81e2b763e9be20cbf3234b68924315f13be
Reviewed-on: https://gerrit.libreoffice.org/60100
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I981cfdf97d132afdd4d3729ec76b6a3f4c62909a
Reviewed-on: https://gerrit.libreoffice.org/52210
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
...after d76281864b0e83812c0edf7490b1e8271e89fff5 "Create temp copies of test
docs in Python/UITests"
Change-Id: I4b6a5149c68f9e6cdc0a2037c07b50e8acc3623f
Reviewed-on: https://gerrit.libreoffice.org/52486
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...where necessary, so the tests will succeed if SRCDIR is a read-only tree.
Change-Id: Iea4c52d5982d3eba079088ef1670ff557ce30c3f
Reviewed-on: https://gerrit.libreoffice.org/52122
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I148332c639510c55dea2d09bc7aa695708fbf34c
|
|
Change-Id: Ie5fa41d4346d921ed905795b76ea3c3e90b3d4a2
Reviewed-on: https://gerrit.libreoffice.org/38080
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
|
|
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 9899ffd244dd367ba69dffe1f21f4f0222064a46.
Change-Id: I72902f7da410012340aa8231d84c6871a3f7b976
|
|
Commit aa68c99d88fd7abe08c4aee5206c859a0cdba38e 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>
|
|
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>
|
|
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
|
|
Change-Id: I5f775234f44c23386af19f973a9f895a39fa31d5
|
|
Change-Id: Ic7a54b211f6d55ff50cad0fde12058fe33e8892e
|
|
- 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>
|
|
Change-Id: Id481af38ebb51224f4f8493cccfb4eb4fd1e268f
|
|
Change-Id: Icee10aae97e9bcef7a3db7e966c1c4ef6780fc1d
|
|
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>
|
|
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 6dbb6275ebd1a4299099c3b6bc82ec4ee0e1fb86.
Change-Id: I4d42d53c049056590662828360c4ce5a29af0f4b
|
|
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
|
|
Change-Id: I7e619daf8743d3471ece72d81f6cf1bb61741646
|
|
- fix the PATH
- file url needs to start with file:///X:/ (three slashes, literal :)
Change-Id: I0d16d1e946fd06ba5523961c23c3b46872c0c050
|
|
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>
|
|
Change-Id: Ib7ef29354f5d43abd9e67745dd6d3fccaec8612e
|
|
Change-Id: I9088da9fd2eb1b3ea6be6fda85e058abe8d57286
|
|
Conflicts:
sw/PythonTest_sw_python.mk
Change-Id: I8dc937df02efb686bf19d6606b9b42b6f0abf742
|
|
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>
|
|
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>
|