uitest: build system part for new uitests

We now can call the uitests with make uitest.uickeck

Change-Id: I20c73efd93c7987f3b841cd0e3e7842ee7a5dab9
This commit is contained in:
Markus Mohrhard 2016-05-09 10:05:14 +02:00
parent 7a8b2e211c
commit 3ead72d365
12 changed files with 214 additions and 10 deletions

View file

@ -7,7 +7,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# #
gb_Top_MODULE_CHECK_TARGETS := slowcheck unitcheck subsequentcheck perfcheck gb_Top_MODULE_CHECK_TARGETS := slowcheck unitcheck subsequentcheck perfcheck uicheck
.PHONY : all check-if-root bootstrap gbuild build build-non-l10n-only build-l10n-only check clean clean-build clean-host test-install distclean distro-pack-install docs download etags fetch findunusedcode get-submodules id install install-strip tags debugrun help showmodules translations packageinfo internal.clean $(gb_Top_MODULE_CHECK_TARGETS) .PHONY : all check-if-root bootstrap gbuild build build-non-l10n-only build-l10n-only check clean clean-build clean-host test-install distclean distro-pack-install docs download etags fetch findunusedcode get-submodules id install install-strip tags debugrun help showmodules translations packageinfo internal.clean $(gb_Top_MODULE_CHECK_TARGETS)
@ -144,6 +144,7 @@ gbuild_TARGETS := AllLangHelp \
Rdb \ Rdb \
StaticLibrary \ StaticLibrary \
UIConfig \ UIConfig \
UITest \
UnoApi \ UnoApi \
UnpackedTarball \ UnpackedTarball \
WinResTarget \ WinResTarget \

View file

