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
:= $(call gb_CustomTarget_get_workdir
,testtools
/bridgetest
)
15 testtools_BATCHSUFFIX
:= .bat
17 testtools_BATCHSUFFIX
:=
20 $(call gb_CustomTarget_get_target
,testtools
/bridgetest
) : \
21 $(testtools_BRIDGEDIR
)/bridgetest_server
$(testtools_BATCHSUFFIX
) \
22 $(testtools_BRIDGEDIR
)/bridgetest_client
$(testtools_BATCHSUFFIX
) \
24 $(testtools_BRIDGEDIR
)/bridgetest_javaserver
$(testtools_BATCHSUFFIX
) \
25 $(testtools_BRIDGEDIR
)/bridgetest_inprocess_java
$(testtools_BATCHSUFFIX
))
27 $(testtools_BRIDGEDIR
)/bridgetest_server
$(testtools_BATCHSUFFIX
) :|
$(testtools_BRIDGEDIR
)/.
dir
28 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),ECH
,1)
29 $(call gb_Trace_StartRange
,$(subst $(WORKDIR
)/,,$@
),ECH
)
30 $(call gb_Helper_abbreviate_dirs
,\
32 "$(call gb_Executable_get_target_for_build,uno)" \
33 "-s com.sun.star.test.bridge.CppTestObject" \
34 "-u 'uno:socket$(COMMA)host=127.0.0.1$(COMMA)port=2002;urp;test'" \
36 "-env:LO_BUILD_LIB_DIR=$(call gb_Helper_make_url,$(gb_Library_WORKDIR_FOR_BUILD))" \
37 "-env:URE_MORE_SERVICES=$(call gb_Helper_make_url,$(call gb_Rdb_get_target,uno_services))" \
38 "-env:URE_MORE_TYPES=$(call gb_Helper_make_url,$(WORKDIR)/UnoApiTarget/bridgetest.rdb)" \
40 $(if
$(filter-out WNT
,$(OS
)),chmod
+x
$@
)
41 $(call gb_Trace_EndRange
,$(subst $(WORKDIR
)/,,$@
),ECH
)
44 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
)
46 $(testtools_BRIDGEDIR
)/bridgetest_javaserver
$(testtools_BATCHSUFFIX
) :|
$(testtools_BRIDGEDIR
)/.
dir
47 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),ECH
,1)
48 $(call gb_Trace_StartRange
,$(subst $(WORKDIR
)/,,$@
),ECH
)
49 $(call gb_Helper_abbreviate_dirs
,\
51 "URE_MORE_SERVICES=$(call gb_Helper_make_url,$(call gb_Rdb_get_target,uno_services))" \
52 "URE_MORE_TYPES=$(call gb_Helper_make_url,$(WORKDIR)/UnoApiTarget/bridgetest.rdb)" \
54 "-classpath $(testtools_MY_CLASSPATH)$(gb_CLASSPATHSEP)$(call gb_Jar_get_target,testComponent)" \
55 "com.sun.star.comp.bridge.TestComponentMain" \
56 \""uno:socket$(COMMA)host=127.0.0.1$(COMMA)port=2002;urp;test"\" \
59 $(if
$(filter-out WNT
,$(OS
)),chmod
+x
$@
)
60 $(call gb_Trace_EndRange
,$(subst $(WORKDIR
)/,,$@
),ECH
)
62 $(testtools_BRIDGEDIR
)/bridgetest_inprocess_java
$(testtools_BATCHSUFFIX
) :|
$(testtools_BRIDGEDIR
)/.
dir
63 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),ECH
,1)
64 $(call gb_Trace_StartRange
,$(subst $(WORKDIR
)/,,$@
),ECH
)
65 $(call gb_Helper_abbreviate_dirs
,\
66 echo
"JAVA_HOME=$(JAVA_HOME)" \
67 "$(call gb_Executable_get_target_for_build,uno)" \
68 "-s com.sun.star.test.bridge.BridgeTest" \
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 "-- com.sun.star.test.bridge.JavaTestObject noCurrentContext" \
74 $(if
$(filter-out WNT
,$(OS
)),chmod
+x
$@
)
75 $(call gb_Trace_EndRange
,$(subst $(WORKDIR
)/,,$@
),ECH
)
77 $(testtools_BRIDGEDIR
)/bridgetest_client
$(testtools_BATCHSUFFIX
) :|
$(testtools_BRIDGEDIR
)/.
dir
78 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),ECH
,1)
79 $(call gb_Trace_StartRange
,$(subst $(WORKDIR
)/,,$@
),ECH
)
80 $(call gb_Helper_abbreviate_dirs
,\
82 "$(call gb_Executable_get_target_for_build,uno)" \
83 "-s com.sun.star.test.bridge.BridgeTest --" \
84 "-u 'uno:socket$(COMMA)host=127.0.0.1$(COMMA)port=2002;urp;test'" \
85 "-env:LO_BUILD_LIB_DIR=$(call gb_Helper_make_url,$(gb_Library_WORKDIR_FOR_BUILD))" \
86 "-env:URE_MORE_SERVICES=$(call gb_Helper_make_url,$(call gb_Rdb_get_target,uno_services))" \
87 "-env:URE_MORE_TYPES=$(call gb_Helper_make_url,$(WORKDIR)/UnoApiTarget/bridgetest.rdb)" \
89 $(if
$(filter-out WNT
,$(OS
)),chmod
+x
$@
)
90 $(call gb_Trace_EndRange
,$(subst $(WORKDIR
)/,,$@
),ECH
)
92 # vim: set noet sw=4 ts=4: