diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-03-29 18:35:54 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-04-03 08:23:44 +0200 |
commit | d76281864b0e83812c0edf7490b1e8271e89fff5 (patch) | |
tree | a84c6503db43cb3ec5c14bfc1849e11aa338fdd1 /uitest | |
parent | 20c680092fa2598feb4541b1c69a8389779dbae4 (diff) |
Create temp copies of test docs in Python/UITests
...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>
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/UITest_manual_tests.mk | 5 | ||||
-rw-r--r-- | uitest/UITest_writer_demo.mk | 5 | ||||
-rw-r--r-- | uitest/manual_tests/calc.py | 5 | ||||
-rw-r--r-- | uitest/writer_tests/tdf104649.py | 6 |
4 files changed, 17 insertions, 4 deletions
diff --git a/uitest/UITest_manual_tests.mk b/uitest/UITest_manual_tests.mk index d9ac95a513c3..187ab8317b5f 100644 --- a/uitest/UITest_manual_tests.mk +++ b/uitest/UITest_manual_tests.mk @@ -12,4 +12,9 @@ $(eval $(call gb_UITest_UITest,manual_tests)) $(eval $(call gb_UITest_add_modules,manual_tests,$(SRCDIR)/uitest,\ manual_tests/ \ )) + +$(eval $(call gb_UITest_set_defs,manual_tests, \ + TDOC="$(SRCDIR)/uitest/manual_tests/data" \ +)) + # vim: set noet sw=4 ts=4: diff --git a/uitest/UITest_writer_demo.mk b/uitest/UITest_writer_demo.mk index a95fbd17128e..51b12feda607 100644 --- a/uitest/UITest_writer_demo.mk +++ b/uitest/UITest_writer_demo.mk @@ -12,4 +12,9 @@ $(eval $(call gb_UITest_UITest,writer_demo)) $(eval $(call gb_UITest_add_modules,writer_demo,$(SRCDIR)/uitest,\ writer_tests/ \ )) + +$(eval $(call gb_UITest_set_defs,writer_demo, \ + TDOC="$(SRCDIR)/uitest/writer_tests/data" \ +)) + # vim: set noet sw=4 ts=4: diff --git a/uitest/manual_tests/calc.py b/uitest/manual_tests/calc.py index 2f4524134f77..9c86b6c3e6d9 100644 --- a/uitest/manual_tests/calc.py +++ b/uitest/manual_tests/calc.py @@ -12,12 +12,13 @@ from libreoffice.calc.document import get_cell_by_position from uitest.uihelper.common import get_state_as_dict, type_text from uitest.uihelper.calc import enter_text_to_cell -from uitest.path import get_srcdir_url +import org.libreoffice.unotest +import pathlib import time def get_url_for_data_file(file_name): - return get_srcdir_url() + "/uitest/manual_tests/data/" + file_name + return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() class ManualCalcTests(UITestCase): diff --git a/uitest/writer_tests/tdf104649.py b/uitest/writer_tests/tdf104649.py index a1593d387339..f6541feee5a4 100644 --- a/uitest/writer_tests/tdf104649.py +++ b/uitest/writer_tests/tdf104649.py @@ -5,10 +5,12 @@ # from uitest.framework import UITestCase -from uitest.path import get_srcdir_url + +import org.libreoffice.unotest +import pathlib def get_url_for_data_file(file_name): - return get_srcdir_url() + "/uitest/writer_tests/data/" + file_name + return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri() class tdf104649(UITestCase): |