@ -138,6 +138,7 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\
ucb \ ucb \
ucbhelper \ ucbhelper \
udkapi \ udkapi \
$(call gb_Helper_optional,PYUNO,uitest) \
UnoControls \ UnoControls \
unodevtools \ unodevtools \
unoil \ unoil \
@ -181,7 +182,7 @@ endef
# otherwise cyclic dependencies ruin everything. # otherwise cyclic dependencies ruin everything.
# do not serialize on a partial build as that may fail due to missing deps. # do not serialize on a partial build as that may fail due to missing deps.
# the default goal is all (see Module.mk) # the default goal is all (see Module.mk)
ifeq (,$(filter-out all build check unitcheck slowcheck subsequentcheck,$(MAKECMDGOALS))) ifeq (,$(filter-out all build check unitcheck slowcheck subsequentcheck uicheck,$(MAKECMDGOALS)))
$(eval $(call repositorymodule_serialize,\ $(eval $(call repositorymodule_serialize,\
scfilt \ scfilt \
$(call gb_Helper_optional,SCRIPTING,vbaobj) \ $(call gb_Helper_optional,SCRIPTING,vbaobj) \

View file

@ -27,12 +27,14 @@
# recursive Module/checks # recursive Module/checks
# Module/slowcheck run all slow unit tests # Module/slowcheck run all slow unit tests
# Module/subsequentcheck run system tests all system tests # Module/subsequentcheck run system tests all system tests
# Module/uicheck run uitests all uitests
# recursive Module/subsequentchecks # recursive Module/subsequentchecks
# build (global) build the product top-level Module # build (global) build the product top-level Module
# unitcheck (global) run unit tests top-level Module/unitcheck # unitcheck (global) run unit tests top-level Module/unitcheck
# slowcheck (global) run slow unit tests top-level Module/slowcheck # slowcheck (global) run slow unit tests top-level Module/slowcheck
# subsequentcheck (global) run system tests top-level Module/subsequentcheck # subsequentcheck (global) run system tests top-level Module/subsequentcheck
# perfcheck (global) run performance unit tests top-level Module/perfcheck # perfcheck (global) run performance unit tests top-level Module/perfcheck
# uicheck (global) run the uitests run all uitests
# all (global) default goal build unitcheck # all (global) default goal build unitcheck
@ -47,6 +49,7 @@ gb_Module_SLOWCHECKTARGETSTACK :=
gb_Module_SUBSEQUENTCHECKTARGETSTACK := gb_Module_SUBSEQUENTCHECKTARGETSTACK :=
gb_Module_STAGINGCHECKTARGETSTACK := gb_Module_STAGINGCHECKTARGETSTACK :=
gb_Module_PERFCHECKTARGETSTACK := gb_Module_PERFCHECKTARGETSTACK :=
gb_Module_UICHECKTARGETSTACK :=
gb_Module_CLEANTARGETSTACK := gb_Module_CLEANTARGETSTACK :=
# The currently read gbuild makefile. # The currently read gbuild makefile.
@ -68,7 +71,7 @@ $(call gb_Module_get_clean_target,%) :
$(call gb_Output_announce,$*,$(false),MOD,5) $(call gb_Output_announce,$*,$(false),MOD,5)
$(call gb_Output_announce_title,module $* cleared.) $(call gb_Output_announce_title,module $* cleared.)
-$(call gb_Helper_abbreviate_dirs,\ -$(call gb_Helper_abbreviate_dirs,\
rm -f $(call gb_Module_get_target,$*) $(call gb_Module_get_nonl10n_target,$*) $(call gb_Module_get_l10n_target,$*) $(call gb_Module_get_check_target,$*) $(call gb_Module_get_slowcheck_target,$*) $(call gb_Module_get_subsequentcheck_target,$*) $(call gb_Module_get_perfcheck_target,$*)) rm -f $(call gb_Module_get_target,$*) $(call gb_Module_get_nonl10n_target,$*) $(call gb_Module_get_l10n_target,$*) $(call gb_Module_get_check_target,$*) $(call gb_Module_get_slowcheck_target,$*) $(call gb_Module_get_subsequentcheck_target,$*) $(call gb_Module_get_perfcheck_target,$*) $(call gb_Module_get_uicheck,$*))
$(call gb_Module_get_l10n_target,%) : $(call gb_Module_get_l10n_target,%) :
$(call gb_Output_announce,$*,$(true),LOC,5) $(call gb_Output_announce,$*,$(true),LOC,5)
@ -112,6 +115,13 @@ $(call gb_Module_get_perfcheck_target,%) :
mkdir -p $(dir $@) && \ mkdir -p $(dir $@) && \
touch $@) touch $@)
$(call gb_Module_get_uicheck_target,%) :
$(call gb_Output_announce,$*,$(true),UIT,5)
$(call gb_Output_announce_title,module $* uicheck done.)
-$(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $@) && \
touch $@)
$(call gb_Module_get_target,%) : $(call gb_Module_get_target,%) :
$(call gb_Output_announce,$*,$(true),MOD,5) $(call gb_Output_announce,$*,$(true),MOD,5)
$(call gb_Output_announce_title,module $* done.) $(call gb_Output_announce_title,module $* done.)
@ -119,7 +129,7 @@ $(call gb_Module_get_target,%) :
mkdir -p $(dir $@) && \ mkdir -p $(dir $@) && \
touch $@) touch $@)
.PHONY : all build build-l10n-only build-non-l10n-only unitcheck slowcheck subsequentcheck stagingcheck perfcheck clean check debugrun help showmodules translations .PHONY : all build build-l10n-only build-non-l10n-only unitcheck slowcheck subsequentcheck stagingcheck perfcheck uicheck clean check debugrun help showmodules translations
.DEFAULT_GOAL := all .DEFAULT_GOAL := all
all : build $(if $(CROSS_COMPILING),,unitcheck $(if $(gb_PARTIAL_BUILD),,slowcheck)) all : build $(if $(CROSS_COMPILING),,unitcheck $(if $(gb_PARTIAL_BUILD),,slowcheck))
@ -174,6 +184,11 @@ perfcheck :
$(call gb_Output_announce_title,all perftests checked.) $(call gb_Output_announce_title,all perftests checked.)
$(call gb_Output_announce_bell) $(call gb_Output_announce_bell)
uicheck : build
$(if $(gb_VERBOSE),$(call gb_Output_announce,loaded modules: $(sort $(gb_Module_ALLMODULES)),$(true),UIT,6))
$(call gb_Output_announce_title,all uicheck checked.)
$(call gb_Output_announce_bell)
clean : clean :
$(if $(gb_VERBOSE),$(call gb_Output_announce,top level modules: $(foreach module,$^,$(notdir $(module))),$(false),ALL,6)) $(if $(gb_VERBOSE),$(call gb_Output_announce,top level modules: $(foreach module,$^,$(notdir $(module))),$(false),ALL,6))
$(call gb_Output_announce,loaded modules: $(sort $(gb_Module_ALLMODULES)),$(false),ALL,6) $(call gb_Output_announce,loaded modules: $(sort $(gb_Module_ALLMODULES)),$(false),ALL,6)
@ -217,6 +232,7 @@ gb_Module_TARGETSTACK := $(call gb_Module_get_target,$(1)) $(gb_Module_TARGETSTA
gb_Module_L10NTARGETSTACK := $(call gb_Module_get_l10n_target,$(1)) $(gb_Module_L10NTARGETSTACK) gb_Module_L10NTARGETSTACK := $(call gb_Module_get_l10n_target,$(1)) $(gb_Module_L10NTARGETSTACK)
gb_Module_CHECKTARGETSTACK := $(call gb_Module_get_check_target,$(1)) $(gb_Module_CHECKTARGETSTACK) gb_Module_CHECKTARGETSTACK := $(call gb_Module_get_check_target,$(1)) $(gb_Module_CHECKTARGETSTACK)
gb_Module_SLOWCHECKTARGETSTACK := $(call gb_Module_get_slowcheck_target,$(1)) $(gb_Module_SLOWCHECKTARGETSTACK) gb_Module_SLOWCHECKTARGETSTACK := $(call gb_Module_get_slowcheck_target,$(1)) $(gb_Module_SLOWCHECKTARGETSTACK)
gb_Module_UICHECKTARGETSTACK := $(call gb_Module_get_uicheck_target,$(1)) $(gb_Module_UICHECKTARGETSTACK)
gb_Module_SUBSEQUENTCHECKTARGETSTACK := $(call gb_Module_get_subsequentcheck_target,$(1)) $(gb_Module_SUBSEQUENTCHECKTARGETSTACK) gb_Module_SUBSEQUENTCHECKTARGETSTACK := $(call gb_Module_get_subsequentcheck_target,$(1)) $(gb_Module_SUBSEQUENTCHECKTARGETSTACK)
gb_Module_STAGINGCHECKTARGETSTACK := $(call gb_Module_get_stagingcheck_target,$(1)) $(gb_Module_STAGINGCHECKTARGETSTACK) gb_Module_STAGINGCHECKTARGETSTACK := $(call gb_Module_get_stagingcheck_target,$(1)) $(gb_Module_STAGINGCHECKTARGETSTACK)
gb_Module_PERFCHECKTARGETSTACK := $(call gb_Module_get_perfcheck_target,$(1)) $(gb_Module_PERFCHECKTARGETSTACK) gb_Module_PERFCHECKTARGETSTACK := $(call gb_Module_get_perfcheck_target,$(1)) $(gb_Module_PERFCHECKTARGETSTACK)
@ -229,6 +245,7 @@ $(if $(filter-out libreoffice instsetoo_native android ios,$(1)),\
$(call gb_Postprocess_get_target,AllModuleTests) : $(call gb_Module_get_check_target,$(1)) $(call gb_Postprocess_get_target,AllModuleTests) : $(call gb_Module_get_check_target,$(1))
$(call gb_Postprocess_get_target,AllModuleSlowtests) : $(call gb_Module_get_slowcheck_target,$(1)) $(call gb_Postprocess_get_target,AllModuleSlowtests) : $(call gb_Module_get_slowcheck_target,$(1))
$(call gb_Postprocess_get_target,AllModuleUITest) : $(call gb_Module_get_uicheck_target,$(1))
endef endef
@ -324,6 +341,14 @@ $(call gb_Module_get_clean_target,$(1)) : $$(gb_Module_CURRENTCLEANTARGET)
endef endef
define gb_Module_add_uicheck_target
$(call gb_Module__read_targetfile,$(1),$(2),uicheck target)
$(call gb_Module_get_uicheck_target,$(1)) : $$(gb_Module_CURRENTTARGET)
$(call gb_Module_get_clean_target,$(1)) : $$(gb_Module_CURRENTCLEANTARGET)
endef
define gb_Module_add_moduledir define gb_Module_add_moduledir
include $(patsubst $(1):%,%,$(filter $(1):%,$(gb_Module_MODULELOCATIONS)))/$(2)/Module_$(2).mk include $(patsubst $(1):%,%,$(filter $(1):%,$(gb_Module_MODULELOCATIONS)))/$(2)/Module_$(2).mk
$(call gb_Module_get_target,$(1)) : $$(firstword $$(gb_Module_TARGETSTACK)) $(call gb_Module_get_target,$(1)) : $$(firstword $$(gb_Module_TARGETSTACK))
@ -333,6 +358,7 @@ $(call gb_Module_get_slowcheck_target,$(1)) : $$(firstword $$(gb_Module_SLOWCHEC
$(call gb_Module_get_subsequentcheck_target,$(1)) : $$(firstword $$(gb_Module_SUBSEQUENTCHECKTARGETSTACK)) $(call gb_Module_get_subsequentcheck_target,$(1)) : $$(firstword $$(gb_Module_SUBSEQUENTCHECKTARGETSTACK))
$(call gb_Module_get_stagingcheck_target,$(1)) : $$(firstword $$(gb_Module_STAGINGCHECKTARGETSTACK)) $(call gb_Module_get_stagingcheck_target,$(1)) : $$(firstword $$(gb_Module_STAGINGCHECKTARGETSTACK))
$(call gb_Module_get_perfcheck_target,$(1)) : $$(firstword $$(gb_Module_PERFCHECKTARGETSTACK)) $(call gb_Module_get_perfcheck_target,$(1)) : $$(firstword $$(gb_Module_PERFCHECKTARGETSTACK))
$(call gb_Module_get_uicheck_target,$(1)) : $$(firstword $$(gb_Module_UICHECKTARGETSTACK))
$(call gb_Module_get_clean_target,$(1)) : $$(firstword $$(gb_Module_CLEANTARGETSTACK)) $(call gb_Module_get_clean_target,$(1)) : $$(firstword $$(gb_Module_CLEANTARGETSTACK))
gb_Module_TARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_TARGETSTACK)),$$(gb_Module_TARGETSTACK)) gb_Module_TARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_TARGETSTACK)),$$(gb_Module_TARGETSTACK))
gb_Module_L10NTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_L10NTARGETSTACK)),$$(gb_Module_L10NTARGETSTACK)) gb_Module_L10NTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_L10NTARGETSTACK)),$$(gb_Module_L10NTARGETSTACK))
@ -341,6 +367,7 @@ gb_Module_SLOWCHECKTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_SLOWCHECKT
gb_Module_SUBSEQUENTCHECKTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_SUBSEQUENTCHECKTARGETSTACK)),$$(gb_Module_SUBSEQUENTCHECKTARGETSTACK)) gb_Module_SUBSEQUENTCHECKTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_SUBSEQUENTCHECKTARGETSTACK)),$$(gb_Module_SUBSEQUENTCHECKTARGETSTACK))
gb_Module_STAGINGCHECKTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_STAGINGCHECKTARGETSTACK)),$$(gb_Module_STAGINGCHECKTARGETSTACK)) gb_Module_STAGINGCHECKTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_STAGINGCHECKTARGETSTACK)),$$(gb_Module_STAGINGCHECKTARGETSTACK))
gb_Module_PERFCHECKTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_PERFCHECKTARGETSTACK)),$$(gb_Module_PERFCHECKTARGETSTACK)) gb_Module_PERFCHECKTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_PERFCHECKTARGETSTACK)),$$(gb_Module_PERFCHECKTARGETSTACK))
gb_Module_UICHECKTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_UICHECKTARGETSTACK)),$$(gb_Module_UICHECKTARGETSTACK))
gb_Module_CLEANTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_CLEANTARGETSTACK)),$$(gb_Module_CLEANTARGETSTACK)) gb_Module_CLEANTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_CLEANTARGETSTACK)),$$(gb_Module_CLEANTARGETSTACK))
endef endef
@ -389,6 +416,11 @@ $(foreach target,$(sort $(2)),$(call gb_Module_add_moduledir,$(1),$(target)))
endef endef
define gb_Module_add_uicheck_targets
$(foreach target,$(2),$(call gb_Module_add_uicheck_target,$(1),$(target)))
endef
define gb_Module_make_global_targets define gb_Module_make_global_targets
ifneq ($$(gb_Module_TARGETSTACK),) ifneq ($$(gb_Module_TARGETSTACK),)
$$(eval $$(call gb_Output_error,Corrupted module target stack!1)) $$(eval $$(call gb_Output_error,Corrupted module target stack!1))
@ -404,6 +436,7 @@ slowcheck : $$(firstword $$(gb_Module_SLOWCHECKTARGETSTACK))
subsequentcheck : $$(firstword $$(gb_Module_SUBSEQUENTCHECKTARGETSTACK)) subsequentcheck : $$(firstword $$(gb_Module_SUBSEQUENTCHECKTARGETSTACK))
stagingcheck : $$(firstword $$(gb_Module_STAGINGCHECKTARGETSTACK)) stagingcheck : $$(firstword $$(gb_Module_STAGINGCHECKTARGETSTACK))
perfcheck : $$(firstword $$(gb_Module_PERFCHECKTARGETSTACK)) perfcheck : $$(firstword $$(gb_Module_PERFCHECKTARGETSTACK))
uicheck : $$(firstword $$(gb_Module_UICHECKTARGETSTACK))
clean : $$(firstword $$(gb_Module_CLEANTARGETSTACK)) clean : $$(firstword $$(gb_Module_CLEANTARGETSTACK))
ifneq ($$(words $$(gb_Module_TARGETSTACK)),1) ifneq ($$(words $$(gb_Module_TARGETSTACK)),1)
@ -415,11 +448,12 @@ gb_Module_L10NTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_L10NTARGETSTACK
gb_Module_CHECKTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_CHECKTARGETSTACK)),$$(gb_Module_CHECKTARGETSTACK)) gb_Module_CHECKTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_CHECKTARGETSTACK)),$$(gb_Module_CHECKTARGETSTACK))
gb_Module_SLOWCHECKTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_SLOWCHECKTARGETSTACK)),$$(gb_Module_SLOWCHECKTARGETSTACK)) gb_Module_SLOWCHECKTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_SLOWCHECKTARGETSTACK)),$$(gb_Module_SLOWCHECKTARGETSTACK))
gb_Module_SUBSEQUENTCHECKTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_SUBSEQUENTCHECKTARGETSTACK)),$$(gb_Module_SUBSEQUENTCHECKTARGETSTACK)) gb_Module_SUBSEQUENTCHECKTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_SUBSEQUENTCHECKTARGETSTACK)),$$(gb_Module_SUBSEQUENTCHECKTARGETSTACK))
gb_Module_UICHECKTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_UICHECKTARGETSTACK)),$$(gb_Module_UICHECKTARGETSTACK))
gb_Module_STAGINGCHECKTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_STAGINGCHECKTARGETSTACK)),$$(gb_Module_STAGINGCHECKTARGETSTACK)) gb_Module_STAGINGCHECKTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_STAGINGCHECKTARGETSTACK)),$$(gb_Module_STAGINGCHECKTARGETSTACK))
gb_Module_PERFCHECKTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_PERFCHECKTARGETSTACK)),$$(gb_Module_PERFCHECKTARGETSTACK)) gb_Module_PERFCHECKTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_PERFCHECKTARGETSTACK)),$$(gb_Module_PERFCHECKTARGETSTACK))
gb_Module_CLEANTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_CLEANTARGETSTACK)),$$(gb_Module_CLEANTARGETSTACK)) gb_Module_CLEANTARGETSTACK := $$(wordlist 2,$$(words $$(gb_Module_CLEANTARGETSTACK)),$$(gb_Module_CLEANTARGETSTACK))
ifneq ($$(and $$(gb_Module_TARGETSTACK),$$(gb_Module_CHECKTARGETSTACK),$$(gb_Module_SLOWCHECKTARGETSTACK),$$(gb_Module_SUBSEQUENTCHECKTARGETSTACK),$$(gb_Module_STAGINGCHECKTARGETSTACK),$$(gb_Module_PERFCHECKTARGETSTACK),$$(gb_Module_L10NTARGETSTACK)),) ifneq ($$(and $$(gb_Module_TARGETSTACK),$$(gb_Module_CHECKTARGETSTACK),$$(gb_Module_SLOWCHECKTARGETSTACK),$$(gb_Module_SUBSEQUENTCHECKTARGETSTACK),$$(gb_Module_UICHECKTARGETSTACK),$$(gb_Module_STAGINGCHECKTARGETSTACK),$$(gb_Module_PERFCHECKTARGETSTACK),$$(gb_Module_L10NTARGETSTACK)),)
$$(eval $$(call gb_Output_error,Corrupted module target stack!3)) $$(eval $$(call gb_Output_error,Corrupted module target stack!3))
endif endif

