1#************************************************************** 2# 3# Licensed to the Apache Software Foundation (ASF) under one 4# or more contributor license agreements. See the NOTICE file 5# distributed with this work for additional information 6# regarding copyright ownership. The ASF licenses this file 7# to you under the Apache License, Version 2.0 (the 8# "License"); you may not use this file except in compliance 9# with the License. You may obtain a copy of the License at 10# 11# http://www.apache.org/licenses/LICENSE-2.0 12# 13# Unless required by applicable law or agreed to in writing, 14# software distributed under the License is distributed on an 15# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16# KIND, either express or implied. See the License for the 17# specific language governing permissions and limitations 18# under the License. 19# 20#************************************************************** 21 22 23 24# relevant for non-product builds only, but built unconditionally 25.IF "$(ABORT_ON_ASSERTION)" != "" 26 DBGSV_ERROR_OUT=abort 27 SAL_DIAGNOSE_ABORT=TRUE 28 .EXPORT: SAL_DIAGNOSE_ABORT 29.ELSE 30 DBGSV_ERROR_OUT=shell 31.ENDIF 32.EXPORT: DBGSV_ERROR_OUT 33 34# don't allow to overwrite DBGSV_ERROR_OUT with an INI file. Otherwise, people 35# might be tempted to put an DBGSV_INIT into their .bash_profile which points to a file 36# delcaring to ignore all assertions completely ... 37DBGSV_INIT= 38.EXPORT: DBGSV_INIT 39 40.IF "$(OS)" == "WNT" 41my_file = file:/// 42.ELSE 43my_file = file:// 44.END 45 46# The following conditional is an approximation of: UPDATER set to YES and 47# SHIPDRIVE set and CWS_WORK_STAMP not set and either SOL_TMP not set or 48# SOLARENV set to a pathname of which SOL_TMP is not a prefix: 49.IF "$(UPDATER)" == "YES" && "$(SHIPDRIVE)" != "" && \ 50 "$(CWS_WORK_STAMP)" == "" && "$(SOLARENV:s/$(SOL_TMP)//" == "$(SOLARENV)" 51my_instsets = $(shell ls -dt \ 52 $(SHIPDRIVE)/$(INPATH)/Apache_OpenOffice/archive/$(WORK_STAMP)_$(LAST_MINOR)_native_packed-*_$(defaultlangiso).$(BUILD)) 53installationtest_instset = $(my_instsets:1) 54.ELSE 55installationtest_instset = \ 56 $(SOLARSRC)/instsetoo_native/$(INPATH)/Apache_OpenOffice/archive/install/$(defaultlangiso) 57.END 58 59.IF "$(OS)" == "WNT" 60installationtest_instpath = `cat $(MISC)/$(TARGET)/installation.flag` 61.ELSE 62installationtest_instpath = $(SOLARVERSION)/$(INPATH)/installation$(UPDMINOREXT) 63.END 64 65.IF "$(OS)" == "WNT" 66my_sofficepath = \ 67 $(SOLARSRC)'/instsetoo_native/$(INPATH)/Apache_OpenOffice/installed/install/en-US/Openoffice 4/program/soffice.exe' 68.ELSE 69my_sofficepath = \ 70 $(SOLARSRC)/instsetoo_native/$(INPATH)/Apache_OpenOffice/installed/install/en-US/openoffice4/program/soffice 71.END 72 73.IF "$(OOO_TEST_SOFFICE)" == "" 74my_soffice = path:$(my_sofficepath) 75.ELSE 76my_soffice = '$(OOO_TEST_SOFFICE:s/'/'\''/)' 77.END 78 79.IF "$(OOO_LIBRARY_PATH_VAR)" != "" 80my_cppenv = \ 81 -env:arg-env=$(OOO_LIBRARY_PATH_VAR)"$${{$(OOO_LIBRARY_PATH_VAR)+=$$$(OOO_LIBRARY_PATH_VAR)}}" 82my_javaenv = \ 83 -Dorg.openoffice.test.arg.env=$(OOO_LIBRARY_PATH_VAR)"$${{$(OOO_LIBRARY_PATH_VAR)+=$$$(OOO_LIBRARY_PATH_VAR)}}" 84.END 85 86# Work around Windows problems with long pathnames (see issue 50885) by 87# installing into the temp directory instead of the module output tree (in which 88# case $(TARGET).installation.flag contains the path to the temp installation, 89# which is removed after smoketest); can be removed once issue 50885 is fixed; 90# on other platforms, a single installation to solver is created in 91# smoketestoo_native: 92.IF "$(OS)" == "WNT" && "$(OOO_TEST_SOFFICE)" == "" 93OOO_EXTRACT_TO:=$(shell cygpath -m `mktemp -dt ooosmoke.XXXXXX`) 94$(MISC)/$(TARGET)/installation.flag : $(shell \ 95 ls $(installationtest_instset)/Apache_OpenOffice_*_install-arc_$(defaultlangiso).zip) 96 $(COMMAND_ECHO)$(MKDIRHIER) $(@:d) 97 $(COMMAND_ECHO)unzip -q $(installationtest_instset)/Apache_OpenOffice_*_install-arc_$(defaultlangiso).zip -d "$(OOO_EXTRACT_TO)" 98 $(COMMAND_ECHO)mv "$(OOO_EXTRACT_TO)"/Apache_OpenOffice_*_install-arc_$(defaultlangiso) "$(OOO_EXTRACT_TO)"/opt 99 $(COMMAND_ECHO)echo "$(OOO_EXTRACT_TO)" > $@ 100.END 101 102.IF "$(SOLAR_JAVA)" == "TRUE" && "$(OOO_JUNIT_JAR)" != "" 103.IF "$(HAMCREST_CORE_JAR)" != "" 104javatest_% .PHONY : $(JAVATARGET) 105 $(COMMAND_ECHO)$(RM) -r $(MISC)/$(TARGET)/user 106 $(COMMAND_ECHO)$(MKDIRHIER) $(MISC)/$(TARGET)/user 107 $(COMMAND_ECHO)$(JAVAI) $(JAVAIFLAGS) $(JAVACPS) \ 108 '$(OOO_JUNIT_JAR)$(PATH_SEPERATOR)$(HAMCREST_CORE_JAR)$(PATH_SEPERATOR)$(CLASSPATH)' \ 109 -Dorg.openoffice.test.arg.soffice=$(my_soffice) \ 110 -Dorg.openoffice.test.arg.user=$(my_file)$(PWD)/$(MISC)/$(TARGET)/user \ 111 $(my_javaenv) $(TEST_ARGUMENTS:^"-Dorg.openoffice.test.arg.testarg.") \ 112 org.junit.runner.JUnitCore \ 113 $(subst,/,. $(PACKAGE)).$(@:s/javatest_//) 114.ELSE 115javatest_% .PHONY : $(JAVATARGET) 116 $(COMMAND_ECHO)$(RM) -r $(MISC)/$(TARGET)/user 117 $(COMMAND_ECHO)$(MKDIRHIER) $(MISC)/$(TARGET)/user 118 $(COMMAND_ECHO)$(JAVAI) $(JAVAIFLAGS) $(JAVACPS) \ 119 '$(OOO_JUNIT_JAR)$(PATH_SEPERATOR)$(CLASSPATH)' \ 120 -Dorg.openoffice.test.arg.soffice=$(my_soffice) \ 121 -Dorg.openoffice.test.arg.user=$(my_file)$(PWD)/$(MISC)/$(TARGET)/user \ 122 $(my_javaenv) $(TEST_ARGUMENTS:^"-Dorg.openoffice.test.arg.testarg.") \ 123 org.junit.runner.JUnitCore \ 124 $(subst,/,. $(PACKAGE)).$(@:s/javatest_//) 125.END 126 $(RM) -r $(MISC)/$(TARGET)/user 127.IF "$(OS)" == "WNT" && "$(OOO_TEST_SOFFICE)" == "" 128 $(RM) -r $(installationtest_instpath) $(MISC)/$(TARGET)/installation.flag 129javatest : $(MISC)/$(TARGET)/installation.flag 130.END 131javatest .PHONY : $(JAVATARGET) 132 $(COMMAND_ECHO)$(RM) -r $(MISC)/$(TARGET)/user 133 $(COMMAND_ECHO)$(MKDIRHIER) $(MISC)/$(TARGET)/user 134.IF "$(HAMCREST_CORE_JAR)" != "" 135 $(COMMAND_ECHO)$(JAVAI) $(JAVAIFLAGS) $(JAVACPS) \ 136 '$(OOO_JUNIT_JAR)$(PATH_SEPERATOR)$(HAMCREST_CORE_JAR)$(PATH_SEPERATOR)$(CLASSPATH)' \ 137 -Dorg.openoffice.test.arg.soffice=$(my_soffice) \ 138 -Dorg.openoffice.test.arg.user=$(my_file)$(PWD)/$(MISC)/$(TARGET)/user \ 139 $(my_javaenv) $(TEST_ARGUMENTS:^"-Dorg.openoffice.test.arg.testarg.") \ 140 org.junit.runner.JUnitCore \ 141 $(foreach,i,$(JAVATESTFILES) $(subst,/,. $(PACKAGE)).$(i:s/.java//)) 142.ELSE 143 $(COMMAND_ECHO)$(JAVAI) $(JAVAIFLAGS) $(JAVACPS) \ 144 '$(OOO_JUNIT_JAR)$(PATH_SEPERATOR)$(CLASSPATH)' \ 145 -Dorg.openoffice.test.arg.soffice=$(my_soffice) \ 146 -Dorg.openoffice.test.arg.user=$(my_file)$(PWD)/$(MISC)/$(TARGET)/user \ 147 $(my_javaenv) $(TEST_ARGUMENTS:^"-Dorg.openoffice.test.arg.testarg.") \ 148 org.junit.runner.JUnitCore \ 149 $(foreach,i,$(JAVATESTFILES) $(subst,/,. $(PACKAGE)).$(i:s/.java//)) 150.END 151 $(RM) -r $(MISC)/$(TARGET)/user 152.IF "$(OS)" == "WNT" && "$(OOO_TEST_SOFFICE)" == "" 153 $(RM) -r $(installationtest_instpath) $(MISC)/$(TARGET)/installation.flag 154javatest : $(MISC)/$(TARGET)/installation.flag 155.END 156.ELSE 157javatest .PHONY : 158 @echo 'javatest needs SOLAR_JAVA=TRUE and OOO_JUNIT_JAR' 159.END 160