mar: use OS version in User-Agent
[LibreOffice.git] / testtools / CustomTarget_bridgetest.mk
blobfd12947ac434d0084f90cce501daaee2eec2ee21
1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 $(eval $(call gb_CustomTarget_CustomTarget,testtools/bridgetest))
12 testtools_BRIDGEDIR := $(gb_CustomTarget_workdir)/testtools/bridgetest
14 ifeq ($(OS),WNT)
15 testtools_BATCHSUFFIX := .bat
16 else
17 testtools_BATCHSUFFIX :=
18 endif
20 $(call gb_CustomTarget_get_target,testtools/bridgetest) : \
21 $(testtools_BRIDGEDIR)/bridgetest_server$(testtools_BATCHSUFFIX) \
22 $(testtools_BRIDGEDIR)/bridgetest_client$(testtools_BATCHSUFFIX) \
23 $(if $(ENABLE_JAVA),\
24 $(testtools_BRIDGEDIR)/bridgetest_javaserver$(testtools_BATCHSUFFIX))
26 $(testtools_BRIDGEDIR)/bridgetest_server$(testtools_BATCHSUFFIX) :| $(testtools_BRIDGEDIR)/.dir
27 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1)
28 $(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),ECH)
29 $(call gb_Helper_abbreviate_dirs,\
30 echo \
31 "$(call gb_Executable_get_target_for_build,uno)" \
32 "-s com.sun.star.test.bridge.CppTestObject" \
33 "-u 'uno:socket$(COMMA)host=127.0.0.1$(COMMA)port=2002;urp;test'" \
34 "--singleaccept" \
35 "-env:LO_BUILD_LIB_DIR=$(call gb_Helper_make_url,$(gb_Library_WORKDIR_FOR_BUILD))" \
36 "-env:URE_MORE_SERVICES=$(call gb_Helper_make_url,$(call gb_Rdb_get_target,uno_services))" \
37 "-env:URE_MORE_TYPES=$(call gb_Helper_make_url,$(WORKDIR)/UnoApiTarget/bridgetest.rdb)" \
38 > $@)
39 $(if $(filter-out WNT,$(OS)),chmod +x $@)
40 $(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),ECH)
43 testtools_MY_CLASSPATH := $(call gb_Jar_get_target,ridl)$(gb_CLASSPATHSEP)$(call gb_Jar_get_target,java_uno)$(gb_CLASSPATHSEP)$(call gb_Jar_get_target,juh)
45 $(testtools_BRIDGEDIR)/bridgetest_javaserver$(testtools_BATCHSUFFIX) :| $(testtools_BRIDGEDIR)/.dir
46 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1)
47 $(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),ECH)
48 $(call gb_Helper_abbreviate_dirs,\
49 echo \
50 "URE_MORE_SERVICES=$(call gb_Helper_make_url,$(call gb_Rdb_get_target,uno_services))" \
51 "URE_MORE_TYPES=$(call gb_Helper_make_url,$(WORKDIR)/UnoApiTarget/bridgetest.rdb)" \
52 "java" \
53 "-classpath $(testtools_MY_CLASSPATH)$(gb_CLASSPATHSEP)$(call gb_Jar_get_target,testComponent)" \
54 "com.sun.star.comp.bridge.TestComponentMain" \
55 \""uno:socket$(COMMA)host=127.0.0.1$(COMMA)port=2002;urp;test"\" \
56 "singleaccept" \
57 > $@)
58 $(if $(filter-out WNT,$(OS)),chmod +x $@)
59 $(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),ECH)
61 $(testtools_BRIDGEDIR)/bridgetest_client$(testtools_BATCHSUFFIX) :| $(testtools_BRIDGEDIR)/.dir
62 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1)
63 $(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),ECH)
64 $(call gb_Helper_abbreviate_dirs,\
65 echo \
66 "$(call gb_Executable_get_target_for_build,uno)" \
67 "-s com.sun.star.test.bridge.BridgeTest --" \
68 "-u 'uno:socket$(COMMA)host=127.0.0.1$(COMMA)port=2002;urp;test'" \
69 "-env:LO_BUILD_LIB_DIR=$(call gb_Helper_make_url,$(gb_Library_WORKDIR_FOR_BUILD))" \
70 "-env:URE_MORE_SERVICES=$(call gb_Helper_make_url,$(call gb_Rdb_get_target,uno_services))" \
71 "-env:URE_MORE_TYPES=$(call gb_Helper_make_url,$(WORKDIR)/UnoApiTarget/bridgetest.rdb)" \
72 > $@)
73 $(if $(filter-out WNT,$(OS)),chmod +x $@)
74 $(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),ECH)
76 # vim: set noet sw=4 ts=4: