You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by bj...@apache.org on 2007/09/20 00:17:40 UTC

svn commit: r577457 - in /incubator/tuscany/cpp/sdo: build.xml runtime/core/build.xml runtime/core/src/commonj/sdo/SDOUtils.cpp runtime/core/test/build.xml runtime/core/test/sdotest.cpp

Author: bjohnson
Date: Wed Sep 19 15:17:40 2007
New Revision: 577457

URL: http://svn.apache.org/viewvc?rev=577457&view=rev
Log:
Commit fix for JIRA 1694 and 1695 for Ralf Henschkowski. Also added ant build files for sdo tests

Added:
    incubator/tuscany/cpp/sdo/runtime/core/test/build.xml
Modified:
    incubator/tuscany/cpp/sdo/build.xml
    incubator/tuscany/cpp/sdo/runtime/core/build.xml
    incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOUtils.cpp
    incubator/tuscany/cpp/sdo/runtime/core/test/sdotest.cpp

Modified: incubator/tuscany/cpp/sdo/build.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/build.xml?rev=577457&r1=577456&r2=577457&view=diff
==============================================================================
--- incubator/tuscany/cpp/sdo/build.xml (original)
+++ incubator/tuscany/cpp/sdo/build.xml Wed Sep 19 15:17:40 2007
@@ -55,8 +55,8 @@
     <!--antcall target="clean.docs"/-->
   </target>
 	
-  <target name="test" description="Run SDO tests, not implemented yet">
-    <!-- TODO finish this -->
+  <target name="test" description="Run SDO tests">
+    <ant target="test" antfile="${runtime.sdo.dir}/build.xml" inheritAll="false"/>
   </target>
 
 

