1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
2 # Version: MPL 1.1 / GPLv3+ / LGPLv3+
4 # The contents of this file are subject to the Mozilla Public License Version
5 # 1.1 (the "License"); you may not use this file except in compliance with
6 # the License or as specified alternatively below. You may obtain a copy of
7 # the License at http://www.mozilla.org/MPL/
9 # Software distributed under the License is distributed on an "AS IS" basis,
10 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 # for the specific language governing rights and limitations under the
14 # Major Contributor(s):
15 # Copyright (C) 2012 David Ostrovsky <d.ostrovsky@gmx.de> (initial developer)
17 # All Rights Reserved.
19 # For minor contributions see the git repository.
21 # Alternatively, the contents of this file may be used under the terms of
22 # either the GNU General Public License Version 3 or later (the "GPLv3+"), or
23 # the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
24 # in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
25 # instead of those above.
27 $(eval
$(call gb_CustomTarget_CustomTarget
,testtools
/bridgetest
))
29 testtools_BRIDGEDIR
:= $(call gb_CustomTarget_get_workdir
,testtools
/bridgetest
)
32 testtools_BATCHSUFFIX
:= .bat
34 testtools_BATCHSUFFIX
:=
37 $(call gb_CustomTarget_get_target
,testtools
/bridgetest
) : \
38 $(testtools_BRIDGEDIR
)/bridgetest_server
$(testtools_BATCHSUFFIX
) \
39 $(testtools_BRIDGEDIR
)/bridgetest_client
$(testtools_BATCHSUFFIX
) \
41 $(testtools_BRIDGEDIR
)/bridgetest_javaserver
$(testtools_BATCHSUFFIX
) \
42 $(testtools_BRIDGEDIR
)/bridgetest_inprocess_java
$(testtools_BATCHSUFFIX
))
44 $(testtools_BRIDGEDIR
)/bridgetest_server
$(testtools_BATCHSUFFIX
) :|
$(testtools_BRIDGEDIR
)/.
dir
45 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),ECH
,1)
46 $(call gb_Helper_abbreviate_dirs
,\
47 echo
"$(call gb_Executable_get_target_for_build,uno)" \
48 "-ro $(OUTDIR)/xml/uno_services.rdb" \
49 "-ro $(OUTDIR)/bin/udkapi.rdb" \
50 "-ro $(WORKDIR)/UnoApiTarget/bridgetest.rdb" \
51 "-s com.sun.star.test.bridge.CppTestObject" \
52 "-u 'uno:socket$(COMMA)host=127.0.0.1$(COMMA)port=2002;urp;test'" \
53 "--singleaccept" > $@
)
54 $(if
$(filter-out WNT
,$(OS
)),chmod
+x
$@
)
57 testtools_MY_CLASSPATH
:= $(OUTDIR
)/bin
/ridl.jar
$(gb_CLASSPATHSEP
)$(OUTDIR
)/bin
/java_uno.jar
$(gb_CLASSPATHSEP
)$(OUTDIR
)/bin
/jurt.jar
$(gb_CLASSPATHSEP
)$(OUTDIR
)/bin
/juh.jar
59 $(testtools_BRIDGEDIR
)/bridgetest_javaserver
$(testtools_BATCHSUFFIX
) :|
$(testtools_BRIDGEDIR
)/.
dir
60 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),ECH
,1)
61 $(call gb_Helper_abbreviate_dirs
,\
63 "-classpath $(testtools_MY_CLASSPATH)$(gb_CLASSPATHSEP)$(OUTDIR)/bin/testComponent.jar" \
64 "com.sun.star.comp.bridge.TestComponentMain" \
65 \""uno:socket$(COMMA)host=127.0.0.1$(COMMA)port=2002;urp;test"\" \
67 $(if
$(filter-out WNT
,$(OS
)),chmod
+x
$@
)
69 $(testtools_BRIDGEDIR
)/bridgetest_inprocess_java
$(testtools_BATCHSUFFIX
) :|
$(testtools_BRIDGEDIR
)/.
dir
70 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),ECH
,1)
71 $(call gb_Helper_abbreviate_dirs
,\
72 echo
"JAVA_HOME=$(JAVA_HOME)" \
73 "LD_LIBRARY_PATH=$(OUTDIR)/lib" \
74 "$(call gb_Executable_get_target_for_build,uno)" \
75 "-ro $(OUTDIR)/xml/ure/services.rdb" \
76 "-ro $(OUTDIR)/xml/uno_services.rdb" \
77 "-ro $(OUTDIR)/bin/udkapi.rdb" \
78 "-ro $(WORKDIR)/UnoApiTarget/bridgetest.rdb" \
79 "-s com.sun.star.test.bridge.BridgeTest" \
80 "-env:URE_INTERNAL_JAVA_DIR=file://$(OUTDIR)/bin" \
81 "-env:URE_INTERNAL_LIB_DIR=file://$(OUTDIR)/lib" \
82 "-- com.sun.star.test.bridge.JavaTestObject noCurrentContext" \
84 $(if
$(filter-out WNT
,$(OS
)),chmod
+x
$@
)
86 $(testtools_BRIDGEDIR
)/bridgetest_client
$(testtools_BATCHSUFFIX
) :|
$(testtools_BRIDGEDIR
)/.
dir
87 $(call gb_Output_announce
,$(subst $(WORKDIR
)/,,$@
),$(true
),ECH
,1)
88 $(call gb_Helper_abbreviate_dirs
,\
89 echo
"$(call gb_Executable_get_target_for_build,uno)" \
90 "-ro $(OUTDIR)/xml/ure/services.rdb" \
91 "-ro $(OUTDIR)/xml/uno_services.rdb" \
92 "-ro $(OUTDIR)/bin/udkapi.rdb" \
93 "-ro $(WORKDIR)/UnoApiTarget/bridgetest.rdb" \
94 "-s com.sun.star.test.bridge.BridgeTest --" \
95 "-u 'uno:socket$(COMMA)host=127.0.0.1$(COMMA)port=2002;urp;test'" \
97 $(if
$(filter-out WNT
,$(OS
)),chmod
+x
$@
)
99 # vim: set noet sw=4 ts=4: