xref: /trunk/main/solenv/inc/installationtest.mk (revision 31bbceb0f9d64c0c2c3b22a794a1666c1f33396e)
1e3c01311SAndrew Rist#**************************************************************
2cdf0e10cSrcweir#
3e3c01311SAndrew Rist#  Licensed to the Apache Software Foundation (ASF) under one
4e3c01311SAndrew Rist#  or more contributor license agreements.  See the NOTICE file
5e3c01311SAndrew Rist#  distributed with this work for additional information
6e3c01311SAndrew Rist#  regarding copyright ownership.  The ASF licenses this file
7e3c01311SAndrew Rist#  to you under the Apache License, Version 2.0 (the
8e3c01311SAndrew Rist#  "License"); you may not use this file except in compliance
9e3c01311SAndrew Rist#  with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir#
11e3c01311SAndrew Rist#    http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir#
13e3c01311SAndrew Rist#  Unless required by applicable law or agreed to in writing,
14e3c01311SAndrew Rist#  software distributed under the License is distributed on an
15e3c01311SAndrew Rist#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16e3c01311SAndrew Rist#  KIND, either express or implied.  See the License for the
17e3c01311SAndrew Rist#  specific language governing permissions and limitations
18e3c01311SAndrew Rist#  under the License.
19cdf0e10cSrcweir#
20e3c01311SAndrew Rist#**************************************************************
21e3c01311SAndrew Rist
22e3c01311SAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir# relevant for non-product builds only, but built unconditionally
25cdf0e10cSrcweir.IF "$(ABORT_ON_ASSERTION)" != ""
26cdf0e10cSrcweir    DBGSV_ERROR_OUT=abort
27cdf0e10cSrcweir    SAL_DIAGNOSE_ABORT=TRUE
28cdf0e10cSrcweir    .EXPORT: SAL_DIAGNOSE_ABORT
29cdf0e10cSrcweir.ELSE
30cdf0e10cSrcweir    DBGSV_ERROR_OUT=shell
31cdf0e10cSrcweir.ENDIF
32cdf0e10cSrcweir.EXPORT: DBGSV_ERROR_OUT
33cdf0e10cSrcweir
34cdf0e10cSrcweir# don't allow to overwrite DBGSV_ERROR_OUT with an INI file. Otherwise, people
35cdf0e10cSrcweir# might be tempted to put an DBGSV_INIT into their .bash_profile which points to a file
36cdf0e10cSrcweir# delcaring to ignore all assertions completely ...
37cdf0e10cSrcweirDBGSV_INIT=
38cdf0e10cSrcweir.EXPORT: DBGSV_INIT
39cdf0e10cSrcweir
40cdf0e10cSrcweir.IF "$(OS)" == "WNT"
41cdf0e10cSrcweirmy_file = file:///
42cdf0e10cSrcweir.ELSE
43cdf0e10cSrcweirmy_file = file://
44cdf0e10cSrcweir.END
45cdf0e10cSrcweir
46cdf0e10cSrcweir# The following conditional is an approximation of: UPDATER set to YES and
47cdf0e10cSrcweir# SHIPDRIVE set and CWS_WORK_STAMP not set and either SOL_TMP not set or
48cdf0e10cSrcweir# SOLARENV set to a pathname of which SOL_TMP is not a prefix:
49cdf0e10cSrcweir.IF "$(UPDATER)" == "YES" && "$(SHIPDRIVE)" != "" && \
50cdf0e10cSrcweir    "$(CWS_WORK_STAMP)" == "" && "$(SOLARENV:s/$(SOL_TMP)//" == "$(SOLARENV)"
51cdf0e10cSrcweirmy_instsets = $(shell ls -dt \
52dfce871fSDamjan Jovanovic    $(SHIPDRIVE)/$(INPATH)/Apache_OpenOffice/archive/$(WORK_STAMP)_$(LAST_MINOR)_native_packed-*_$(defaultlangiso).$(BUILD))
53cdf0e10cSrcweirinstallationtest_instset = $(my_instsets:1)
54cdf0e10cSrcweir.ELSE
55cdf0e10cSrcweirinstallationtest_instset = \
56dfce871fSDamjan Jovanovic    $(SOLARSRC)/instsetoo_native/$(INPATH)/Apache_OpenOffice/archive/install/$(defaultlangiso)
57cdf0e10cSrcweir.END
58cdf0e10cSrcweir
59cdf0e10cSrcweirinstallationtest_instpath = $(SOLARVERSION)/$(INPATH)/installation$(UPDMINOREXT)
60cdf0e10cSrcweir
61fd6e8d9fSDamjan Jovanovic.IF "$(OS)" == "WNT"
62cdf0e10cSrcweirmy_sofficepath = \
632c0cd9c8SDamjan Jovanovic    $(SOLARSRC)'/instsetoo_native/$(INPATH)/Apache_OpenOffice/installed/install/en-US/Openoffice 4/program/soffice.exe'
64cdf0e10cSrcweir.ELSE
65cdf0e10cSrcweirmy_sofficepath = \
66fd6e8d9fSDamjan Jovanovic    $(SOLARSRC)/instsetoo_native/$(INPATH)/Apache_OpenOffice/installed/install/en-US/openoffice4/program/soffice
67cdf0e10cSrcweir.END
68cdf0e10cSrcweir
69cdf0e10cSrcweir.IF "$(OOO_TEST_SOFFICE)" == ""
70cdf0e10cSrcweirmy_soffice = path:$(my_sofficepath)
71cdf0e10cSrcweir.ELSE
72cdf0e10cSrcweirmy_soffice = '$(OOO_TEST_SOFFICE:s/'/'\''/)'
73cdf0e10cSrcweir.END
74cdf0e10cSrcweir
75cdf0e10cSrcweir.IF "$(OOO_LIBRARY_PATH_VAR)" != ""
76cdf0e10cSrcweirmy_cppenv = \
77cdf0e10cSrcweir    -env:arg-env=$(OOO_LIBRARY_PATH_VAR)"$${{$(OOO_LIBRARY_PATH_VAR)+=$$$(OOO_LIBRARY_PATH_VAR)}}"
78cdf0e10cSrcweirmy_javaenv = \
79cdf0e10cSrcweir    -Dorg.openoffice.test.arg.env=$(OOO_LIBRARY_PATH_VAR)"$${{$(OOO_LIBRARY_PATH_VAR)+=$$$(OOO_LIBRARY_PATH_VAR)}}"
80cdf0e10cSrcweir.END
81cdf0e10cSrcweir
82cdf0e10cSrcweir.IF "$(SOLAR_JAVA)" == "TRUE" && "$(OOO_JUNIT_JAR)" != ""
83eeb47f1eSDamjan Jovanovic.IF "$(HAMCREST_CORE_JAR)" != ""
84eeb47f1eSDamjan Jovanovicjavatest_% .PHONY : $(JAVATARGET)
85eeb47f1eSDamjan Jovanovic    $(COMMAND_ECHO)$(RM) -r $(MISC)/$(TARGET)/user
86eeb47f1eSDamjan Jovanovic    $(COMMAND_ECHO)$(MKDIRHIER) $(MISC)/$(TARGET)/user
87eeb47f1eSDamjan Jovanovic    $(COMMAND_ECHO)$(JAVAI) $(JAVAIFLAGS) $(JAVACPS) \
88eeb47f1eSDamjan Jovanovic        '$(OOO_JUNIT_JAR)$(PATH_SEPERATOR)$(HAMCREST_CORE_JAR)$(PATH_SEPERATOR)$(CLASSPATH)' \
89eeb47f1eSDamjan Jovanovic        -Dorg.openoffice.test.arg.soffice=$(my_soffice) \
90eeb47f1eSDamjan Jovanovic        -Dorg.openoffice.test.arg.user=$(my_file)$(PWD)/$(MISC)/$(TARGET)/user \
91eeb47f1eSDamjan Jovanovic        $(my_javaenv) $(TEST_ARGUMENTS:^"-Dorg.openoffice.test.arg.testarg.") \
92eeb47f1eSDamjan Jovanovic        org.junit.runner.JUnitCore \
93eeb47f1eSDamjan Jovanovic        $(subst,/,. $(PACKAGE)).$(@:s/javatest_//)
94eeb47f1eSDamjan Jovanovic.ELSE
95cdf0e10cSrcweirjavatest_% .PHONY : $(JAVATARGET)
96cdf0e10cSrcweir    $(COMMAND_ECHO)$(RM) -r $(MISC)/$(TARGET)/user
97cdf0e10cSrcweir    $(COMMAND_ECHO)$(MKDIRHIER) $(MISC)/$(TARGET)/user
98cdf0e10cSrcweir    $(COMMAND_ECHO)$(JAVAI) $(JAVAIFLAGS) $(JAVACPS) \
99cdf0e10cSrcweir        '$(OOO_JUNIT_JAR)$(PATH_SEPERATOR)$(CLASSPATH)' \
100cdf0e10cSrcweir        -Dorg.openoffice.test.arg.soffice=$(my_soffice) \
101cdf0e10cSrcweir        -Dorg.openoffice.test.arg.user=$(my_file)$(PWD)/$(MISC)/$(TARGET)/user \
102cdf0e10cSrcweir        $(my_javaenv) $(TEST_ARGUMENTS:^"-Dorg.openoffice.test.arg.testarg.") \
103cdf0e10cSrcweir        org.junit.runner.JUnitCore \
104cdf0e10cSrcweir        $(subst,/,. $(PACKAGE)).$(@:s/javatest_//)
105eeb47f1eSDamjan Jovanovic.END
106cdf0e10cSrcweir    $(RM) -r $(MISC)/$(TARGET)/user
107cdf0e10cSrcweirjavatest .PHONY : $(JAVATARGET)
108cdf0e10cSrcweir    $(COMMAND_ECHO)$(RM) -r $(MISC)/$(TARGET)/user
109cdf0e10cSrcweir    $(COMMAND_ECHO)$(MKDIRHIER) $(MISC)/$(TARGET)/user
110eeb47f1eSDamjan Jovanovic.IF "$(HAMCREST_CORE_JAR)" != ""
111eeb47f1eSDamjan Jovanovic    $(COMMAND_ECHO)$(JAVAI) $(JAVAIFLAGS) $(JAVACPS) \
112eeb47f1eSDamjan Jovanovic        '$(OOO_JUNIT_JAR)$(PATH_SEPERATOR)$(HAMCREST_CORE_JAR)$(PATH_SEPERATOR)$(CLASSPATH)' \
113eeb47f1eSDamjan Jovanovic        -Dorg.openoffice.test.arg.soffice=$(my_soffice) \
114eeb47f1eSDamjan Jovanovic        -Dorg.openoffice.test.arg.user=$(my_file)$(PWD)/$(MISC)/$(TARGET)/user \
115eeb47f1eSDamjan Jovanovic        $(my_javaenv) $(TEST_ARGUMENTS:^"-Dorg.openoffice.test.arg.testarg.") \
116eeb47f1eSDamjan Jovanovic        org.junit.runner.JUnitCore \
117*6181058dSDamjan Jovanovic        $(foreach,i,$(JAVATESTFILES) $(subst,/,. $(PACKAGE)).$(subst,/,. $(i:s/.java//)))
118eeb47f1eSDamjan Jovanovic.ELSE
119cdf0e10cSrcweir    $(COMMAND_ECHO)$(JAVAI) $(JAVAIFLAGS) $(JAVACPS) \
120cdf0e10cSrcweir        '$(OOO_JUNIT_JAR)$(PATH_SEPERATOR)$(CLASSPATH)' \
121cdf0e10cSrcweir        -Dorg.openoffice.test.arg.soffice=$(my_soffice) \
122cdf0e10cSrcweir        -Dorg.openoffice.test.arg.user=$(my_file)$(PWD)/$(MISC)/$(TARGET)/user \
123cdf0e10cSrcweir        $(my_javaenv) $(TEST_ARGUMENTS:^"-Dorg.openoffice.test.arg.testarg.") \
124cdf0e10cSrcweir        org.junit.runner.JUnitCore \
125*6181058dSDamjan Jovanovic        $(foreach,i,$(JAVATESTFILES) $(subst,/,. $(PACKAGE)).$(subst,/,. $(i:s/.java//)))
126eeb47f1eSDamjan Jovanovic.END
127cdf0e10cSrcweir    $(RM) -r $(MISC)/$(TARGET)/user
128cdf0e10cSrcweir.ELSE
129cdf0e10cSrcweirjavatest .PHONY :
130cdf0e10cSrcweir    @echo 'javatest needs SOLAR_JAVA=TRUE and OOO_JUNIT_JAR'
131cdf0e10cSrcweir.END
132