Modified: incubator/tuscany/cpp/sdo/runtime/core/build.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/build.xml?rev=577457&r1=577456&r2=577457&view=diff
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/build.xml (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/build.xml Wed Sep 19 15:17:40 2007
@@ -63,6 +63,12 @@
   <target name="clean" description="Clean all TuscanySdoNative core compiled source code">
     <antcall target="clean.sdo"/>
     <antcall target="clean.sdo_axiom"/>
+    <antcall target="clean.test"/>
+  </target>
+  
+  <target name="test" description="Build and Run TuscanySdoNative sdo and sdo_axiom tests">
+    <antcall target="test.sdo"/>
+    <antcall target="test.sdo_axiom"/>
   </target>
 
   <!--
@@ -76,7 +82,7 @@
     <cpp-build
         srcdir="${sdo.dir}"
         outdir="${sdo.lib.dir}"
-    	outfile="${tuscany.sdo.lib}">
+        outfile="${tuscany.sdo.lib}">
       <custom-build-elements>
         <defineset if="windows" define="SDO_EXPORTS"/>
         <includepath path="${tuscanySDO.root.src.dir}/core/src"/>
@@ -92,7 +98,7 @@
     <cpp-build
         srcdir="${sdo_axiom.dir}"
         outdir="${sdo_axiom.lib.dir}"
-    	outfile="${tuscany.sdo_axiom.lib}">
+        outfile="${tuscany.sdo_axiom.lib}">
       <custom-build-elements>
         <defineset if="windows" define="SDO_AXIOM_EXPORTS"/>
         <includepath path="${sdo.impl.include.path}"/>
@@ -112,7 +118,7 @@
   <target name="install.sdo" depends="check.libxml2" if="enable_libxml2">
   	<cpp-install-lib
   	    lib="${tuscany.sdo.lib}"
-  		srcdir="${sdo.lib.dir}"
+        srcdir="${sdo.lib.dir}"
         destrootdir="${tuscanySDO.install.dir}"/>
     <cpp-symlink
         linkdir="${tuscanySDO.install.dir}/lib"
@@ -161,6 +167,23 @@
     <cpp-clean-files
        dir="${sdo_axiom.lib.dir}"
        rmdir="true"/>
+  </target>
+    
+  <target name="clean.test">
+    <ant target="clean" antfile="${this.dir}/test/build.xml" inheritAll="false"/>
+    <!-- TODO not implemented yet -->
+    <!--ant target="clean" antfile="${this.dir}/sdo_axiom_test/build.xml" inheritAll="false"/-->
+  </target>
+  
+    <!-- Test -->
+
+  <target name="test.sdo">
+    <ant target="all" antfile="${this.dir}/test/build.xml" inheritAll="false"/>
+  </target>
+  
+  <target name="test.sdo_axiom">
+    <!-- TODO not implemented yet -->
+    <!--ant target="all" antfile="${this.dir}/sdo_axiom_test/build.xml" inheritAll="false"/-->
   </target>
 
 </project>

Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOUtils.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOUtils.cpp?rev=577457&r1=577456&r2=577457&view=diff
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOUtils.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOUtils.cpp Wed Sep 19 15:17:40 2007
@@ -275,7 +275,7 @@
                        j != pl.end();
                        j++)
                   {
-                     PropertyPtr current = *j;
+                     PropertyPtr current = staticCast<PropertyPtr>(*j);
     
                      out << "\tProperty: "
                          << current->getName()

Added: incubator/tuscany/cpp/sdo/runtime/core/test/build.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/test/build.xml?rev=577457&view=auto
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/test/build.xml (added)
+++ incubator/tuscany/cpp/sdo/runtime/core/test/build.xml Wed Sep 19 15:17:40 2007
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   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.
+-->
+<project name="TuscanySdoNative_test" default="all" basedir="../../..">
+
+  <import file="${basedir}/antscripts/system.xml"/>
+  <import file="${basedir}/antscripts/compile-targets.xml"/>
+
+  <!--
+    Notice that the basedir for this project is set to the TuscanySDO root dir
+    This makes path setting in system.xml much simpler, but we'll just have to
+    set a property here to this directory.
+  -->
+  <property name="this.dir"            location="${basedir}/runtime/core/test"/>
+  <property name="sdo.test.src.dir"    location="${this.dir}"/>
+  <property name="sdo.test.build.dir"  location="${this.dir}/build"/>
+  <property name="sdo.test.app"        value="sdo_test"/>
+
+  <!--
+    Public targets
+  -->
+  <target name="all" description="compile, link, and run TuscanySdoNative test suite">
+    <antcall target="build"/>
+    <antcall target="run"/>
+  </target>
+
+  <target name="build" description="compile and link TuscanySdoNative test suite">
+    <cpp-build
+        srcdir="${sdo.test.src.dir}"
+        infiles="*.cpp"
+        outdir="${sdo.test.build.dir}"
+        outfile="${sdo.test.app}"
+        outtype="executable">
+      <custom-build-elements>
+        <includepath path="${sdo.impl.include.path}"/>
+        <defineset if="windows" define="_MBCS"/>
+        <!--includepath if="windows" path="${iconv.home.dir}/include"/-->
+        <libset dir="${sdo.impl.library.path}" libs="${sdo.impl.library.name}"/>
+        <!--libset if="windows" dir="${libxml2.lib.dir}" libs="libxml2"/-->
+        <!--libset unless="windows" dir="${libxml2.lib.dir}" libs="xml2"/-->
+      </custom-build-elements>
+    </cpp-build>
+
+    <cpp-install-file
+        srcfile="${sdo.test.app}${exe.ext}"
+        srcdir="${sdo.test.build.dir}"
+        destdir="${this.dir}"/>
+  </target>
+
+  <target name="run" depends="build" description="Run TuscanySdoNative test suite">
+    <exec executable="${this.dir}/${sdo.test.app}${exe.ext}"/>
+  </target>
+
+  <target name="clean" description="Clean TuscanySdoNative test suite">
+    <delete dir="${sdo.test.build.dir}" quiet="@{quiet}"/>
+  </target>
+
+</project>

Modified: incubator/tuscany/cpp/sdo/runtime/core/test/sdotest.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/test/sdotest.cpp?rev=577457&r1=577456&r2=577457&view=diff
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/test/sdotest.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/test/sdotest.cpp Wed Sep 19 15:17:40 2007
@@ -9293,7 +9293,7 @@
 {
 public:
   RefCountBase(int& dtorCount) : dtorCount_(dtorCount) {}
-  RefCountBase::~RefCountBase() { ++dtorCount_; }
+  ~RefCountBase() { ++dtorCount_; }
 protected:
   int& dtorCount_;
 };



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org