summaryrefslogtreecommitdiff
path: root/smoketest
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-10-26 10:56:15 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-10-26 14:50:25 +0100
commit8a9a0447807ad7544a3df5a067dd26a4ee6613f1 (patch)
treed7463d4940ce8ca4d0af770ba1145844544ea843 /smoketest
parentc277bedb0ac82194b05b4eac2e6e7367672c185f (diff)
Remove unmaintained Executable_libtest
<https://lists.freedesktop.org/archives/libreoffice/2020-October/086169.html> "Re: Is Executable_libtest still useful?": >> so I wonder whether that program is actually still maintained and used by >> anybody. (At least the last dozen or so changes to smoketest/libtest.cxx >> were of the generic loplugin/typos/tools::Long etc. kind, and we could spare >> ourselves future such work if we removed the file should it indeed be dead >> code.) > > I think this can be removed. https://gitlab.com/ojwb/lloconv does the > same and it seems to be maintained. Change-Id: I039e161ecf4904210e246e389cf4ba85124a66fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104803 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'smoketest')
-rw-r--r--smoketest/Executable_libtest.mk38
-rw-r--r--smoketest/Module_smoketest.mk6
-rw-r--r--smoketest/libtest.cxx160
3 files changed, 0 insertions, 204 deletions
diff --git a/smoketest/Executable_libtest.mk b/smoketest/Executable_libtest.mk
deleted file mode 100644
index c1e33d35e10e..000000000000
--- a/smoketest/Executable_libtest.mk
+++ /dev/null
@@ -1,38 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_Executable_Executable,libtest))
-
-$(eval $(call gb_Executable_set_include,libtest,\
- $$(INCLUDE) \
-))
-
-ifeq ($(OS),LINUX)
-$(eval $(call gb_Executable_add_libs,libtest,\
- -ldl \
-))
-endif
-
-$(eval $(call gb_Executable_add_exception_objects,libtest,\
- smoketest/libtest \
-))
-
-liblibreoffice_OWN_LD_PATH_DIR := $(INSTROOT)/program/libolib
-liblibreoffice_OWN_LD_SO := $(liblibreoffice_OWN_LD_PATH_DIR)/$(call gb_Library__get_workdir_linktargetname,libreoffice)
-
-$(liblibreoffice_OWN_LD_SO) : $(call gb_Library_get_target,libreoffice)
- mkdir -p $(liblibreoffice_OWN_LD_PATH_DIR)/Library
- cp -a $(call gb_Library_get_target,libreoffice) $(liblibreoffice_OWN_LD_SO)
-
-run_libtest: $(liblibreoffice_OWN_LD_SO)
- $(gb_Helper_LIBRARY_PATH_VAR)=$${$(gb_Helper_LIBRARY_PATH_VAR):+$$$(gb_Helper_LIBRARY_PATH_VAR):}":$(liblibreoffice_OWN_LD_PATH_DIR)/Library" \
- $(WORKDIR)/LinkTarget/Executable/libtest \
- $(INSTROOT)/program $(WORKDIR)/Zip/smoketestdoc.sxw \
-
-# vim: set noet sw=4 ts=4:
diff --git a/smoketest/Module_smoketest.mk b/smoketest/Module_smoketest.mk
index 7e8b6d5f11f6..217dbfa6543a 100644
--- a/smoketest/Module_smoketest.mk
+++ b/smoketest/Module_smoketest.mk
@@ -26,12 +26,6 @@ $(eval $(call gb_Module_add_targets,smoketest,\
endif
endif
-ifneq ($(filter LINUX WNT,$(OS)),)
-$(eval $(call gb_Module_add_check_targets,smoketest,\
- Executable_libtest \
-))
-endif
-
ifneq (MACOSX/TRUE,$(OS)/$(ENABLE_MACOSX_SANDBOX))
ifneq ($(filter EXTENSIONS,$(BUILD_TYPE)),)
$(eval $(call gb_Module_add_subsequentcheck_targets,smoketest,\
diff --git a/smoketest/libtest.cxx b/smoketest/libtest.cxx
deleted file mode 100644
index 7d90a8522353..000000000000
--- a/smoketest/libtest.cxx
+++ /dev/null
@@ -1,160 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <malloc.h>
-#include <assert.h>
-#include <math.h>
-#include <sal/types.h>
-
-#include <LibreOfficeKit/LibreOfficeKitInit.h>
-#include <LibreOfficeKit/LibreOfficeKit.hxx>
-#include <tools/long.hxx>
-
-
-#ifdef _WIN32
-//#include <Windows.h> // come from LibreOfficeKitInit.h
- static long getTimeMS()
- {
- return GetTickCount();
- }
-
- static bool IsAbsolutePath(char const *pPath)
- {
- if (pPath[1] != ':')
- {
- fprintf( stderr, "Absolute path required to libreoffice install\n" );
- return false;
- }
-
- return true;
- }
-
-#else
-#include <sys/time.h>
- static tools::Long getTimeMS()
- {
- struct timeval t;
- gettimeofday(&t, nullptr);
- return t.tv_sec*1000 + t.tv_usec/1000;
- }
-
- static bool IsAbsolutePath(char const *pPath)
- {
- if (pPath[0] != '/')
- {
- fprintf( stderr, "Absolute path required to libreoffice install\n" );
- return false;
- }
-
- return true;
- }
-#endif
-
-
-using namespace ::lok;
-
-
-static int help()
-{
- fprintf( stderr, "Usage: libtest <absolute-path-to-libreoffice-install> [path to load document] [path to save document].\n" );
- return 1;
-}
-
-int main (int argc, char **argv)
-{
- tools::Long start, end;
-
- start = getTimeMS();
-
- if (argc < 2 || !strcmp(argv[1], "--help") || !strcmp(argv[1], "-h"))
- return help();
-
-
- if( !IsAbsolutePath(argv[1]) )
- return 1;
-
- // coverity[tainted_string] - build time test tool
- char *install_path = argv[1];
-
- if( argc > 4 )
- {
- fprintf( stderr, "testing preinit\n");
- char *imp_lib;
- void *dlhandle;
- dlhandle = lok_dlopen( install_path, &imp_lib );
- if( !dlhandle )
- {
- fprintf( stderr, "Failed to link '%s'\n", lok_dlerror() );
- return -1;
- }
- LokHookPreInit *preinit = reinterpret_cast<LokHookPreInit *>(lok_dlsym( dlhandle, "lok_preinit" ));
- if( !preinit )
- {
- fprintf( stderr, "Failed to find pre-init symbol: %s\n", lok_dlerror() );
- return -1;
- }
- preinit(install_path, nullptr);
- }
-
- Office *pOffice = lok_cpp_init( install_path );
- if( !pOffice )
- {
- fprintf( stderr, "Failed to initialize\n" );
- return -1;
- }
-
- end = getTimeMS();
- fprintf( stderr, "init time: %" SAL_PRIdINT64 " ms\n", sal_Int64(end-start) );
- start = end;
-
- fprintf( stderr, "start to load document '%s'\n", argv[2] );
- Document *pDocument = pOffice->documentLoad( argv[2] );
- if( !pDocument )
- {
- char *pError = pOffice->getError();
- fprintf( stderr, "failed to load document '%s': '%s'\n",
- argv[2], pError );
- free (pError);
- return -1;
- }
-
- end = getTimeMS();
- fprintf( stderr, "load time: %" SAL_PRIdINT64 " ms\n", sal_Int64(end-start) );
- start = end;
-
- if( argc > 3 )
- {
- const char *pFilter = nullptr;
- if( argc > 4 )
- pFilter = argv[4];
- fprintf( stderr, "save document as '%s' (%s)\n", argv[3], pFilter ? pFilter : "<null>" );
- if( !pDocument->saveAs( argv[3], pFilter ) )
- {
- char *pError = pOffice->getError();
- fprintf( stderr, "failed to save document '%s'\n", pError);
- free (pError);
- }
- else
- {
- fprintf( stderr, "Save succeeded\n" );
- end = getTimeMS();
- fprintf( stderr, "save time: %" SAL_PRIdINT64 " ms\n", sal_Int64(end-start) );
- }
- }
- fprintf( stderr, "all tests passed.\n" );
-
- delete pDocument;
- delete pOffice;
-
- return 0;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */