1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 # Copyright 2008 by Sun Microsystems, Inc.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # $RCSfile: cppunit.mk,v $
13 # This file is part of OpenOffice.org.
15 # OpenOffice.org is free software: you can redistribute it and/or modify
16 # it under the terms of the GNU Lesser General Public License version 3
17 # only, as published by the Free Software Foundation.
19 # OpenOffice.org is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU Lesser General Public License version 3 for more details
23 # (a copy is included in the LICENSE file that accompanied this code).
25 # You should have received a copy of the GNU Lesser General Public License
26 # version 3 along with OpenOffice.org. If not, see
27 # <http://www.openoffice.org/license.html>
28 # for a copy of the LGPLv3 License.
30 #*************************************************************************
32 # Helper makefile additional, to support
34 # for testshl2 (cppunit testing)
35 # for simple start all generated libraries:
39 # or dmake test1 test2
41 # for library 2 with additional options to the testshl2
42 # dmake test2 TESTOPT="-dntsf"
44 # This file have to be unroll by
45 # cat cppunit.mk | mkunroll >_cppunit.mk
46 # all between begin and end will repeat n times (at the moment n=10) to create such iterations
47 # $(TNR) is the number
48 # $(SHL$(TNR)TARGETN) is the same like $(OUT)/bin/$(SHL1TARGET) for every number, within unix, "bin" is replaced by "lib"
51 # TESTOPT="-onlyerrors"
54 ################################################################################
56 # ---- create the test libraries ------------------------------------
58 TEST
$(TNR
)LIB
=$(SHL
$(TNR
)TARGETN
)
60 TEST
$(TNR
)OPT
="-jobexclude"
61 TEST
$(TNR
)OPT
+=$(SHL
$(TNR
)TARGET
).xsce
63 TEST
$(TNR
)OPT
+=$(mktmp
"foo")
64 TEST
$(TNR
)OPT
+="-onlyerrors"
66 TEST
$(TNR
)OPT
+=$(TESTOPTADD
)
68 TEST
$(TNR
)OPT
=$(TESTOPT
)
71 .IF
"$(SHL$(TNR)TARGET)"!=""
74 @echo
----------------------------------------------------------
75 @echo
- start unit
test \
#$(TNR) on library $(TEST$(TNR)LIB)
76 @echo
----------------------------------------------------------
77 .IF
"$(OS)" == "LINUX" # full path needed by osl_getModuleURLFromAddress:
78 `which testshl2` $(TEST
$(TNR
)LIB
) $(TEST
$(TNR
)OPT
)
80 testshl2
$(TEST
$(TNR
)LIB
) $(TEST
$(TNR
)OPT
)