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 24PRJ=..$/..$/.. 25PRJNAME=sdext 26TARGET=tests 27TARGETTYPE=CUI 28ENABLE_EXCEPTIONS=TRUE 29 30# --- Settings ----------------------------------------------------- 31 32.INCLUDE: settings.mk 33 34.IF "$(ENABLE_UNIT_TESTS)" != "YES" 35all: 36 @echo unit tests are disabled. Nothing to do. 37 38.ELSE 39 40# --- test lib ------------------------------------------------------ 41 42.IF "$(ENABLE_PDFIMPORT)" == "NO" 43@all: 44 @echo "PDF Import extension disabled." 45.ENDIF 46 47.IF "$(SYSTEM_ZLIB)" == "YES" 48CFLAGS+=-DSYSTEM_ZLIB 49.ENDIF 50 51APP1OBJS= \ 52 $(SLO)$/tests.obj 53 54APP1LIBS=\ 55 $(SLB)$/pdfmisc.lib \ 56 $(SLB)$/pdfparse.lib \ 57 $(SLB)$/pdfsax.lib \ 58 $(SLB)$/pdfparsetree.lib \ 59 $(SLB)$/pdfodf.lib \ 60 $(SLB)$/xpdfwrapper.lib \ 61 $(SLB)$/pdfimport.lib 62 63APP1TARGET=$(TARGET) 64APP1STDLIBS=\ 65 $(BASEGFXLIB) \ 66 $(UNOTOOLSLIB) \ 67 $(CANVASTOOLSLIB) \ 68 $(COMPHELPERLIB) \ 69 $(CPPUHELPERLIB) \ 70 $(GTESTLIB) \ 71 $(TESTSHL2LIB) \ 72 $(ZLIB3RDLIB) \ 73 $(CPPULIB) \ 74 $(SALLIB) 75 76 77APP1RPATH = NONE 78# Run explicitly below: 79APP1TEST = disabled 80 81# --- pdf2xml binary ------------------------------------------------------ 82 83TARGET2=pdf2xml 84 85APP2TARGET=$(TARGET2) 86APP2LIBSALCPPRT= 87APP2OBJS=$(SLO)$/pdf2xml.obj 88 89APP2LIBS=\ 90 $(SLB)$/pdfmisc.lib \ 91 $(SLB)$/pdfparse.lib \ 92 $(SLB)$/pdfsax.lib \ 93 $(SLB)$/pdfparsetree.lib \ 94 $(SLB)$/pdfodf.lib \ 95 $(SLB)$/xpdfwrapper.lib \ 96 $(SLB)$/pdfimport.lib 97 98APP2STDLIBS=\ 99 $(BASEGFXLIB) \ 100 $(UNOTOOLSLIB) \ 101 $(CANVASTOOLSLIB) \ 102 $(COMPHELPERLIB) \ 103 $(CPPUHELPERLIB) \ 104 $(GTESTLIB) \ 105 $(TESTSHL2LIB) \ 106 $(ZLIB3RDLIB) \ 107 $(CPPULIB) \ 108 $(SALLIB) 109 110# --- pdfunzip binary ------------------------------------------------------ 111 112TARGET3=pdfunzip 113 114APP3TARGET=$(TARGET3) 115APP3LIBSALCPPRT= 116APP3OBJS=$(SLO)$/pdfunzip.obj 117 118APP3LIBS=\ 119 $(SLB)$/pdfmisc.lib \ 120 $(SLB)$/pdfparse.lib \ 121 $(SLB)$/pdfsax.lib \ 122 $(SLB)$/pdfparsetree.lib \ 123 $(SLB)$/pdfodf.lib \ 124 $(SLB)$/xpdfwrapper.lib \ 125 $(SLB)$/pdfimport.lib 126 127APP3STDLIBS=\ 128 $(BASEGFXLIB) \ 129 $(UNOTOOLSLIB) \ 130 $(CANVASTOOLSLIB) \ 131 $(COMPHELPERLIB) \ 132 $(CPPUHELPERLIB) \ 133 $(GTESTLIB) \ 134 $(TESTSHL2LIB) \ 135 $(ZLIB3RDLIB) \ 136 $(CPPULIB) \ 137 $(SALLIB) 138 139# --- Targets ------------------------------------------------------ 140 141 .INCLUDE : target.mk 142 143# --- Fake uno bootstrap & copy testfile ------------------------ 144 145$(BIN)$/pdfi_unittest_test.pdf : testinput.pdf 146 rm -f $@ 147 $(GNUCOPY) testinput.pdf $@ 148 149$(BIN)$/pdfi_unittest_test.ini : makefile.mk 150 rm -f $@ 151 @echo UNO_SERVICES= > $@ 152 @echo UNO_TYPES=$(UNOUCRRDB:s/\/\\/) >> $@ 153 154# --- Enable testshl2 execution in normal build ------------------------ 155 156$(MISC)$/pdfi_unittest_succeeded : $(APP1TARGETN) $(BIN)$/pdfi_unittest_test.pdf $(BIN)$/pdfi_unittest_test.ini 157 rm -f $(BIN)$/pdfi_unittest_draw.xml 158 rm -f $(BIN)$/pdfi_unittest_writer.xml 159 @echo ---------------------------------------------------------- 160 @echo - start unit test on $(APP1TARGETN) 161 @echo ---------------------------------------------------------- 162 $(COMMAND_ECHO) $(AUGMENT_LIBRARY_PATH_LOCAL) TESTS_FORWARD_STRING=$(BIN)$/ \ 163 $(APP1TARGETN) --gtest_output="xml:$(BIN)/$(APP1TARGET)_result.xml" 164 $(TOUCH) $@ 165 166ALLTAR : $(MISC)$/pdfi_unittest_succeeded 167 168.ENDIF # "$(ENABLE_UNIT_TESTS)" != "YES" 169