summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-03-29 18:35:54 +0200
committerStephan Bergmann <sbergman@redhat.com>2018-04-03 08:23:44 +0200
commitd76281864b0e83812c0edf7490b1e8271e89fff5 (patch)
treea84c6503db43cb3ec5c14bfc1849e11aa338fdd1 /sc
parent20c680092fa2598feb4541b1c69a8389779dbae4 (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 'sc')
-rw-r--r--sc/UITest_autofilter.mk5
-rw-r--r--sc/UITest_calc_tests.mk5
-rw-r--r--sc/qa/uitest/autofilter/autofilterBugs.py6
-rw-r--r--sc/qa/uitest/calc_tests/mergedRowsColumns.py5
-rw-r--r--sc/qa/uitest/calc_tests/subtotals.py5
-rw-r--r--sc/qa/uitest/calc_tests/tdf62267.py5
-rw-r--r--sc/qa/uitest/calc_tests/tdf65856.py5
-rw-r--r--sc/qa/uitest/calc_tests/tdf81351.py5
-rw-r--r--sc/qa/uitest/calc_tests/tdf86253.py5
-rw-r--r--sc/qa/uitest/calc_tests/tdf99386.py5
10 files changed, 35 insertions, 16 deletions
diff --git a/sc/UITest_autofilter.mk b/sc/UITest_autofilter.mk
index 93bf17200bb1..a6dc24cffbfb 100644
--- a/sc/UITest_autofilter.mk
+++ b/sc/UITest_autofilter.mk
@@ -12,4 +12,9 @@ $(eval $(call gb_UITest_UITest,autofilter))
$(eval $(call gb_UITest_add_modules,autofilter,$(SRCDIR)/sc/qa/uitest,\
autofilter/ \
))
+
+$(eval $(call gb_UITest_set_defs,autofilter, \
+ TDOC="$(SRCDIR)/sc/qa/uitest/autofilter/data" \
+))
+
# vim: set noet sw=4 ts=4:
diff --git a/sc/UITest_calc_tests.mk b/sc/UITest_calc_tests.mk
index c9a4e5c3f44b..e316574a97bb 100644
--- a/sc/UITest_calc_tests.mk
+++ b/sc/UITest_calc_tests.mk
@@ -12,4 +12,9 @@ $(eval $(call gb_UITest_UITest,calc_tests))
$(eval $(call gb_UITest_add_modules,calc_tests,$(SRCDIR)/sc/qa/uitest,\
calc_tests/ \
))
+
+$(eval $(call gb_UITest_set_defs,calc_tests, \
+ TDOC="$(SRCDIR)/sc/qa/uitest/calc_tests/data" \
+))
+
# vim: set noet sw=4 ts=4:
diff --git a/sc/qa/uitest/autofilter/autofilterBugs.py b/sc/qa/uitest/autofilter/autofilterBugs.py
index 370af59d8a5c..e216d7994d8c 100644
--- a/sc/qa/uitest/autofilter/autofilterBugs.py
+++ b/sc/qa/uitest/autofilter/autofilterBugs.py
@@ -10,12 +10,14 @@ from uitest.uihelper.common import get_state_as_dict
import time
from uitest.debug import sleep
from uitest.uihelper.common import select_pos
-from uitest.path import get_srcdir_url
from uitest.uihelper.calc import enter_text_to_cell
from libreoffice.calc.document import get_cell_by_position
+import org.libreoffice.unotest
+import pathlib
+
def get_url_for_data_file(file_name):
- return get_srcdir_url() + "/sc/qa/uitest/autofilter/data/" + file_name
+ return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
class autofilter(UITestCase):
diff --git a/sc/qa/uitest/calc_tests/mergedRowsColumns.py b/sc/qa/uitest/calc_tests/mergedRowsColumns.py
index 2f081e6355cd..1302c7b64bd5 100644
--- a/sc/qa/uitest/calc_tests/mergedRowsColumns.py
+++ b/sc/qa/uitest/calc_tests/mergedRowsColumns.py
@@ -8,14 +8,15 @@
from libreoffice.uno.propertyvalue import mkPropertyValues
from uitest.framework import UITestCase
from libreoffice.calc.document import get_column
+import org.libreoffice.unotest
+import pathlib
import time
from uitest.debug import sleep
-from uitest.path import get_srcdir_url
from libreoffice.calc.document import get_cell_by_position
from uitest.uihelper.common import get_state_as_dict
def get_url_for_data_file(file_name):
- return get_srcdir_url() + "/sc/qa/uitest/calc_tests/data/" + file_name
+ return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
class mergedRowsColumns(UITestCase):
diff --git a/sc/qa/uitest/calc_tests/subtotals.py b/sc/qa/uitest/calc_tests/subtotals.py
index fa1e4f5602cf..c18dd8ba4af0 100644
--- a/sc/qa/uitest/calc_tests/subtotals.py
+++ b/sc/qa/uitest/calc_tests/subtotals.py
@@ -8,16 +8,17 @@
from libreoffice.uno.propertyvalue import mkPropertyValues
from uitest.framework import UITestCase
from libreoffice.calc.document import get_column
-from uitest.path import get_srcdir_url
from uitest.uihelper.calc import enter_text_to_cell
from libreoffice.calc.document import get_cell_by_position
from uitest.uihelper.common import select_pos
from uitest.uihelper.common import get_state_as_dict
+import org.libreoffice.unotest
+import pathlib
import time
from uitest.debug import sleep
def get_url_for_data_file(file_name):
- return get_srcdir_url() + "/sc/qa/uitest/calc_tests/data/" + file_name
+ return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
class Subtotals(UITestCase):
diff --git a/sc/qa/uitest/calc_tests/tdf62267.py b/sc/qa/uitest/calc_tests/tdf62267.py
index 7d3e00048403..5671028ec5fb 100644
--- a/sc/qa/uitest/calc_tests/tdf62267.py
+++ b/sc/qa/uitest/calc_tests/tdf62267.py
@@ -5,9 +5,10 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
from uitest.framework import UITestCase
+import org.libreoffice.unotest
import os
+import pathlib
from uitest.uihelper.common import get_state_as_dict
-from uitest.path import get_srcdir_url
from libreoffice.calc.document import get_sheet_from_doc
from libreoffice.calc.conditional_format import get_conditional_format_from_sheet
from uitest.debug import sleep
@@ -18,7 +19,7 @@ from libreoffice.uno.propertyvalue import mkPropertyValues
#numbers and dates the formatting is lost. Undo do not recover the conditional formatting.
def get_url_for_data_file(file_name):
- return get_srcdir_url() + "/sc/qa/uitest/calc_tests/data/" + file_name
+ return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
class tdf62267(UITestCase):
diff --git a/sc/qa/uitest/calc_tests/tdf65856.py b/sc/qa/uitest/calc_tests/tdf65856.py
index 3c4432951574..c3e03ec7a95c 100644
--- a/sc/qa/uitest/calc_tests/tdf65856.py
+++ b/sc/qa/uitest/calc_tests/tdf65856.py
@@ -5,9 +5,10 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
from uitest.framework import UITestCase
+import org.libreoffice.unotest
import os
+import pathlib
from uitest.uihelper.common import get_state_as_dict
-from uitest.path import get_srcdir_url
from libreoffice.calc.document import get_sheet_from_doc
from libreoffice.calc.conditional_format import get_conditional_format_from_sheet
from uitest.debug import sleep
@@ -15,7 +16,7 @@ from libreoffice.uno.propertyvalue import mkPropertyValues
from libreoffice.calc.document import get_cell_by_position
def get_url_for_data_file(file_name):
- return get_srcdir_url() + "/sc/qa/uitest/calc_tests/data/" + file_name
+ return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
class tdf65856(UITestCase):
diff --git a/sc/qa/uitest/calc_tests/tdf81351.py b/sc/qa/uitest/calc_tests/tdf81351.py
index 0886ab7b4b16..520f1c3c64c8 100644
--- a/sc/qa/uitest/calc_tests/tdf81351.py
+++ b/sc/qa/uitest/calc_tests/tdf81351.py
@@ -9,12 +9,13 @@ from libreoffice.uno.propertyvalue import mkPropertyValues
from uitest.framework import UITestCase
from libreoffice.calc.document import get_column
-from uitest.path import get_srcdir_url
from libreoffice.calc.document import get_cell_by_position
+import org.libreoffice.unotest
+import pathlib
import time
def get_url_for_data_file(file_name):
- return get_srcdir_url() + "/sc/qa/uitest/calc_tests/data/" + file_name
+ return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
class tdf81351(UITestCase):
diff --git a/sc/qa/uitest/calc_tests/tdf86253.py b/sc/qa/uitest/calc_tests/tdf86253.py
index 2f29c2a398ec..c9c512c8d359 100644
--- a/sc/qa/uitest/calc_tests/tdf86253.py
+++ b/sc/qa/uitest/calc_tests/tdf86253.py
@@ -5,16 +5,17 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
from uitest.framework import UITestCase
+import org.libreoffice.unotest
import os
+import pathlib
from uitest.uihelper.common import get_state_as_dict
-from uitest.path import get_srcdir_url
from libreoffice.calc.document import get_sheet_from_doc
from libreoffice.calc.conditional_format import get_conditional_format_from_sheet
from uitest.debug import sleep
from libreoffice.uno.propertyvalue import mkPropertyValues
def get_url_for_data_file(file_name):
- return get_srcdir_url() + "/sc/qa/uitest/calc_tests/data/" + file_name
+ return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
class tdf86253(UITestCase):
diff --git a/sc/qa/uitest/calc_tests/tdf99386.py b/sc/qa/uitest/calc_tests/tdf99386.py
index 46c77631219e..ff9286b61288 100644
--- a/sc/qa/uitest/calc_tests/tdf99386.py
+++ b/sc/qa/uitest/calc_tests/tdf99386.py
@@ -10,12 +10,13 @@ from uitest.uihelper.common import get_state_as_dict
from libreoffice.uno.propertyvalue import mkPropertyValues
from uitest.debug import sleep
from uitest.uihelper.calc import enter_text_to_cell
-from uitest.path import get_srcdir_url
from libreoffice.calc.document import get_cell_by_position
+import org.libreoffice.unotest
+import pathlib
import time
def get_url_for_data_file(file_name):
- return get_srcdir_url() + "/sc/qa/uitest/calc_tests/data/" + file_name
+ return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
class tdf99386(UITestCase):