Running uitest

Lera Goncharuk lera.goncharuk at gmail.com
Fri May 20 06:59:09 UTC 2022


Hi!

I made changes in uitest and now try to run it. But, I can not look for
results running.
I try different ways, but the result is the same every time.
I test test_clear_cells_all in cleanCells module. [1]

I use Kubuntu 20.04
Python 3.9
LibreOffice was cloned from git and build and stais on commit
7d20dc2ca69711c61fb1593ad85ccdef282c978d.

git clone https://gerrit.libreoffice.org/core libreoffice
./autogen.sh --enable-dbgutil --enable-debug --enable-symbols --with-help
--with-symbol-config --with-lang="en" --with-locales="en ru "
make


Almost all tests run silently and give no information in the console.
I also can't find information in the logs in the workdir/PythonTest/ and
workdir/UITest/ folders.
 That is, there is information about the work of the tests, but not the
Calc tests.
In workdir/PythonTest/sc_python/ I found done.log with:
warn:i18nlangtag:15959:15959:i18nlangtag/source/isolang/mslangid.cxx:105:
MsLangId::getConfiguredSystemLanguage() - not configured yet
warn:i18nlangtag:15959:15959:i18nlangtag/source/isolang/mslangid.cxx:115:
MsLangId::getConfiguredSystemUILanguage() - not configured yet
warn:vcl.layout:15959:15959:vcl/source/window/layout.cxx:288: nExtraSpace
went negative, setting to zero for VclBox:
warn:vcl.layout:15959:15959:vcl/source/window/layout.cxx:288: nExtraSpace
went negative, setting to zero for VclBox:
warn:svl.items:15959:15959:svl/source/items/itempool.cxx:441: old secondary
pool: EditEngineItemPool of pool: XOutdevItemPool must be empty.
.warn:vcl.schedule.deinit:15959:15959:vcl/source/app/scheduler.cxx:177:
DeInit task: Timer a: 1 p: 1 graphic::Manager maSwapOutTimer 10000ms
(0x7fcddc173bc0)
warn:vcl.schedule.deinit:15959:15959:vcl/source/app/scheduler.cxx:177:
DeInit task: Timer a: 1 p: 1 sc ScModule IdleTimer 150ms (0x318d6b8)
(ignored)
warn:vcl.schedule.deinit:15959:15959:vcl/source/app/scheduler.cxx:197:
DeInit active tasks: 2 (ignored: 1)

----------------------------------------------------------------------
Ran 1 test in 4.251s

OK
creating a sheetdocument
    disposing xSheetDoc


$ make UITest_sort
In console [UIT] sort, and I don't see any logs of Calc tests.


$make PythonTest_sc_python
In console [PYT] sc_python, and I don't see too.


I try to use a way described in wiki [2].
$ cat execute.sh
export PYTHONPATH=/home/lera/project/libreoffice/instdir/program/
export
PYTHONPATH=$PYTHONPATH:/home/lera/project/libreoffice/unotest/source/python/
export
URE_BOOTSTRAP=file:///home/lera/project/libreoffice/instdir/program/fundamentalrc
export TestUserDir=file:///tmp
export TDOC=/home/lera/project/libreoffice/sw/qa/uitest/data
export SAL_USE_VCLPLUGIN=gen
export LC_ALL=C

rm -rf /tmp/libreoffice/7

export SRCDIR="${SRCDIR:-$(pwd)}"
python3 "$SRCDIR"/uitest/test_main.py
--soffice=path:"$SRCDIR"/instdir/program/soffice
--userdir=file:///tmp/libreoffice/7
--file="$SRCDIR"/sc/qa/uitest/sort/sorting.py


$ UITEST_TEST_NAME="sorting.clearCells.clearCells.test_clear_cells_all"
../execute.sh
----------------------------------------------------------------------
Ran 0 tests in 0.000s
OK
Tests run: 0
Tests failed: 0
Tests errors: 0
Tests skipped: 0


$ make UITest_sort
UITEST_TEST_NAME="clearCells.clearCells.test_clear_cells_all"
SAL_USE_VCLPLUGIN=gen
[UIT] sort
UITEST_TEST_NAME 'clearCells.clearCells.test_clear_cells_all' does not
match any test
Error: a unit test failed:
To rerun just this failed test without all others, use:
   make UITest_sort
Or to run just a specific test case method, use:
   make UITest_sort UITEST_TEST_NAME="Module.ClassName.methodName"
where
   Module - the name of the python file (without the .py extension)
   Class - is the name in the "class Class" declaration
Or to do interactive debugging, run two shells with:
   LANG=C SAL_USE_VCLPLUGIN=gen make debugrun
   make gb_UITest_DEBUGRUN=T UITest_sort
The SAL_USE_VCLPLUGIN part is unnecessary if you are running on a kde
desktop.
(The default gtk3 backend has issues with some uitests).
Failing that, put a
   time.sleep(60)
in the beginning of the method in the .py file,
and attach gdb to the running soffice process.
make[1]: *** [/home/lera/project/libreoffice/solenv/gbuild/UITest.mk:60:
/home/lera/project/libreoffice/workdir/UITest/sort/done] Ошибка 1
make: *** [Makefile:169: UITest_sort] Ошибка 2


That talks no test clearCells.clearCells.test_clear_cells_all
But as I see the test exist [3] and tern on [4].

uitest.uicheck runs only tests from uitests directory and doesn't contains
tests for Calc. Its logs exist in workdir/UITest/
$ make uitest.uicheck
[BIN] top level modules: uitest
[LOC] top level modules: uitest
[ALL] top level modules: build-non-l10n-only build-l10n-only
[UIT] impress_demo
[UIT] demo_ui
[UIT] math_demo
[UIT] uitest

My understanding of the work of the test code ends here, and I do not
understand where to dig further.
Why are the tests not running?
If they run, then where should I look for the logs?
If they don't run, how can I run them, and should I do it?
And if they don't start, then why do they exist? :)

Tell me if I can provide more information.
Any ideas will help me move on, thanks.

[1]
https://opengrok.libreoffice.org/xref/core/sc/qa/uitest/calc_tests3/clearCells.py?r=8b71bc7e#222
[2] https://wiki.documentfoundation.org/Development/UITests#Running_the_test
[3]
https://opengrok.libreoffice.org/xref/core/sc/qa/uitest/calc_tests3/clearCells.py?r=8b71bc7e#222
[4]
https://opengrok.libreoffice.org/xref/core/sc/UITest_calc_tests3.mk?r=66484d60

Best regards,
Lera
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20220520/ba6c6ff3/attachment-0001.htm>


More information about the LibreOffice mailing list