View file

@ -47,6 +47,7 @@ $(call gb_Postprocess_Postprocess,AllResources,All resources,$(WORKDIR)/AllLangR
$(call gb_Postprocess_Postprocess,AllUIConfigs,All UI configuration files,$(WORKDIR)/UIConfig/) $(call gb_Postprocess_Postprocess,AllUIConfigs,All UI configuration files,$(WORKDIR)/UIConfig/)
$(call gb_Postprocess_Postprocess,AllModuleTests,All modules' tests,$(WORKDIR)/Module/check/) $(call gb_Postprocess_Postprocess,AllModuleTests,All modules' tests,$(WORKDIR)/Module/check/)
$(call gb_Postprocess_Postprocess,AllModuleSlowtests,All modules' slowtests,$(WORKDIR)/Module/slowcheck/) $(call gb_Postprocess_Postprocess,AllModuleSlowtests,All modules' slowtests,$(WORKDIR)/Module/slowcheck/)
$(call gb_Postprocess_Postprocess,AllModuleUITests,All modules' uitests,$(WORKDIR)/Module/uicheck/)
endef endef

View file

@ -121,6 +121,7 @@ gb_Module_get_slowcheck_target = $(WORKDIR)/Module/slowcheck/$(1)
gb_Module_get_subsequentcheck_target = $(WORKDIR)/Module/subsequentcheck/$(1) gb_Module_get_subsequentcheck_target = $(WORKDIR)/Module/subsequentcheck/$(1)
gb_Module_get_stagingcheck_target = $(WORKDIR)/Module/stagingcheck/$(1) gb_Module_get_stagingcheck_target = $(WORKDIR)/Module/stagingcheck/$(1)
gb_Module_get_perfcheck_target = $(WORKDIR)/Module/perfcheck/$(1) gb_Module_get_perfcheck_target = $(WORKDIR)/Module/perfcheck/$(1)
gb_Module_get_uicheck_target = $(WORKDIR)/Module/uicheck/$(1)
gb_Module_get_target = $(WORKDIR)/Module/$(1) gb_Module_get_target = $(WORKDIR)/Module/$(1)
gb_ObjCxxObject_get_target = $(WORKDIR)/ObjCxxObject/$(1).o gb_ObjCxxObject_get_target = $(WORKDIR)/ObjCxxObject/$(1).o
gb_ObjCObject_get_target = $(WORKDIR)/ObjCObject/$(1).o gb_ObjCObject_get_target = $(WORKDIR)/ObjCObject/$(1).o
@ -160,6 +161,7 @@ gb_UIImageListTarget_get_target = $(WORKDIR)/UIImageListTarget/$(1).ilst
gb_UILocalizeTarget_get_target = $(WORKDIR)/UILocalizeTarget/$(1).done gb_UILocalizeTarget_get_target = $(WORKDIR)/UILocalizeTarget/$(1).done
gb_UILocalizeTarget_get_workdir = $(WORKDIR)/UILocalizeTarget/$(1) gb_UILocalizeTarget_get_workdir = $(WORKDIR)/UILocalizeTarget/$(1)
gb_UIMenubarTarget_get_target = $(WORKDIR)/UIMenubarTarget/$(1).xml gb_UIMenubarTarget_get_target = $(WORKDIR)/UIMenubarTarget/$(1).xml
gb_UITest_get_target = $(WORKDIR)/UITest/$(1)/done
gb_UnoApiTarget_get_target = $(WORKDIR)/UnoApiTarget/$(1).rdb gb_UnoApiTarget_get_target = $(WORKDIR)/UnoApiTarget/$(1).rdb
gb_UnoApiHeadersTarget_get_bootstrap_dir = $(WORKDIR)/UnoApiHeadersTarget/$(1)/$(call gb_UnoApiHeadersTarget_select_variant,$(1),bootstrap) gb_UnoApiHeadersTarget_get_bootstrap_dir = $(WORKDIR)/UnoApiHeadersTarget/$(1)/$(call gb_UnoApiHeadersTarget_select_variant,$(1),bootstrap)
gb_UnoApiHeadersTarget_get_comprehensive_dir = $(WORKDIR)/UnoApiHeadersTarget/$(1)/$(call gb_UnoApiHeadersTarget_select_variant,$(1),comprehensive) gb_UnoApiHeadersTarget_get_comprehensive_dir = $(WORKDIR)/UnoApiHeadersTarget/$(1)/$(call gb_UnoApiHeadersTarget_select_variant,$(1),comprehensive)
@ -284,6 +286,7 @@ $(eval $(call gb_Helper_make_clean_targets,\
UIImageListTarget \ UIImageListTarget \
UILocalizeTarget \ UILocalizeTarget \
UIMenubarTarget \ UIMenubarTarget \
UITest \
UnoApi \ UnoApi \
UnoApiHeadersTarget \ UnoApiHeadersTarget \
UnoApiTarget \ UnoApiTarget \

114
solenv/gbuild/UITest.mk Normal file
View file

@ -0,0 +1,114 @@
# -*- 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/.
#
# UITest class
gb_UITest_UNITTESTFAILED ?= $(GBUILDDIR)/platform/unittest-failed-default.sh
ifeq ($(SYSTEM_PYTHON),)
gb_UITest_EXECUTABLE := $(gb_Python_INSTALLED_EXECUTABLE)
gb_UITest_EXECUTABLE_GDB := $(gb_Python_INSTALLED_EXECUTABLE_GDB)
gb_UITest_DEPS ?= $(call gb_Package_get_target,python3) $(call gb_Package_get_target,python_shell)
else
gb_UITest_EXECUTABLE := $(PYTHON_FOR_BUILD)
gb_UITest_EXECUTABLE_GDB := $(PYTHON_FOR_BUILD)
gb_UITest_DEPS :=
endif
gb_UITest_COMMAND := $(gb_UITest_EXECUTABLE) $(SRCDIR)/uitest/main.py
.PHONY : $(call gb_UITest_get_clean_target,%)
$(call gb_UITest_get_clean_target,%) :
$(call gb_Helper_abbreviate_dirs,\
rm -f $@ $@.log)
ifneq ($(DISABLE_PYTHON),TRUE)
.PHONY : $(call gb_UITest_get_target,%)
$(call gb_UITest_get_target,%) :| $(gb_UITest_DEPS)
$(call gb_Output_announce,$*,$(true),UIT,2)
$(call gb_Helper_abbreviate_dirs,\
rm -rf $(dir $(call gb_UITest_get_target,$*)) && \
mkdir -p $(dir $(call gb_UITest_get_target,$*)) && \
rm -fr $@.core && mkdir $@.core && cd $@.core && \
($(gb_UITest_PRECOMMAND) \
$(if $(G_SLICE),G_SLICE=$(G_SLICE)) \
$(if $(GLIBCXX_FORCE_NEW),GLIBCXX_FORCE_NEW=$(GLIBCXX_FORCE_NEW)) \
$(DEFS) \
TEST_LIB=$(call gb_Library_get_target,test) \
URE_BOOTSTRAP=vnd.sun.star.pathname:$(call gb_Helper_get_rcfile,$(INSTROOT)/$(LIBO_ETC_FOLDER)/fundamental) \
PYTHONPATH="$(PYPATH)" \
TestUserDir="$(call gb_Helper_make_url,$(dir $(call gb_UITest_get_target,$*)))" \
PYTHONDONTWRITEBYTECODE=1 \
$(if $(filter-out MACOSX WNT,$(OS_FOR_BUILD)),$(if $(ENABLE_HEADLESS),, \
SAL_USE_VCLPLUGIN=svp \
)) \
$(gb_UITest_COMMAND) \
--soffice=path:$(INSTROOT)/$(LIBO_BIN_FOLDER)/soffice \
--userdir=$(call gb_Helper_make_url,$(dir $(call gb_UITest_get_target,$*))user) \
--file=$(SRCDIR)/uitest/$(strip $(MODULES)) \
$(if $(gb_CppunitTest__interactive),, \
> $@.log 2>&1 \
|| ($(if $(value gb_CppunitTest_postprocess), \
RET=$$?; \
$(call gb_CppunitTest_postprocess,$(gb_UITest_EXECUTABLE_GDB),$@.core,$$RET) >> $@.log 2>&1;) \
cat $@.log; $(gb_UITest_UNITTESTFAILED) Python $*))))
# always use udkapi and URE services
define gb_UITest_UITest
$(call gb_UITest_get_target,$(1)) : PYPATH := $(SRCDIR)/unotest/source/python$$(gb_CLASSPATHSEP)$(INSTROOT)/$(LIBO_LIB_PYUNO_FOLDER)$(if $(filter-out $(LIBO_LIB_PYUNO_FOLDER),$(LIBO_LIB_FOLDER)),$(gb_CLASSPATHSEP)$(INSTROOT)/$(LIBO_LIB_FOLDER))
$(call gb_UITest_get_target,$(1)) : MODULES :=
$(eval $(call gb_Module_register_target,$(call gb_UITest_get_target,$(1)),$(call gb_UITest_get_clean_target,$(1))))
$(call gb_Helper_make_userfriendly_targets,$(1),UITest)
endef
define gb_UITest_set_defs
$(call gb_UITest_get_target,$(1)) : DEFS := $(2)
endef
# put the directory on the PYTHONPATH because the "unittest" loader
# mysteriously fails to load modules given as absolute path unless the $PWD is
# a prefix of the absolute path, which it is not when we go into a certain
# dir to get a core dump there
#
# gb_UITest_add_modules directory module(s)
define gb_UITest_add_modules
$(call gb_UITest_get_target,$(1)) : PYPATH := $$(PYPATH)$$(gb_CLASSPATHSEP)$(2)
$(call gb_UITest_get_target,$(1)) : MODULES += $(3)
endef
define gb_UITest_use_customtarget
$(call gb_UITest_get_target,$(1)) : $(call gb_CustomTarget_get_workdir,$(2))
endef
else # DISABLE_PYTHON
.PHONY : $(call gb_UITest_get_target,$(1))
$(call gb_UITest_get_target,%) :
$(call gb_Output_announce,$* (skipped - no UITest),$(true),PYT,2)
@true
define gb_UITest_UITest
$(eval $(call gb_Module_register_target,$(call gb_UITest_get_target,$(1)),$(call gb_UITest_get_clean_target,$(1))))
$(call gb_Helper_make_userfriendly_targets,$(1),UITest)
endef
gb_UITest_set_defs :=
gb_UITest_add_modules :=
gb_UITest_use_customtarget :=
endif # DISABLE_PYTHON
# vim: set noet sw=4:

View file

@ -9,21 +9,21 @@
ifneq ($(CROSS_COMPILING),) ifneq ($(CROSS_COMPILING),)
gb_Module_add_targets_for_build := gb_Module_add_targets_for_build :=
gb_Module_SKIPTARGETS := check slowcheck subsequentcheck gb_Module_SKIPTARGETS := check slowcheck subsequentcheck uicheck
endif endif
ifeq ($(gb_Side),build) ifeq ($(gb_Side),build)
gb_Module_SKIPTARGETS := check slowcheck subsequentcheck gb_Module_SKIPTARGETS := check slowcheck subsequentcheck uicheck
endif endif
ifeq ($(MAKECMDGOALS),build) ifeq ($(MAKECMDGOALS),build)
gb_Module_SKIPTARGETS := check slowcheck subsequentcheck gb_Module_SKIPTARGETS := check slowcheck subsequentcheck uicheck
endif endif
ifeq (,$(filter perfcheck,$(MAKECMDGOALS))) ifeq (,$(filter perfcheck,$(MAKECMDGOALS)))
gb_Module_SKIPTARGETS += perfcheck gb_Module_SKIPTARGETS += perfcheck
else else
gb_Module_SKIPTARGETS += check slowcheck subsequentcheck gb_Module_SKIPTARGETS += check slowcheck subsequentcheck uicheck
endif endif
ifneq ($(strip $(MAKECMDGOALS)),) ifneq ($(strip $(MAKECMDGOALS)),)
@ -37,7 +37,7 @@ ifeq (T,$(if $(filter-out $(gb_SpeedUpTargets_LEVEL_1),$(MAKECMDGOALS)),,T))
gb_FULLDEPS := gb_FULLDEPS :=
ifeq (T,$(if $(filter-out $(gb_SpeedUpTargets_LEVEL_2),$(MAKECMDGOALS)),,T)) ifeq (T,$(if $(filter-out $(gb_SpeedUpTargets_LEVEL_2),$(MAKECMDGOALS)),,T))
gb_Module_SKIPTARGETS += check slowcheck subsequentcheck gb_Module_SKIPTARGETS += check slowcheck subsequentcheck uicheck
ifeq (T,$(if $(filter-out $(gb_SpeedUpTargets_LEVEL_3),$(MAKECMDGOALS)),,T)) ifeq (T,$(if $(filter-out $(gb_SpeedUpTargets_LEVEL_3),$(MAKECMDGOALS)),,T))
gb_Module_SKIPTARGETS += build gb_Module_SKIPTARGETS += build
@ -73,6 +73,10 @@ ifneq (,$(filter perfcheck,$(gb_Module_SKIPTARGETS)))
gb_Module_add_perfcheck_target = gb_Module_add_perfcheck_target =
endif endif
ifneq (,$(filter uicheck,$(gb_Module_SKIPTARGETS)))
gb_Module_add_uicheck_target =
endif
ifneq (,$(filter module,$(gb_Module_SKIPTARGETS))) ifneq (,$(filter module,$(gb_Module_SKIPTARGETS)))
gb_Module_add_moduledir = gb_Module_add_moduledir =
endif endif

View file

@ -287,6 +287,7 @@ include $(foreach class, \
PrecompiledHeaders \ PrecompiledHeaders \
Pyuno \ Pyuno \
PythonTest \ PythonTest \
UITest \
Rdb \ Rdb \
CppunitTest \ CppunitTest \
Jar \ Jar \

14
uitest/Makefile Normal file
View file

@ -0,0 +1,14 @@
# -*- 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/.
#
module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
include $(module_directory)/../solenv/gbuild/partial_build.mk
# vim: set noet sw=4 ts=4:

15
uitest/Module_uitest.mk Normal file
View file

@ -0,0 +1,15 @@
# -*- 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_Module_Module,uitest))
$(eval $(call gb_Module_add_uicheck_targets,uitest,\
UITest_calc_demo \
))

View file

@ -0,0 +1,15 @@
# -*- 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_UITest_UITest,calc_demo))
$(eval $(call gb_UITest_add_modules,calc_demo,$(SRCDIR)/uitest,\
calc_tests/calc_demo.txt \
))
# vim: set noet sw=4 ts=4:

View file

@ -0,0 +1 @@
calc_tests.create_range_name.create_range_name