activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1004685 - in /activemq/activemq-cpp/trunk/activemq-c/src: main/c/ main/c/Makefile.am main/c/activemqc.h test/c/ test/c/Makefile.am test/c/Makefile.maven test/c/main.cpp
Date Tue, 05 Oct 2010 15:53:23 GMT
Author: tabish
Date: Tue Oct  5 15:53:23 2010
New Revision: 1004685

URL: http://svn.apache.org/viewvc?rev=1004685&view=rev
Log:
Create the initial project file structure

Added:
    activemq/activemq-cpp/trunk/activemq-c/src/main/c/Makefile.am   (with props)
    activemq/activemq-cpp/trunk/activemq-c/src/test/c/Makefile.am   (with props)
    activemq/activemq-cpp/trunk/activemq-c/src/test/c/main.cpp   (with props)
Modified:
    activemq/activemq-cpp/trunk/activemq-c/src/main/c/   (props changed)
    activemq/activemq-cpp/trunk/activemq-c/src/main/c/activemqc.h
    activemq/activemq-cpp/trunk/activemq-c/src/test/c/   (props changed)
    activemq/activemq-cpp/trunk/activemq-c/src/test/c/Makefile.maven

Propchange: activemq/activemq-cpp/trunk/activemq-c/src/main/c/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Oct  5 15:53:23 2010
@@ -0,0 +1 @@
+Makefile.in

Added: activemq/activemq-cpp/trunk/activemq-c/src/main/c/Makefile.am
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-c/src/main/c/Makefile.am?rev=1004685&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-c/src/main/c/Makefile.am (added)
+++ activemq/activemq-cpp/trunk/activemq-c/src/main/c/Makefile.am Tue Oct  5 15:53:23 2010
@@ -0,0 +1,40 @@
+# ---------------------------------------------------------------------------
+# 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.
+# ---------------------------------------------------------------------------
+
+cc_sources = \
+    activemqc.c
+
+
+h_sources = \
+    activemqc.h
+
+
+##
+## Compiler / Linker Info
+##
+
+lib_LTLIBRARIES= libactivemq-c.la
+libactivemq_c_la_SOURCES= $(h_sources) $(cc_sources)
+libactivemq_c_la_CXXFLAGS= $(AMQ_CXXFLAGS)
+libactivemq_c_la_LDFLAGS= -version-info $(ACTIVEMQ_LIBRARY_VERSION)
+libactivemq_c_la_LIBADD= $(AMQ_LIBS)
+
+##
+## Packaging Info
+##
+library_includedir=$(includedir)/$(ACTIVEMQ_LIBRARY_NAME)-$(ACTIVEMQ_VERSION)
+nobase_library_include_HEADERS = $(h_sources)

Propchange: activemq/activemq-cpp/trunk/activemq-c/src/main/c/Makefile.am
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: activemq/activemq-cpp/trunk/activemq-c/src/main/c/activemqc.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-c/src/main/c/activemqc.h?rev=1004685&r1=1004684&r2=1004685&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-c/src/main/c/activemqc.h (original)
+++ activemq/activemq-cpp/trunk/activemq-c/src/main/c/activemqc.h Tue Oct  5 15:53:23 2010
@@ -15,9 +15,15 @@
  * limitations under the License.
  */
 
-
 #ifndef _ACTIVEMQC_H_
 #define _ACTIVEMQC_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
 
 #endif /* _ACTIVEMQC_H_ */

Propchange: activemq/activemq-cpp/trunk/activemq-c/src/test/c/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Oct  5 15:53:23 2010
@@ -0,0 +1 @@
+Makefile.in

Added: activemq/activemq-cpp/trunk/activemq-c/src/test/c/Makefile.am
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-c/src/test/c/Makefile.am?rev=1004685&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-c/src/test/c/Makefile.am (added)
+++ activemq/activemq-cpp/trunk/activemq-c/src/test/c/Makefile.am Tue Oct  5 15:53:23 2010
@@ -0,0 +1,36 @@
+# ---------------------------------------------------------------------------
+# 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.
+# ---------------------------------------------------------------------------
+
+cc_sources = \
+    main.cpp
+
+
+##h_sources = \
+##    
+
+## Compile this as part of make check
+check_PROGRAMS = activemqc-test
+
+## Also run the tests as part of make check
+TESTS = $(check_PROGRAMS)
+
+## 
+## Compiler/Linker Options
+##
+activemqc_test_SOURCES = $(cc_sources)
+activemqc_test_CXXFLAGS = $(AMQ_TEST_CXXFLAGS) -I$(srcdir)/../main @CPPUNIT_CFLAGS@
+activemqc_test_LDADD= $(AMQ_TEST_LIBS) @CPPUNIT_LIBS@ 

