unoxml/test/domtest.cxx | 182 ++++++++++++++-------------------- unoxml/test/makefile.mk | 43 ++++---- xmlsecurity/qa/certext/SanCertExt.cxx | 93 +++++------------ xmlsecurity/qa/certext/export.map | 30 ----- xmlsecurity/qa/certext/makefile.mk | 31 ++--- 5 files changed, 141 insertions(+), 238 deletions(-)
New commits: commit f37e5c0cbd3fd6f2d3e9be00f568a06210c116db Author: Damjan Jovanovic <dam...@apache.org> Date: Wed Oct 14 18:02:32 2015 +0000 #i125003# migrate main/uno/test from cppunit to Google Test. Doesn't link due to missing static libraries (pre-gbuild migration era?) but isn't run during the buid. diff --git a/unoxml/test/domtest.cxx b/unoxml/test/domtest.cxx index dcd4668..52c6b90 100644 --- a/unoxml/test/domtest.cxx +++ b/unoxml/test/domtest.cxx @@ -23,7 +23,7 @@ // autogenerated file with codegen.pl -#include <testshl/simpleheader.hxx> +#include "gtest/gtest.h" #include <rtl/ref.hxx> #include <osl/file.hxx> @@ -38,6 +38,8 @@ #include <com/sun/star/xml/sax/XSAXSerializable.hpp> #include <com/sun/star/xml/sax/XFastSAXSerializable.hpp> +#include <cstdlib> + #include "../source/dom/documentbuilder.hxx" @@ -173,15 +175,13 @@ struct TokenHandler { virtual ::sal_Int32 SAL_CALL getToken( const ::rtl::OUString& Identifier ) throw (uno::RuntimeException) { - CPPUNIT_ASSERT_MESSAGE( "TokenHandler::getToken() unexpected call", - false ); + EXPECT_TRUE( false ) << "TokenHandler::getToken() unexpected call"; return -1; } virtual ::rtl::OUString SAL_CALL getIdentifier( ::sal_Int32 Token ) throw (uno::RuntimeException) { - CPPUNIT_ASSERT_MESSAGE( "TokenHandler::getIdentifier() unexpected call", - false ); + EXPECT_TRUE( false ) << "TokenHandler::getIdentifier() unexpected call"; return rtl::OUString(); } @@ -193,13 +193,12 @@ struct TokenHandler virtual uno::Sequence< ::sal_Int8 > SAL_CALL getUTF8Identifier( ::sal_Int32 Token ) throw (uno::RuntimeException) { - CPPUNIT_ASSERT_MESSAGE( "TokenHandler::getUTF8Identifier() unexpected call", - false ); + EXPECT_TRUE( false) << "TokenHandler::getUTF8Identifier() unexpected call"; return uno::Sequence<sal_Int8>(); } }; -struct BasicTest : public CppUnit::TestFixture +struct BasicTest : public ::testing::Test { rtl::Reference<CDocumentBuilder> mxDomBuilder; rtl::Reference<ErrorHandler> mxErrHandler; @@ -208,7 +207,7 @@ struct BasicTest : public CppUnit::TestFixture rtl::Reference<SequenceInputStream> mxErrorInStream; rtl::Reference<SequenceInputStream> mxFatalInStream; - void setUp() + void SetUp() { // luckily, DOM builder doesn't use service fac, so we need // not bootstrap uno here @@ -224,59 +223,45 @@ struct BasicTest : public CppUnit::TestFixture sizeof(fatalTestFile)/sizeof(*fatalTestFile))) ); mxDomBuilder->setErrorHandler(mxErrHandler.get()); } +}; - void validInputTest() - { - CPPUNIT_ASSERT_MESSAGE( "Valid input file did not result in XDocument #1", - mxDomBuilder->parse( - uno::Reference<io::XInputStream>( - mxValidInStream.get())).is() ); - CPPUNIT_ASSERT_MESSAGE( "Valid input file resulted in parse errors", - mxErrHandler->noErrors() ); - } +TEST_F(BasicTest, validInputTest) +{ + ASSERT_TRUE( mxDomBuilder->parse( + uno::Reference<io::XInputStream>( + mxValidInStream.get())).is() ) << "Valid input file did not result in XDocument #1"; + ASSERT_TRUE( mxErrHandler->noErrors() ) << "Valid input file resulted in parse errors"; +} - void warningInputTest() - { - CPPUNIT_ASSERT_MESSAGE( "Valid input file did not result in XDocument #2", - mxDomBuilder->parse( - uno::Reference<io::XInputStream>( - mxWarningInStream.get())).is() ); - CPPUNIT_ASSERT_MESSAGE( "No parse warnings in unclean input file", - mxErrHandler->mnWarnCount && !mxErrHandler->mnErrCount && !mxErrHandler->mnFatalCount ); - } +TEST_F(BasicTest, warningInputTest) +{ + ASSERT_TRUE( mxDomBuilder->parse( + uno::Reference<io::XInputStream>( + mxWarningInStream.get())).is() ) << "Valid input file did not result in XDocument #2"; + ASSERT_TRUE( mxErrHandler->mnWarnCount && !mxErrHandler->mnErrCount && !mxErrHandler->mnFatalCount ) + << "No parse warnings in unclean input file"; +} - void errorInputTest() - { - CPPUNIT_ASSERT_MESSAGE( "Valid input file did not result in XDocument #3", - mxDomBuilder->parse( - uno::Reference<io::XInputStream>( - mxErrorInStream.get())).is() ); - CPPUNIT_ASSERT_MESSAGE( "No parse errors in unclean input file", - !mxErrHandler->mnWarnCount && mxErrHandler->mnErrCount && !mxErrHandler->mnFatalCount ); - } +TEST_F(BasicTest, errorInputTest) +{ + ASSERT_TRUE( mxDomBuilder->parse( + uno::Reference<io::XInputStream>( + mxErrorInStream.get())).is() ) << "Valid input file did not result in XDocument #3"; + ASSERT_TRUE( !mxErrHandler->mnWarnCount && mxErrHandler->mnErrCount && !mxErrHandler->mnFatalCount ) + << "No parse errors in unclean input file"; +} - void fatalInputTest() - { - CPPUNIT_ASSERT_MESSAGE( "Broken input file resulted in XDocument", - !mxDomBuilder->parse( - uno::Reference<io::XInputStream>( - mxFatalInStream.get())).is() ); - CPPUNIT_ASSERT_MESSAGE( "No fatal parse errors in unclean input file", - !mxErrHandler->mnWarnCount && !mxErrHandler->mnErrCount && mxErrHandler->mnFatalCount ); - }; - - // Change the following lines only, if you add, remove or rename - // member functions of the current class, - // because these macros are need by auto register mechanism. - CPPUNIT_TEST_SUITE(BasicTest); - CPPUNIT_TEST(validInputTest); - CPPUNIT_TEST(warningInputTest); - CPPUNIT_TEST(errorInputTest); - CPPUNIT_TEST(fatalInputTest); - CPPUNIT_TEST_SUITE_END(); +TEST_F(BasicTest, fatalInputTest) +{ + ASSERT_TRUE( !mxDomBuilder->parse( + uno::Reference<io::XInputStream>( + mxFatalInStream.get())).is() ) << "Broken input file resulted in XDocument"; + ASSERT_TRUE( !mxErrHandler->mnWarnCount && !mxErrHandler->mnErrCount && mxErrHandler->mnFatalCount ) + << "No fatal parse errors in unclean input file"; }; -struct SerializerTest : public CppUnit::TestFixture + +struct SerializerTest : public ::testing::Test { SerializerTest() : mbUnoInitialized(false) {} @@ -289,13 +274,13 @@ struct SerializerTest : public CppUnit::TestFixture uno::Sequence< beans::Pair< rtl::OUString, sal_Int32 > > maRegisteredNamespaces; bool mbUnoInitialized; - void setUp() + void SetUp() { // need working typelib, bootstrap UNO now if( !mbUnoInitialized ) { - const char* pArgs( getForwardString() ); - CPPUNIT_ASSERT_MESSAGE("Test file parameter", pArgs); + const char* pArgs( getenv("UNOXML_DOMTEST_FORWARD") ); + ASSERT_TRUE(pArgs) << "Test file parameter"; const rtl::OUString sBaseDir=rtl::OUString::createFromAscii(pArgs); @@ -303,18 +288,17 @@ struct SerializerTest : public CppUnit::TestFixture try { ::rtl::OUString aIniUrl; - CPPUNIT_ASSERT_MESSAGE( - "Converting ini file to URL", + ASSERT_TRUE( osl_getFileURLFromSystemPath( (sBaseDir+rtl::OUString::createFromAscii("unoxml_unittest_test.ini")).pData, - &aIniUrl.pData ) == osl_File_E_None ); + &aIniUrl.pData ) == osl_File_E_None ) << "Converting ini file to URL"; mxCtx = ::cppu::defaultBootstrap_InitialComponentContext(aIniUrl); - CPPUNIT_ASSERT_MESSAGE("Getting component context", mxCtx.is()); + ASSERT_TRUE(mxCtx.is()) << "Getting component context"; } catch( uno::Exception& ) { - CPPUNIT_ASSERT_MESSAGE("Bootstrapping UNO", false); + ASSERT_TRUE(false) << "Bootstrapping UNO"; } mbUnoInitialized = true; @@ -344,52 +328,36 @@ struct SerializerTest : public CppUnit::TestFixture "http://www.w3.org/1999/xlink") ), 2*xml::sax::FastToken::NAMESPACE); } - - void serializerTest () - { - uno::Reference< xml::dom::XDocument > xDoc= - mxDomBuilder->parse( - uno::Reference<io::XInputStream>( - mxInStream.get())); - CPPUNIT_ASSERT_MESSAGE( "Valid input file did not result in XDocument", - xDoc.is() ); - CPPUNIT_ASSERT_MESSAGE( "Valid input file resulted in parse errors", - mxErrHandler->noErrors() ); - - uno::Reference< xml::sax::XSAXSerializable > xSaxSerializer( - xDoc, uno::UNO_QUERY); - CPPUNIT_ASSERT_MESSAGE( "XSAXSerializable not supported", - xSaxSerializer.is() ); - - uno::Reference< xml::sax::XFastSAXSerializable > xFastSaxSerializer( - xDoc, uno::UNO_QUERY); - CPPUNIT_ASSERT_MESSAGE( "XFastSAXSerializable not supported", - xSaxSerializer.is() ); - - xFastSaxSerializer->fastSerialize( mxHandler.get(), - mxTokHandler.get(), - uno::Sequence< beans::StringPair >(), - maRegisteredNamespaces ); - } - - // Change the following lines only, if you add, remove or rename - // member functions of the current class, - // because these macros are need by auto register mechanism. - - CPPUNIT_TEST_SUITE(SerializerTest); - CPPUNIT_TEST(serializerTest); - CPPUNIT_TEST_SUITE_END(); }; -// ----------------------------------------------------------------------------- -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(BasicTest, "BasicTest"); -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(SerializerTest, "SerializerTest"); +TEST_F(SerializerTest, serializerTest) +{ + uno::Reference< xml::dom::XDocument > xDoc= + mxDomBuilder->parse( + uno::Reference<io::XInputStream>( + mxInStream.get())); + ASSERT_TRUE( xDoc.is() ) << "Valid input file did not result in XDocument"; + ASSERT_TRUE( mxErrHandler->noErrors() ) << "Valid input file resulted in parse errors"; + + uno::Reference< xml::sax::XSAXSerializable > xSaxSerializer( + xDoc, uno::UNO_QUERY); + ASSERT_TRUE( xSaxSerializer.is() ) << "XSAXSerializable not supported"; + + uno::Reference< xml::sax::XFastSAXSerializable > xFastSaxSerializer( + xDoc, uno::UNO_QUERY); + ASSERT_TRUE( xSaxSerializer.is() ) << "XFastSAXSerializable not supported"; + + xFastSaxSerializer->fastSerialize( mxHandler.get(), + mxTokHandler.get(), + uno::Sequence< beans::StringPair >(), + maRegisteredNamespaces ); } +} -// ----------------------------------------------------------------------------- - -// this macro creates an empty function, which will called by the RegisterAllFunctions() -// to let the user the possibility to also register some functions by hand. -NOADDITIONAL; +int main(int argc, char **argv) +{ + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} diff --git a/unoxml/test/makefile.mk b/unoxml/test/makefile.mk index 9e6e9b8..950ab01 100644 --- a/unoxml/test/makefile.mk +++ b/unoxml/test/makefile.mk @@ -25,7 +25,6 @@ PRJ=.. PRJNAME=unoxml TARGET=tests -TARGETTYPE=GUI ENABLE_EXCEPTIONS=TRUE @@ -33,54 +32,56 @@ ENABLE_EXCEPTIONS=TRUE .INCLUDE : settings.mk -CFLAGSCXX += $(CPPUNIT_CFLAGS) +.IF "$(ENABLE_UNIT_TESTS)" != "YES" +all: + @echo unit tests are disabled. Nothing to do. + +.ELSE # --- Common ---------------------------------------------------------- # BEGIN ---------------------------------------------------------------- # auto generated Target:tests by codegen.pl -SHL1OBJS= \ - $(SLO)$/domtest.obj +APP1OBJS= \ + $(SLO)$/domtest.obj $(SLO)$/documentbuilder.obj # the following three libs are a bit of a hack: cannot link against # unoxml here, because not yet delivered (and does not export # ~anything). Need the functionality to test, so we're linking it in # statically. Need to keep this in sync with # source/services/makefile.mk -SHL1LIBS= \ - $(SLB)$/domimpl.lib \ - $(SLB)$/xpathimpl.lib \ - $(SLB)$/eventsimpl.lib +#APP1LIBS= \ + #$(SLB)$/domimpl.lib \ + #$(SLB)$/xpathimpl.lib \ + #$(SLB)$/eventsimpl.lib -SHL1TARGET= tests -SHL1STDLIBS= \ +APP1TARGET= tests +APP1STDLIBS= \ $(UCBHELPERLIB) \ $(LIBXML2LIB) \ $(TOOLSLIB) \ $(COMPHELPERLIB) \ $(CPPUHELPERLIB) \ - $(CPPUNITLIB) \ + $(GTESTLIB) \ $(TESTSHL2LIB) \ $(CPPULIB) \ $(SAXLIB) \ $(SALLIB)\ - $(EXPATASCII3RDLIB) + $(EXPATASCII3RDLIB) \ + -lunoxml -SHL1IMPLIB= i$(SHL1TARGET) - -DEF1NAME =$(SHL1TARGET) -SHL1VERSIONMAP = export.map +APP1RPATH = NONE +APP1TEST = disabled # END ------------------------------------------------------------------ #------------------------------- All object files ------------------------------- # do this here, so we get right dependencies -SLOFILES=$(SHL1OBJS) +SLOFILES=$(APP1OBJS) # --- Targets ------------------------------------------------------ .INCLUDE : target.mk -.INCLUDE : _cppunit.mk # --- Fake uno bootstrap ------------------------ @@ -95,7 +96,11 @@ $(MISC)$/unoxml_unittest_succeeded : $(SHL1TARGETN) $(BIN)$/unoxml_unittest_test @echo ---------------------------------------------------------- @echo - start unit test on library $(SHL1TARGETN) @echo ---------------------------------------------------------- - $(TESTSHL2) -forward $(BIN)$/ -sf $(mktmp ) $(SHL1TARGETN) + $(COMMAND_ECHO) $(AUGMENT_LIBRARY_PATH_LOCAL) \ + UNOXML_DOMTEST_FORWARD=$(BIN)$/ \ + $(APP1TARGETN) --gtest_output="xml:$(BIN)/$(APP1TARGET)_result.xml" $(TOUCH) $@ ALLTAR : $(MISC)$/unoxml_unittest_succeeded + +.ENDIF # "$(ENABLE_UNIT_TESTS)" != "YES" commit be66d5765345b65b04015f11fa926c54996c91c5 Author: Damjan Jovanovic <dam...@apache.org> Date: Wed Oct 14 17:58:56 2015 +0000 #i125003# migrate main/xmlsecurity/qa from cppunit to Google Test. Needs neon which is copyleft; doesn't compile; but isn't run during the build. diff --git a/xmlsecurity/qa/certext/SanCertExt.cxx b/xmlsecurity/qa/certext/SanCertExt.cxx index be01178..a253bd8 100644 --- a/xmlsecurity/qa/certext/SanCertExt.cxx +++ b/xmlsecurity/qa/certext/SanCertExt.cxx @@ -37,10 +37,7 @@ #include "com/sun/star/uno/Reference.hxx" #include "cppuhelper/bootstrap.hxx" -#include "cppunit/TestAssert.h" -#include "cppunit/TestFixture.h" -#include "cppunit/extensions/HelperMacros.h" -#include "cppunit/plugin/TestPlugIn.h" +#include "gtest/gtest.h" #include "sal/types.h" #include "comphelper/sequence.hxx" #include <rtl/ustring.hxx> @@ -55,9 +52,9 @@ using namespace com::sun::star; namespace { - class Test: public CppUnit::TestFixture { + class Test: public ::testing::Test { - private: + protected: static uno::Sequence< security::CertAltNameEntry > altNames; static bool runOnce; @@ -72,45 +69,14 @@ namespace { ~Test(); - virtual void setUp(); + virtual void SetUp(); - virtual void tearDown(); - - void test_Others(); - - void test_RFC822(); - - void test_DNS(); - - void test_Direcory(); - - void test_URI(); - - void test_IP(); - - void test_RID(); - - void test_EDI(); - - void test_X400(); - - CPPUNIT_TEST_SUITE(Test); - CPPUNIT_TEST(test_Others); - CPPUNIT_TEST(test_RFC822); - CPPUNIT_TEST(test_DNS); - CPPUNIT_TEST(test_Direcory); - CPPUNIT_TEST(test_URI); - CPPUNIT_TEST(test_IP); - CPPUNIT_TEST(test_RID); - CPPUNIT_TEST(test_EDI); - CPPUNIT_TEST(test_X400); - CPPUNIT_TEST_SUITE_END(); + virtual void TearDown(); }; uno::Sequence< security::CertAltNameEntry > Test::altNames; bool Test::runOnce = false; - CPPUNIT_TEST_SUITE_REGISTRATION(Test); Test::Test() { @@ -172,14 +138,14 @@ namespace { } - void Test::setUp() { + void Test::SetUp() { } - void Test::tearDown() { + void Test::TearDown() { } - void Test::test_Others() { - CPPUNIT_ASSERT_ASSERTION_PASS( CPPUNIT_ASSERT( altNames.getLength() > 0 ) ); + TEST_F(Test, test_Others) { + ASSERT_NO_THROW( ASSERT_TRUE( altNames.getLength() > 0 ) ); for(int n = 1; n < altNames.getLength(); n++) { if (altNames[n].Type == security::ExtAltNameType_OTHER_NAME) @@ -187,91 +153,90 @@ namespace { ::com::sun::star::beans::NamedValue otherNameProp; if (altNames[n].Value >>= otherNameProp) { - CPPUNIT_ASSERT_EQUAL( rtl::OUString::createFromAscii("1.2.3.4"), otherNameProp.Name); + ASSERT_EQ( rtl::OUString::createFromAscii("1.2.3.4"), otherNameProp.Name); uno::Sequence< sal_Int8 > ipAddress; otherNameProp.Value >>= ipAddress; - CPPUNIT_ASSERT_ASSERTION_PASS( CPPUNIT_ASSERT( ipAddress.getLength() > 0 ) ); + ASSERT_NO_THROW( ASSERT_TRUE( ipAddress.getLength() > 0 ) ); } } } } - void Test::test_RFC822() { - CPPUNIT_ASSERT_ASSERTION_PASS( CPPUNIT_ASSERT( altNames.getLength() > 0 ) ); + TEST_F(Test, test_RFC822) { + ASSERT_NO_THROW( ASSERT_TRUE( altNames.getLength() > 0 ) ); for(int n = 1; n < altNames.getLength(); n++) { if (altNames[n].Type == security::ExtAltNameType_RFC822_NAME) { rtl::OUString value; altNames[n].Value >>= value; - CPPUNIT_ASSERT_EQUAL( rtl::OUString::createFromAscii("my@other.address"), value); + ASSERT_EQ( rtl::OUString::createFromAscii("my@other.address"), value ); } } } - void Test::test_DNS() { - CPPUNIT_ASSERT_ASSERTION_PASS( CPPUNIT_ASSERT( altNames.getLength() > 0 ) ); + TEST_F(Test, test_DNS) { + ASSERT_NO_THROW( ASSERT_TRUE( altNames.getLength() > 0 ) ); for(int n = 1; n < altNames.getLength(); n++) { if (altNames[n].Type == security::ExtAltNameType_DNS_NAME) { rtl::OUString value; altNames[n].Value >>= value; - CPPUNIT_ASSERT_EQUAL( rtl::OUString::createFromAscii("alt.openoffice.org"), value); + ASSERT_EQ( rtl::OUString::createFromAscii("alt.openoffice.org"), value); } } } - void Test::test_Direcory() { + TEST_F(Test, test_Direcory) { // Not implemented } - void Test::test_URI() { - CPPUNIT_ASSERT_ASSERTION_PASS( CPPUNIT_ASSERT( altNames.getLength() > 0 ) ); + TEST_F(Test, test_URI) { + ASSERT_NO_THROW( ASSERT_TRUE( altNames.getLength() > 0 ) ); for(int n = 1; n < altNames.getLength(); n++) { if (altNames[n].Type == security::ExtAltNameType_URL) { rtl::OUString value; altNames[n].Value >>= value; - CPPUNIT_ASSERT_EQUAL( rtl::OUString::createFromAscii("http://my.url.here/"), value); + ASSERT_EQ( rtl::OUString::createFromAscii("http://my.url.here/"), value); } } } - void Test::test_IP() { - CPPUNIT_ASSERT_ASSERTION_PASS( CPPUNIT_ASSERT( altNames.getLength() > 0 ) ); + TEST_F(Test, test_IP) { + ASSERT_NO_THROW( ASSERT_TRUE( altNames.getLength() > 0 ) ); for(int n = 1; n < altNames.getLength(); n++) { if (altNames[n].Type == security::ExtAltNameType_IP_ADDRESS) { uno::Sequence< sal_Int8 > ipAddress; altNames[n].Value >>= ipAddress; - CPPUNIT_ASSERT_ASSERTION_PASS( CPPUNIT_ASSERT( ipAddress.getLength() > 0 ) ); + ASSERT_NO_THROW( ASSERT_TRUE( ipAddress.getLength() > 0 ) ); } } } - void Test::test_RID() { - CPPUNIT_ASSERT_ASSERTION_PASS( CPPUNIT_ASSERT( altNames.getLength() > 0 ) ); + TEST_F(Test, test_RID) { + ASSERT_NO_THROW( ASSERT_TRUE( altNames.getLength() > 0 ) ); for(int n = 1; n < altNames.getLength(); n++) { if (altNames[n].Type == security::ExtAltNameType_REGISTERED_ID) { rtl::OUString value; altNames[n].Value >>= value; - CPPUNIT_ASSERT( rtl::OUString::createFromAscii("1.2.3.4").equals(value)); + ASSERT_TRUE( rtl::OUString::createFromAscii("1.2.3.4").equals(value)); } } } - void Test::test_EDI() { + TEST_F(Test, test_EDI) { // Not implemented } - void Test::test_X400() { + TEST_F(Test, test_X400) { // Not implemented } } -CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/xmlsecurity/qa/certext/export.map b/xmlsecurity/qa/certext/export.map deleted file mode 100644 index ec49c45..0000000 --- a/xmlsecurity/qa/certext/export.map +++ /dev/null @@ -1,30 +0,0 @@ -#************************************************************** -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -#************************************************************** - - - -UDK_3_0_0 { - global: - cppunitTestPlugIn; - - local: - *; -}; diff --git a/xmlsecurity/qa/certext/makefile.mk b/xmlsecurity/qa/certext/makefile.mk index becdddf..3f86a84 100644 --- a/xmlsecurity/qa/certext/makefile.mk +++ b/xmlsecurity/qa/certext/makefile.mk @@ -36,12 +36,15 @@ ENABLE_EXCEPTIONS = TRUE .INCLUDE: settings.mk .INCLUDE : $(PRJ)$/util$/target.pmk -CFLAGSCXX += $(CPPUNIT_CFLAGS) +.IF "$(ENABLE_UNIT_TESTS)" != "YES" +all: + @echo unit tests are disabled. Nothing to do. -SHL1IMPLIB = i$(SHL1TARGET) -SHL1OBJS = $(SLOFILES) -SHL1RPATH = NONE -SHL1STDLIBS = $(CPPUNITLIB) \ +.ELSE + +APP1OBJS = $(SLO)/SanCertExt.obj +APP1RPATH = NONE +APP1STDLIBS = $(GTESTLIB) \ $(SALLIB) \ $(NEON3RDLIB) \ $(CPPULIB) \ @@ -52,20 +55,12 @@ SHL1STDLIBS = $(CPPUNITLIB) \ $(COMPHELPERLIB) \ $(TESTLIB) -SHL1TARGET = qa_CertExt -SHL1VERSIONMAP = $(PRJ)/qa/certext/export.map -DEF1NAME = $(SHL1TARGET) - -SLOFILES = $(SLO)/SanCertExt.obj +APP1TARGET = qa_CertExt +APP1TEST = enabled .INCLUDE: target.mk .INCLUDE: installationtest.mk -ALLTAR : cpptest - -cpptest : $(SHL1TARGETN) - -CPPTEST_LIBRARY = $(SHL1TARGETN) - -.END -.END +.ENDIF # "$(ENABLE_UNIT_TESTS)" != "YES" +.ENDIF # "$(OOO_SUBSEQUENT_TESTS)" == "" +.ENDIF # "$(ENABLE_NSS_MODULE)" == "NO" _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits