summaryrefslogtreecommitdiffstats
path: root/debian/tests/patches/smoketest-disable-extension-tests.diff
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:55:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:55:35 +0000
commit0e05dd0e4d67d88ca51780dafe4029744269e6fa (patch)
treeb49073fa569d8d4fbcc7002cf4df72fa840780c1 /debian/tests/patches/smoketest-disable-extension-tests.diff
parentAdding upstream version 4:24.2.0. (diff)
downloadlibreoffice-0e05dd0e4d67d88ca51780dafe4029744269e6fa.tar.xz
libreoffice-0e05dd0e4d67d88ca51780dafe4029744269e6fa.zip
Adding debian version 4:24.2.0-1.debian/4%24.2.0-1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/tests/patches/smoketest-disable-extension-tests.diff')
-rw-r--r--debian/tests/patches/smoketest-disable-extension-tests.diff117
1 files changed, 117 insertions, 0 deletions
diff --git a/debian/tests/patches/smoketest-disable-extension-tests.diff b/debian/tests/patches/smoketest-disable-extension-tests.diff
new file mode 100644
index 0000000000..48e8fddea3
--- /dev/null
+++ b/debian/tests/patches/smoketest-disable-extension-tests.diff
@@ -0,0 +1,117 @@
+--- smoketest/data/Basic/Standard/Test_Ext.xml 2012-02-01 13:56:49.000000000 +0100
++++ smoketest/data/Basic/Standard/Test_Ext.xml 2012-02-20 20:15:23.000000000 +0100
+@@ -28,10 +28,6 @@
+ <!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+ <script:module xmlns:script="http://openoffice.org/2000/script" script:name="Test_Ext" script:language="StarBasic">REM ***** BASIC *****
+
+-const cMessageExtensionService = &quot;Extension Service&quot;
+-const cMessageExtensionInstall = &quot;Install Extension&quot;
+-const cMessageExtensionUninstall = &quot;Uninstall Extension&quot;
+-
+ Sub TestExtensions
+ Dim oTestExtension as Object, obj_null as Object
+ Dim sCurrentMessage as String
+@@ -37,9 +37,6 @@
+ Dim sCurrentMessage as String
+ Dim bResult as Boolean
+ Dim sImplementationNameString as String
+- sImplementationNameString = cUnoSmoketestTestExtension + &quot;$_TestExtension&quot;
+-
+- On Local Error GoTo EXTERROR
+
+ gCurrentTestCase = cLogfileFailed
+ LocalTestLog% = OpenLogDat (GetLogFileName(gCurrentDocTest))
+@@ -35,74 +35,5 @@
+ gCurrentTestCase = cLogfileFailed
+ LocalTestLog% = OpenLogDat (GetLogFileName(gCurrentDocTest))
+
+- sCurrentMessage = &quot;SmokeTestCommandEnvironment (implemented in Java)&quot;
+- gCurrentTestCase = cEXTService
+-
+- &apos;Create an implementation of com.sun.star.ucb.XCommandEnvironment which is needed for
+- &apos;adding the extension. The implementation is in
+- &apos;smoketest/org/libreoffice/smoketest/SmoketestCommandEnvironment.java and the code is in smoketest.jar
+- cmdEnv = createUnoService(cUnoSmoketestCommandEnvironment)
+-
+- &apos;Create the component context and then get the singleton ExtensionManager
+- &apos;A singleton cannot be created with createUnoService
+- sCurrentMessage = cMessageExtensionService
+- ctx = getDefaultContext
+- ext_mgr = ctx.getValueByName(&quot;/singletons/&quot; + cExtensionManager)
+-
+- LogTestResult( &quot;Extension &quot;+ cMessageExtensionService, not IsNull (ext_mgr) )
+- if (IsNull(ext_mgr)) then
+- Close #LocalTestLog%
+- LocalTestLog = 0
+- Exit Sub
+- End If
+-
+- sCurrentMessage = cMessageExtensionInstall
+- gCurrentTestCase = cEXTInstall
+-
+- &apos;Add the extension. We must provide a file URL here.
+- &apos;By passing &quot;user&quot; we determine that the actions we perform on
+- &apos;XExtensionManager only affect the user installation. To modify the share installation one would pass &quot;share&quot;.
+-
+- Dim props() as Object
+- ext_mgr.addExtension(sExtensionURL, props, &quot;user&quot;, obj_null, cmdEnv)
+-
+- &apos;Check if the extension has been added by creating a service which is contained in the extension.
+- oTestExtension = createUnoService(cUnoSmoketestTestExtension)
+- bResult = (oTestExtension.getImplementationName = sImplementationNameString)
+- LogTestResult( &quot;Extension &quot;+ cMessageExtensionInstall, bResult )
+- if (not bResult) then
+- Close #LocalTestLog%
+- LocalTestLog = 0
+- Exit Sub
+- End If
+-
+- sCurrentMessage = cMessageExtensionUninstall
+- gCurrentTestCase = cEXTUninstall
+-
+- &apos;Remove the package
+- ext_mgr.removeExtension(&quot;org.libreoffice.smoketest.TestExtension&quot;, cExtensionFileName, &quot;user&quot;,obj_null, cmdEnv)
+-
+- &apos;Try to create the service which is contained in the now removed extension.
+- oTestExtension = createUnoService(cUnoSmoketestTestExtension)
+-
+- &apos;The service must not be available anymore. Therefore isNull must return true.
+- LogTestResult( &quot;Extension &quot;+ cMessageExtensionUninstall, IsNull (oTestExtension) )
+-
+- Print #LocalTestLog, &quot;---&quot;
+- Close #LocalTestLog%
+- LocalTestLog = 0
+- Exit Sub &apos; Without error
+-
+- EXTERROR:
+- If ( gCurrentTestCase = cLogfileFailed ) then
+- LogTestResult( &quot; &quot;, False )
+- Exit Sub
+- else
+- LogTestResult( &quot;Extension &quot;+ sCurrentMessage, False )
+- Close #LocalTestLog%
+- LocalTestLog = 0
+- End If
+- Exit Sub &apos; With error
+-
+ End Sub
+ </script:module>
+
+run the smoketest also when extensions are disabled; we patch that out of the smoketest anyway
+
+--- smoketest/Module_smoketest.mk-old 2023-07-19 06:46:58.379072423 +0200
++++ smoketest/Module_smoketest.mk 2023-07-19 06:47:09.547147319 +0200
+@@ -34,13 +34,11 @@
+
+ ifeq ($(ENABLE_CPPUNIT),TRUE)
+ ifneq (MACOSX/TRUE,$(OS)/$(ENABLE_MACOSX_SANDBOX))
+-ifneq ($(filter EXTENSIONS,$(BUILD_TYPE)),)
+ $(eval $(call gb_Module_add_subsequentcheck_targets,smoketest,\
+ CppunitTest_smoketest \
+ ))
+ endif
+ endif
+-endif
+
+ endif
+