Propchange: activemq/activemq-cpp/trunk/activemq-c/src/test/c/Makefile.am
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: activemq/activemq-cpp/trunk/activemq-c/src/test/c/Makefile.maven
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-c/src/test/c/Makefile.maven?rev=1004685&r1=1004684&r2=1004685&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-c/src/test/c/Makefile.maven (original)
+++ activemq/activemq-cpp/trunk/activemq-c/src/test/c/Makefile.maven Tue Oct  5 15:53:23 2010
@@ -18,8 +18,8 @@
 cc_sources = \
     ${source}
 
-h_sources = \
-    ${headers}
+##h_sources = \
+##    ${headers}
 
 ## Compile this as part of make check
 check_PROGRAMS = activemqc-test

Added: activemq/activemq-cpp/trunk/activemq-c/src/test/c/main.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-c/src/test/c/main.cpp?rev=1004685&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-c/src/test/c/main.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-c/src/test/c/main.cpp Tue Oct  5 15:53:23 2010
@@ -0,0 +1,102 @@
+/*
+ * 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.
+ */
+
+#include <cppunit/extensions/TestFactoryRegistry.h>
+#include <cppunit/ui/text/TestRunner.h>
+#include <cppunit/TestListener.h>
+#include <cppunit/BriefTestProgressListener.h>
+#include <cppunit/Outputter.h>
+#include <cppunit/XmlOutputter.h>
+#include <cppunit/TestResult.h>
+#include <util/teamcity/TeamCityProgressListener.h>
+#include <activemq/util/Config.h>
+#include <activemq/library/ActiveMQCPP.h>
+#include <decaf/lang/Runtime.h>
+#include <decaf/lang/Integer.h>
+#include <iostream>
+#include <memory>
+
+int main( int argc, char **argv ) {
+
+    activemq::library::ActiveMQCPP::initializeLibrary();
+
+    bool wasSuccessful = false;
+    int iterations = 1;
+    std::ofstream outputFile;
+    bool useXMLOutputter = false;
+    std::auto_ptr<CppUnit::TestListener> listener( new CppUnit::BriefTestProgressListener
);
+
+    if( argc > 1 ) {
+        for( int i = 1; i < argc; ++i ) {
+            const std::string arg( argv[i] );
+            if( arg == "-runs" ) {
+                if( ( i + 1 ) >= argc ) {
+                    std::cout << "-runs requires a value for the iteration count" <<
std::endl;
+                    return -1;
+                }
+                try {
+                    iterations = decaf::lang::Integer::parseInt( argv[++i] );
+                } catch( decaf::lang::exceptions::NumberFormatException& ex ) {
+                    std::cout << "Invalid iteration count specified on command line:
"
+                              << argv[i] << std::endl;
+                    return -1;
+                }
+            } else if( arg == "-teamcity" ) {
+                listener.reset( new test::util::teamcity::TeamCityProgressListener() );
+            } else if( arg == "-quiet" ) {
+                listener.reset( NULL );
+            } else if( arg == "-xml" ) {
+                if( ( i + 1 ) >= argc ) {
+                    std::cout << "-xml requires a filename to be specified" <<
std::endl;
+                    return -1;
+                }
+
+                std::ofstream outputFile( argv[++i] );
+                useXMLOutputter = true;
+            }
+        }
+    }
+
+    for( int i = 0; i < iterations; ++i ) {
+
+        CppUnit::TextUi::TestRunner runner;
+        CppUnit::TestFactoryRegistry &registry = CppUnit::TestFactoryRegistry::getRegistry();
+        runner.addTest( registry.makeTest() );
+
+        // Shows a message as each test starts
+        if( listener.get() != NULL ) {
+            runner.eventManager().addListener( listener.get() );
+        }
+
+        // Specify XML output and inform the test runner of this format.  The TestRunner
+        // will delete the passed XmlOutputter for us.
+        if( useXMLOutputter ) {
+            runner.setOutputter( new CppUnit::XmlOutputter( &runner.result(), outputFile
) );
+        }
+
+        wasSuccessful = runner.run( "", false );
+
+        if( useXMLOutputter ) {
+            outputFile.close();
+        }
+    }
+
+    activemq::library::ActiveMQCPP::shutdownLibrary();
+
+    return !wasSuccessful;
+}
+

Propchange: activemq/activemq-cpp/trunk/activemq-c/src/test/c/main.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/activemq-cpp/trunk/activemq-c/src/test/c/main.cpp
------------------------------------------------------------------------------
    svn:executable = *



Mime
View raw message