1e3c01311SAndrew Rist#************************************************************** 2e3c01311SAndrew Rist# 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 10e3c01311SAndrew Rist# 11e3c01311SAndrew Rist# http://www.apache.org/licenses/LICENSE-2.0 12e3c01311SAndrew Rist# 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. 19e3c01311SAndrew Rist# 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 \ 52cdf0e10cSrcweir $(SHIPDRIVE)/$(INPATH)/OpenOffice/archive/$(WORK_STAMP)_$(LAST_MINOR)_native_packed-*_$(defaultlangiso).$(BUILD)) 53cdf0e10cSrcweirinstallationtest_instset = $(my_instsets:1) 54cdf0e10cSrcweir.ELSE 55cdf0e10cSrcweirinstallationtest_instset = \ 56cdf0e10cSrcweir $(SOLARSRC)/instsetoo_native/$(INPATH)/OpenOffice/archive/install/$(defaultlangiso) 57cdf0e10cSrcweir.END 58cdf0e10cSrcweir 59cdf0e10cSrcweir.IF "$(OS)" == "WNT" 60cdf0e10cSrcweirinstallationtest_instpath = `cat $(MISC)/$(TARGET)/installation.flag` 61cdf0e10cSrcweir.ELSE 62cdf0e10cSrcweirinstallationtest_instpath = $(SOLARVERSION)/$(INPATH)/installation$(UPDMINOREXT) 63cdf0e10cSrcweir.END 64cdf0e10cSrcweir 65cdf0e10cSrcweir.IF "$(OS)" == "MACOSX" 66cdf0e10cSrcweirmy_sofficepath = \ 67cdf0e10cSrcweir $(installationtest_instpath)/opt/OpenOffice.org.app/Contents/MacOS/soffice 68cdf0e10cSrcweir.ELIF "$(OS)" == "WNT" 69cdf0e10cSrcweirmy_sofficepath = \ 70cdf0e10cSrcweir $(installationtest_instpath)'/opt/OpenOffice.org 3/program/soffice.exe' 71cdf0e10cSrcweir.ELSE 72cdf0e10cSrcweirmy_sofficepath = \ 73cdf0e10cSrcweir $(installationtest_instpath)/opt/openoffice.org3/program/soffice 74cdf0e10cSrcweir.END 75cdf0e10cSrcweir 76cdf0e10cSrcweir.IF "$(OOO_TEST_SOFFICE)" == "" 77cdf0e10cSrcweirmy_soffice = path:$(my_sofficepath) 78cdf0e10cSrcweir.ELSE 79cdf0e10cSrcweirmy_soffice = '$(OOO_TEST_SOFFICE:s/'/'\''/)' 80cdf0e10cSrcweir.END 81cdf0e10cSrcweir 82cdf0e10cSrcweir.IF "$(OOO_LIBRARY_PATH_VAR)" != "" 83cdf0e10cSrcweirmy_cppenv = \ 84cdf0e10cSrcweir -env:arg-env=$(OOO_LIBRARY_PATH_VAR)"$${{$(OOO_LIBRARY_PATH_VAR)+=$$$(OOO_LIBRARY_PATH_VAR)}}" 85cdf0e10cSrcweirmy_javaenv = \ 86cdf0e10cSrcweir -Dorg.openoffice.test.arg.env=$(OOO_LIBRARY_PATH_VAR)"$${{$(OOO_LIBRARY_PATH_VAR)+=$$$(OOO_LIBRARY_PATH_VAR)}}" 87cdf0e10cSrcweir.END 88cdf0e10cSrcweir 89cdf0e10cSrcweir# Work around Windows problems with long pathnames (see issue 50885) by 90cdf0e10cSrcweir# installing into the temp directory instead of the module output tree (in which 91cdf0e10cSrcweir# case $(TARGET).installation.flag contains the path to the temp installation, 92cdf0e10cSrcweir# which is removed after smoketest); can be removed once issue 50885 is fixed; 93cdf0e10cSrcweir# on other platforms, a single installation to solver is created in 94cdf0e10cSrcweir# smoketestoo_native: 95cdf0e10cSrcweir.IF "$(OS)" == "WNT" && "$(OOO_TEST_SOFFICE)" == "" 96cdf0e10cSrcweirOOO_EXTRACT_TO:=$(shell cygpath -m `mktemp -dt ooosmoke.XXXXXX`) 97cdf0e10cSrcweir$(MISC)/$(TARGET)/installation.flag : $(shell \ 98*f4026d8cSLei De Bin ls $(installationtest_instset)/Apache_OpenOffice_*_install-arc_$(defaultlangiso).zip) 99cdf0e10cSrcweir $(COMMAND_ECHO)$(MKDIRHIER) $(@:d) 100*f4026d8cSLei De Bin $(COMMAND_ECHO)unzip -q $(installationtest_instset)/Apache_OpenOffice_*_install-arc_$(defaultlangiso).zip -d "$(OOO_EXTRACT_TO)" 101*f4026d8cSLei De Bin $(COMMAND_ECHO)mv "$(OOO_EXTRACT_TO)"/Apache_OpenOffice_*_install-arc_$(defaultlangiso) "$(OOO_EXTRACT_TO)"/opt 102cdf0e10cSrcweir $(COMMAND_ECHO)echo "$(OOO_EXTRACT_TO)" > $@ 103cdf0e10cSrcweir.END 104cdf0e10cSrcweir 105cdf0e10cSrcweircpptest .PHONY : 106cdf0e10cSrcweir $(COMMAND_ECHO)$(RM) -r $(MISC)/$(TARGET)/user 107cdf0e10cSrcweir $(COMMAND_ECHO)$(MKDIRHIER) $(MISC)/$(TARGET)/user 108cdf0e10cSrcweir $(CPPUNITTESTER) \ 109cdf0e10cSrcweir -env:UNO_SERVICES=$(my_file)$(SOLARXMLDIR)/ure/services.rdb \ 110cdf0e10cSrcweir -env:UNO_TYPES=$(my_file)$(SOLARBINDIR)/types.rdb \ 111cdf0e10cSrcweir -env:arg-soffice=$(my_soffice) -env:arg-user=$(MISC)/$(TARGET)/user \ 112cdf0e10cSrcweir $(my_cppenv) $(TEST_ARGUMENTS:^"-env:arg-testarg.") --protector \ 113cdf0e10cSrcweir $(SOLARSHAREDBIN)/unoexceptionprotector$(DLLPOST) \ 114cdf0e10cSrcweir unoexceptionprotector $(CPPTEST_LIBRARY) 115cdf0e10cSrcweir# As a workaround for #i111400#, ignore failure of $(RM): 116cdf0e10cSrcweir $(COMMAND_ECHO)- $(RM) -r $(MISC)/$(TARGET)/user 117cdf0e10cSrcweir.IF "$(OS)" == "WNT" && "$(OOO_TEST_SOFFICE)" == "" 118cdf0e10cSrcweir $(COMMAND_ECHO)$(RM) -r $(installationtest_instpath) $(MISC)/$(TARGET)/installation.flag 119cdf0e10cSrcweircpptest : $(MISC)/$(TARGET)/installation.flag 120cdf0e10cSrcweir.END 121cdf0e10cSrcweir 122cdf0e10cSrcweir.IF "$(SOLAR_JAVA)" == "TRUE" && "$(OOO_JUNIT_JAR)" != "" 123cdf0e10cSrcweirjavatest_% .PHONY : $(JAVATARGET) 124cdf0e10cSrcweir $(COMMAND_ECHO)$(RM) -r $(MISC)/$(TARGET)/user 125cdf0e10cSrcweir $(COMMAND_ECHO)$(MKDIRHIER) $(MISC)/$(TARGET)/user 126cdf0e10cSrcweir $(COMMAND_ECHO)$(JAVAI) $(JAVAIFLAGS) $(JAVACPS) \ 127cdf0e10cSrcweir '$(OOO_JUNIT_JAR)$(PATH_SEPERATOR)$(CLASSPATH)' \ 128cdf0e10cSrcweir -Dorg.openoffice.test.arg.soffice=$(my_soffice) \ 129cdf0e10cSrcweir -Dorg.openoffice.test.arg.user=$(my_file)$(PWD)/$(MISC)/$(TARGET)/user \ 130cdf0e10cSrcweir $(my_javaenv) $(TEST_ARGUMENTS:^"-Dorg.openoffice.test.arg.testarg.") \ 131cdf0e10cSrcweir org.junit.runner.JUnitCore \ 132cdf0e10cSrcweir $(subst,/,. $(PACKAGE)).$(@:s/javatest_//) 133cdf0e10cSrcweir $(RM) -r $(MISC)/$(TARGET)/user 134cdf0e10cSrcweir.IF "$(OS)" == "WNT" && "$(OOO_TEST_SOFFICE)" == "" 135cdf0e10cSrcweir $(RM) -r $(installationtest_instpath) $(MISC)/$(TARGET)/installation.flag 136cdf0e10cSrcweirjavatest : $(MISC)/$(TARGET)/installation.flag 137cdf0e10cSrcweir.END 138cdf0e10cSrcweirjavatest .PHONY : $(JAVATARGET) 139cdf0e10cSrcweir $(COMMAND_ECHO)$(RM) -r $(MISC)/$(TARGET)/user 140cdf0e10cSrcweir $(COMMAND_ECHO)$(MKDIRHIER) $(MISC)/$(TARGET)/user 141cdf0e10cSrcweir $(COMMAND_ECHO)$(JAVAI) $(JAVAIFLAGS) $(JAVACPS) \ 142cdf0e10cSrcweir '$(OOO_JUNIT_JAR)$(PATH_SEPERATOR)$(CLASSPATH)' \ 143cdf0e10cSrcweir -Dorg.openoffice.test.arg.soffice=$(my_soffice) \ 144cdf0e10cSrcweir -Dorg.openoffice.test.arg.user=$(my_file)$(PWD)/$(MISC)/$(TARGET)/user \ 145cdf0e10cSrcweir $(my_javaenv) $(TEST_ARGUMENTS:^"-Dorg.openoffice.test.arg.testarg.") \ 146cdf0e10cSrcweir org.junit.runner.JUnitCore \ 147cdf0e10cSrcweir $(foreach,i,$(JAVATESTFILES) $(subst,/,. $(PACKAGE)).$(i:s/.java//)) 148cdf0e10cSrcweir $(RM) -r $(MISC)/$(TARGET)/user 149cdf0e10cSrcweir.IF "$(OS)" == "WNT" && "$(OOO_TEST_SOFFICE)" == "" 150cdf0e10cSrcweir $(RM) -r $(installationtest_instpath) $(MISC)/$(TARGET)/installation.flag 151cdf0e10cSrcweirjavatest : $(MISC)/$(TARGET)/installation.flag 152cdf0e10cSrcweir.END 153cdf0e10cSrcweir.ELSE 154cdf0e10cSrcweirjavatest .PHONY : 155cdf0e10cSrcweir @echo 'javatest needs SOLAR_JAVA=TRUE and OOO_JUNIT_JAR' 156cdf0e10cSrcweir.END 157