[Mobies-commit] [commit] r4205 - in UDM/trunk: . bin rpm samples/cross_links scripts tests/test_crosslinks

endre at redhat3.isis.vanderbilt.edu endre at redhat3.isis.vanderbilt.edu
Fri Dec 6 09:35:18 CST 2013


Author: endre
Date: Fri Dec  6 09:35:18 2013
New Revision: 4205

Log:
- Modified and fixed some errors in automake and autoconfigure files so Linux build
- Modified/fixed cross_link tester
- Added necessary files to Linux make
- rename of files:
CL.udm -> CL_udm.udm
CL_export.xml -> CL_export_udm.xml

Deleted:
   UDM/trunk/samples/cross_links/CL.udm
   UDM/trunk/samples/cross_links/CL_export.xml
Modified:
   UDM/trunk/Linux_build.txt
   UDM/trunk/Makefile.am
   UDM/trunk/bin/Makefile.am
   UDM/trunk/rpm/Makefile.am
   UDM/trunk/rpm/udm.spec.in
   UDM/trunk/scripts/_archive-model-files.bat
   UDM/trunk/tests/test_crosslinks/CrossLinkTester.cpp
   UDM/trunk/tests/test_crosslinks/Makefile.am

Modified: UDM/trunk/Linux_build.txt
==============================================================================
--- UDM/trunk/Linux_build.txt	Mon Nov 18 16:21:57 2013	(r4204)
+++ UDM/trunk/Linux_build.txt	Fri Dec  6 09:35:18 2013	(r4205)
@@ -1,116 +1,163 @@
-HOWTO install Udm from ISIS repos:
-
-CentOS 5.8:
-----------
-On CentOS 5, ISIS Udm packages require python-hashlib from EPEL:
- Enable EPEL repository: http://fedoraproject.org/wiki/EPEL:
-  wget http://mirror.utexas.edu/epel/5/i386/epel-release-5-4.noarch.rpm
-  rpm -i epel-release-5-4.noarch.rpm
- yum install -y python-hashlib
-cat > /etc/yum.repos.d/isis.repo <<EOF
-[isis]
-name=ISIS \$releasever - \$basearch
-baseurl=http://repo.isis.vanderbilt.edu/Download/UDM/rhel/\$releasever/\$basearch/
-enabled=1
-gpgcheck=0
-EOF
-
-yum install -y udm
-
-
-Software requirements and instructions to compile UDM source files on Linux
-
-Building:
----------
-
-Requirements:
--------------
-- GCC 3.x (or later)
-- Xerces-C++ 2.5.0 (or later)
-- Xalan-C++ 1.8.0 (or later)
-- SWIG 1.3.23 (or later)
-- minizip
-- cppunit
-- pccts
-- gcc-java 4.x (or later) or Java SDK 1.4.2 (or later)
-- ant
-- junit
-- Boost
-- libboost-python-dev for UdmPython (apt-get install libboost-python-dev)
-
-Build-environment preparation (Fedora 14 or newer):
-----------------------------------------------
-- install development tools and libraries
-  yum groupinstall 'Development Libraries' 'Development Tools' 'Java Development'
-  yum install ccache cppunit-devel minizip-devel swig xalan-c-devel xerces-c-devel
-  yum install ant ant-junit ant-trax junit xerces-j2 xalan-j2 xml-commons-apis
-- install the following rpm from our repository or disable antlr: pccts
-
-Build-environment preparation (RHEL/CentOS 5):
-----------------------------------------------
-- enable EPEL repository: http://fedoraproject.org/wiki/EPEL
-- install development tools and libraries
-  yum groupinstall 'Development Libraries' 'Development Tools' 'Java Development'
-  yum install -y ccache cppunit-devel swig xalan-c-devel xerces-c-devel
-  yum install -y ant ant-junit ant-trax junit xerces-j2 xalan-j2 xml-commons-apis
-  yum install -y java-1.6.0-openjdk java-1.6.0-openjdk-devel
-- install the following rpms from our repository:
-  yum install -y minizip minizip-devel minizip-libs pccts
-
-Obtaining model-files.zip:
---------------------------
-From scratch:
- - build udm, judm and the tests on Windows: msbuild make.msbuild /t:BuildVS9;judm
- - on Windows run %UDM_PATH%\scripts\archive-model-files.bat, it will
-   create %UDM_PATH%\model-files-*.zip, an archive with the model data
-   files generated on Windows
- - Copy the archive model-files-*.zip and rename it to model-files.zip.
-
-From build.isis:
-wget 'http://build.isis.vanderbilt.edu/job/UDM/label=build-slave3/lastSuccessfulBuild/artifact/trunk/model-files-VC9-Release.zip' -O model-files.zip
-
-Building:
----------------------
-- on Linux export or checkout the Udm sources from subversion repository
-- in the top directory run
-  autoreconf -i
-- Obtain model-files.zip as above
-- Save model-files.zip in the top directory of your build directory
-- configure and build Udm with the usual sequence of steps for GNU autotools:
-  ./configure  (for RHEL/CentOS and Fedora: ./configure --with-antlr=antlr1)
-  make
-- to run the tests launch the following command in the top build directory:
-  make check
-- to build the binary and source rpms launch the following command in
-  the top build directory:
-  make rpms
-
-Building on Ubuntu 10.04 (Lucid):
-----------------------------------------------
-# Install Build-Deps:
-sudo apt-get install debhelper build-essential autoconf libtool ccache libcppunit-dev libxalan110-dev ant junit libxerces-c2-dev sun-java6-jdk ant-optional pccts libboost-dev zlib1g-dev swig libboost-python-dev
-# Configure alternatives to use java-6-sun
-sudo update-alternatives --set java /usr/lib/jvm/java-6-sun/jre/bin/java
-sudo update-java-alternatives -s java-6-sun
-# Obtain model-files.zip as above or:
-wget 'http://build.isis.vanderbilt.edu/job/UDM/label=build-slave3/lastSuccessfulBuild/artifact/trunk/model-files-VC9-Release.zip' -O model-files.zip
-# Build binary debs
-fakeroot debian/rules binary
-
-Building on Ubuntu 12.04 (Precise):
-----------------------------------------------
-sudo apt-get install fakeroot debhelper build-essential autoconf libtool libxerces-c2-dev autotools-dev ccache libcppunit-dev libxalan110-dev ant junit ant-optional pccts libboost-dev zlib1g-dev swig openjdk-6-jdk libboost-python-dev
-# Obtain model-files.zip as above or:
-wget 'http://build.isis.vanderbilt.edu/job/UDM/label=build-slave3/lastSuccessfulBuild/artifact/trunk/model-files-VC9-Release.zip' -O model-files.zip
-# Build binary debs
-fakeroot debian/rules binary
-
-Building (CentOS)
-----------------------------------------------
-- CentOS <6: enable RPMForge repository: http://wiki.centos.org/AdditionalResources/Repositories/RPMForge
-  yum -y groupinstall 'Development Libraries' 'Development Tools' 'Java Development'
-  yum -y install ccache cppunit-devel xerces-c-devel swig ant-junit boost-devel antlr
-  setenforce permissive
-  wget -O model-files.zip http://build.isis.vanderbilt.edu/job/UDM/label=build-slave3/lastSuccessfulBuild/artifact/trunk/model-files-VC9-Release.zip
-  autoreconf -i
-  cd rpmbuild_CentOS && bash make.sh
+HOWTO install Udm from ISIS repos:
+
+CentOS 5.8:
+----------
+On CentOS 5, ISIS Udm packages require python-hashlib from EPEL:
+ Enable EPEL repository: http://fedoraproject.org/wiki/EPEL:
+  wget http://mirror.utexas.edu/epel/5/i386/epel-release-5-4.noarch.rpm
+  rpm -i epel-release-5-4.noarch.rpm
+ yum install -y python-hashlib
+cat > /etc/yum.repos.d/isis.repo <<EOF
+[isis]
+name=ISIS \$releasever - \$basearch
+baseurl=http://repo.isis.vanderbilt.edu/Download/UDM/rhel/\$releasever/\$basearch/
+enabled=1
+gpgcheck=0
+EOF
+
+yum install -y udm
+
+
+Software requirements and instructions to compile UDM source files on Linux
+
+Building:
+---------
+
+Requirements:
+-------------
+- GCC 3.x (or later)
+- Xerces-C++ 2.5.0 (or later)
+- Xalan-C++ 1.8.0 (or later)
+- SWIG 1.3.23 (or later)
+- minizip
+- cppunit
+- pccts
+- gcc-java 4.x (or later) or Java SDK 1.4.2 (or later)
+- ant
+- junit
+- Boost
+- libboost-python-dev for UdmPython (apt-get install libboost-python-dev)
+
+Build-environment preparation (Fedora 14 or newer):
+----------------------------------------------
+- install development tools and libraries
+  yum groupinstall 'Development Libraries' 'Development Tools' 'Java Development'
+  yum install ccache cppunit-devel minizip-devel swig xalan-c-devel xerces-c-devel
+  yum install ant ant-junit ant-trax junit xerces-j2 xalan-j2 xml-commons-apis
+- install the following rpm from our repository or disable antlr: pccts, minzip, minizip-lib, minizip-devel
+ (pccts-1.33mr33-13.2.fc5.1.i386.rpm, minizip-1.01e-1.fc6.1.i386.rpm, minizip-devel-1.01e-1.fc6.1.i386.rpm, minizip-libs-1.01e-1.fc6.1.i386.rpm) 
+
+Build-environment preparation (RHEL/CentOS 5):
+----------------------------------------------
+- enable EPEL repository: http://fedoraproject.org/wiki/EPEL
+- install development tools and libraries
+  yum groupinstall 'Development Libraries' 'Development Tools' 'Java Development'
+  yum install -y ccache cppunit-devel swig xalan-c-devel xerces-c-devel
+  yum install -y ant ant-junit ant-trax junit xerces-j2 xalan-j2 xml-commons-apis
+  yum install -y java-1.6.0-openjdk java-1.6.0-openjdk-devel
+- install the following rpms from our repository:
+  yum install -y minizip minizip-devel minizip-libs pccts
+
+Obtaining model-files.zip:
+--------------------------
+From scratch:
+ - build udm, judm and the tests on Windows: msbuild make.msbuild /t:BuildVS9;judm
+ - on Windows run %UDM_PATH%\scripts\archive-model-files.bat, it will
+   create %UDM_PATH%\model-files-*.zip, an archive with the model data
+   files generated on Windows
+ - Copy the archive model-files-*.zip and rename it to model-files.zip.
+
+From build.isis:
+wget 'http://build.isis.vanderbilt.edu/job/UDM/label=build-slave3/lastSuccessfulBuild/artifact/trunk/model-files-VC9-Release.zip' -O model-files.zip
+
+Building:
+---------------------
+- on Linux export or checkout the Udm sources from subversion repository
+- in the top directory run
+  autoreconf -i
+- Obtain model-files.zip as above
+- Save model-files.zip in the top directory of your build directory
+- configure and build Udm with the usual sequence of steps for GNU autotools:
+  ./configure  (for RHEL/CentOS and Fedora: ./configure --with-antlr=antlr1)
+  make
+- to run the tests launch the following command in the top build directory:
+  make check
+- to build the binary and source rpms launch the following command in
+  the top build directory:
+  make rpms (for Ubuntu, use alien to convert the rpm-s to deb packages)
+
+Building on Ubuntu 10.04 (Lucid):
+----------------------------------------------
+# Install Build-Deps:
+sudo apt-get install debhelper build-essential autoconf libtool ccache libcppunit-dev libxalan110-dev ant junit libxerces-c2-dev sun-java6-jdk ant-optional pccts libboost-dev zlib1g-dev swig libboost-python-dev alien
+# Configure alternatives to use java-6-sun
+sudo update-alternatives --set java /usr/lib/jvm/java-6-sun/jre/bin/java
+sudo update-java-alternatives -s java-6-sun
+# Install the following rpm from our repository or disable antlr: minzip, minizip-lib, minizip-devel
+alien --install minizip-1.01e-1.fc6.1.i386.rpm
+alien --install minizip-devel-1.01e-1.fc6.1.i386.rpm
+alien --install minizip-libs-1.01e-1.fc6.1.i386.rpm
+# Obtain model-files.zip as above or:
+wget 'http://build.isis.vanderbilt.edu/job/UDM/label=build-slave3/lastSuccessfulBuild/artifact/trunk/model-files-VC9-Release.zip' -O model-files.zip
+# Build binary debs // this will not work at the moment
+#fakeroot debian/rules binary
+# Configure and build Udm with the usual sequence of steps for GNU autotools, at top build directory: 
+autoreconf -i
+./configure
+make
+# Run the tests:
+make check
+# If check fails, then:
+# 1) Make sure minizip library links are there in the source, if not, create them:
+#ln -s ../../debian/zlib-1.2.3.3.dfsg/contrib/minizip src/Udm/minizip
+#ln -s ../../debian/zlib-1.2.3.3.dfsg/contrib/minizip src/UdmBase/minizip
+# 2) Aslo make sure that the jdk library is included so the gcc knows it:
+#JNI_PATH = find / -type f -name 'jni.h' | sed 's/jni.h//1'
+#export CPATH=$CPATH:$JNI_PATH
+# Build binary and source rpms:
+make rpms
+# Convert the needed rpms from rpm/RMPS/$(ARCH)/ where 
+#$(ARCH) is the architecture of the computer and 
+#$(filename) is desired package (eg. if development or java distribution is needed)
+alien --scripts $(filename)
+
+Building on Ubuntu 12.04 (Precise):
+----------------------------------------------
+sudo apt-get install fakeroot debhelper build-essential autoconf libtool libxerces-c2-dev autotools-dev ccache libcppunit-dev libxalan110-dev ant junit ant-optional pccts libboost-dev zlib1g-dev swig openjdk-6-jdk  libboost-python-dev alien
+# Install the following rpm from our repository or disable antlr: minzip, minizip-lib, minizip-devel
+alien --install minizip-1.01e-1.fc6.1.i386.rpm
+alien --install minizip-devel-1.01e-1.fc6.1.i386.rpm
+alien --install minizip-libs-1.01e-1.fc6.1.i386.rpm
+# Obtain model-files.zip as above or:
+wget 'http://build.isis.vanderbilt.edu/job/UDM/label=build-slave3/lastSuccessfulBuild/artifact/trunk/model-files-VC9-Release.zip' -O model-files.zip
+# Build binary debs // this will not work at the moment
+#fakeroot debian/rules binary
+# Configure and build Udm with the usual sequence of steps for GNU autotools, at top build directory: 
+autoreconf -i
+./configure
+make
+# Run the tests:
+make check
+# If check fails, then:
+# 1) Make sure minizip library links are there in the source, if not, create them:
+#ln -s ../../debian/zlib-1.2.3.3.dfsg/contrib/minizip src/Udm/minizip
+#ln -s ../../debian/zlib-1.2.3.3.dfsg/contrib/minizip src/UdmBase/minizip
+# 2) Aslo make sure that the jdk library is included so the gcc knows it:
+#JNI_PATH = find / -type f -name 'jni.h' | sed 's/jni.h//1'
+#export CPATH=$CPATH:$JNI_PATH
+# Build binary and source rpms:
+make rpms
+# Convert the needed rpms from rpm/RMPS/$(ARCH)/ where 
+#$(ARCH) is the architecture of the computer and 
+#$(filename) is desired package (eg. if development or java distribution is needed)
+alien --scripts $(filename)
+
+Building (CentOS)
+----------------------------------------------
+- CentOS <6: enable RPMForge repository: http://wiki.centos.org/AdditionalResources/Repositories/RPMForge
+  yum -y groupinstall 'Development Libraries' 'Development Tools' 'Java Development'
+  yum -y install ccache cppunit-devel xerces-c-devel swig ant-junit boost-devel antlr
+  setenforce permissive
+  wget -O model-files.zip http://build.isis.vanderbilt.edu/job/UDM/label=build-slave3/lastSuccessfulBuild/artifact/trunk/model-files-VC9-Release.zip
+  autoreconf -i
+  cd rpmbuild_CentOS && bash make.sh

Modified: UDM/trunk/Makefile.am
==============================================================================
--- UDM/trunk/Makefile.am	Mon Nov 18 16:21:57 2013	(r4204)
+++ UDM/trunk/Makefile.am	Fri Dec  6 09:35:18 2013	(r4205)
@@ -4,7 +4,14 @@
 SUBDIRS = . doc etc include src lib bin samples tests judm rpm
 
 EXTRA_DIST	= CHANGELOG.txt license.txt Linux_build.txt \
-	model-files.zip readme.txt releaseinfo.txt
+	model-files.zip readme.txt releaseinfo.txt \
+	samples/CL_udm.udm samples/cross_links/CL_udm.udm \
+	samples/LampDiagram_udm.xml samples/cross_links/CL_export.xml \
+	tests/test_ns/CL_udm.udm tests/test_crosslinks/CL_udm.udm \
+	tests/testGetAdjacentObjects/testAssociationScenarios_udm.udm \
+	tests/test_ns/test_ns_udm.xml tests/test_refports/RefPort_udm.xml \
+	tests/testUdmCint/GeneTF_udm.xml tests/testUdmCint/SBML2Ex_udm.xml \
+	tests/testOCL/SBML2_udm.xml
 
 all-local: model-files.zip
 	unzip -x -o $(srcdir)/model-files.zip

Modified: UDM/trunk/bin/Makefile.am
==============================================================================
--- UDM/trunk/bin/Makefile.am	Mon Nov 18 16:21:57 2013	(r4204)
+++ UDM/trunk/bin/Makefile.am	Fri Dec  6 09:35:18 2013	(r4205)
@@ -17,7 +17,8 @@
 Udm_SOURCES		=
 Udm_LDADD		= \
 	../src/Udm/libudm.la \
-	../lib/libudm.la
+	../lib/libudm.la \
+	-lminizip -lz
 nodist_EXTRA_Udm_SOURCES	= dummy.cxx
 
 

Modified: UDM/trunk/rpm/Makefile.am
==============================================================================
--- UDM/trunk/rpm/Makefile.am	Mon Nov 18 16:21:57 2013	(r4204)
+++ UDM/trunk/rpm/Makefile.am	Fri Dec  6 09:35:18 2013	(r4205)
@@ -1,19 +1,19 @@
-## Makefile.am -- Process this file with automake to produce Makefile.in
-
-ARCH = $(shell uname -i)
-
-rpms: RPMS/$(ARCH)/udm- at PACKAGE_VERSION@-0localbuild.$(ARCH).rpm SRPMS/udm- at PACKAGE_VERSION@-0localbuild.srpm
-
-RPMS/$(ARCH)/udm- at PACKAGE_VERSION@-0localbuild.$(ARCH).rpm: prepare_build_env
-	rpmbuild --define "_topdir `pwd`" -bb SPECS/udm.spec
-
-SRPMS/udm- at PACKAGE_VERSION@-0localbuild.srpm: prepare_build_env
-	rpmbuild --define "_topdir `pwd`" -bs SPECS/udm.spec
-
-prepare_build_env: udm.spec
-	mkdir -p RPMS/$(ARCH) BUILD SOURCES SPECS SRPMS
-	cp udm.spec SPECS
-	(cd .. && make dist && mv udm- at PACKAGE_VERSION@.tar.gz rpm/SOURCES)
-
-clean:
-	rm -rf BUILD RPMS SOURCES SPECS SRPMS
+## Makefile.am -- Process this file with automake to produce Makefile.in
+
+ARCH = $(shell uname -i)
+
+rpms: RPMS/$(ARCH)/udm- at PACKAGE_VERSION@-0localbuild.$(ARCH).rpm SRPMS/udm- at PACKAGE_VERSION@-0localbuild.srpm
+
+RPMS/$(ARCH)/udm- at PACKAGE_VERSION@-0localbuild.$(ARCH).rpm: prepare_build_env
+	rpmbuild --target i686 --define "_topdir `pwd`" -bb SPECS/udm.spec
+
+SRPMS/udm- at PACKAGE_VERSION@-0localbuild.srpm: prepare_build_env
+	rpmbuild --target i686 --define "_topdir `pwd`" -bs SPECS/udm.spec
+
+prepare_build_env: udm.spec
+	mkdir -p RPMS/$(ARCH) BUILD SOURCES SPECS SRPMS
+	cp udm.spec SPECS
+	(cd .. && make dist && mv udm- at PACKAGE_VERSION@.tar.gz rpm/SOURCES)
+
+clean:
+	rm -rf BUILD RPMS SOURCES SPECS SRPMS

Modified: UDM/trunk/rpm/udm.spec.in
==============================================================================
--- UDM/trunk/rpm/udm.spec.in	Mon Nov 18 16:21:57 2013	(r4204)
+++ UDM/trunk/rpm/udm.spec.in	Fri Dec  6 09:35:18 2013	(r4205)
@@ -9,14 +9,14 @@
 Source: %{name}-%{version}.tar.gz
 #Source1: model-files.zip
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
-Packager: Endre Magyari <endre at nextra.ro>
+Packager: ISIS (Institute for Software Integrated Systems), Vanderbilt University, http://www.isis.vanderbilt.edu
 License: Vanderbilt University EULA
-BuildRequires: xerces-c-devel, xalan-c-devel, minizip-devel, pccts
-BuildRequires: swig >= 1.3.24, cppunit-devel
-BuildRequires: ant, ant-junit, ant-trax, junit, xml-commons-apis
-BuildRequires: java-devel
-BuildRequires: boost-devel
-Requires: xerces-c, xalan-c, minizip-libs
+#BuildRequires: xerces-c-devel, xalan-c-devel, minizip-devel, pccts
+#BuildRequires: swig >= 1.3.24, cppunit-devel
+#BuildRequires: ant, ant-junit, ant-trax, junit, xml-commons-apis
+#BuildRequires: java-devel
+#BuildRequires: boost-devel
+#Requires: xerces-c, xalan-c, minizip-libs
 %if "%{rhldisttag}" == "rh7"
 BuildRequires: gcc3-c++
 %endif
@@ -50,7 +50,6 @@
 
 %prep
 %setup -q
-#%setup -a 1 -D -q
 
 %build
 %if "%{rhldisttag}" == "rh7"
@@ -61,7 +60,6 @@
 %configure --enable-static --with-swig=%{swig} --with-antlr=%{antlr}
 make %{_smp_mflags}
 
-#%check
 make check
 
 %install
@@ -80,11 +78,14 @@
 
 # java samples
 install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/samples/java
+
+
 for sample in GeneTF GeneTRE SBML2Ex TimeSeries; do
     install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/samples/java/$sample
-    cp -pr judm/build/build_linux/$sample/{apidoc,*.jar,meta,runtests.sh,samples} $RPM_BUILD_ROOT%{_datadir}/%{name}/samples/java/$sample
+    cp -pr /home/palfi/Prj/UDM/trunk_actual/judm/build/build_linux/$sample/ $RPM_BUILD_ROOT%{_datadir}/%{name}/samples/java/$sample
 done
 
+
 %postun
 /sbin/ldconfig
 
@@ -99,6 +100,7 @@
 %doc doc/*.pdf
 %{_bindir}/*
 %{_libdir}/libudm.so.*
+/usr/lib/libudmxmi.so*
 # judm loads libUdmSwig.so, include it here
 %{_libdir}/libUdmSwig.so*
 %{_datadir}/%{name}/etc
@@ -108,6 +110,7 @@
 %{_includedir}/%{name}
 %{_libdir}/*.*a
 %{_libdir}/libudm.so
+/usr/lib/libudmxmi.so*
 %{_datadir}/%{name}/samples/LampDiagram_udm.xml
 %{_datadir}/%{name}/samples/CreateLampModel
 %{_datadir}/%{name}/samples/cross_links

Modified: UDM/trunk/scripts/_archive-model-files.bat
==============================================================================
--- UDM/trunk/scripts/_archive-model-files.bat	Mon Nov 18 16:21:57 2013	(r4204)
+++ UDM/trunk/scripts/_archive-model-files.bat	Fri Dec  6 09:35:18 2013	(r4205)
@@ -20,4 +20,12 @@
 zip -r %_UDM_PATH%\model-files-%_VC%-%_UDM_BUILD%.zip judm -i *_udm.xml -i *_udm.udm -x judm/build/*
 popd
 
+pushd %_UDM_PATH%
+zip -r %_UDM_PATH%\model-files-%_VC%-%_UDM_BUILD%.zip tests -i *_udm.xml -i *_udm.udm
+popd
+
+pushd %_UDM_PATH%
+zip -r %_UDM_PATH%\model-files-%_VC%-%_UDM_BUILD%.zip samples -i *_udm.xml -i *_udm.udm
+popd
+
 exit /b

Modified: UDM/trunk/tests/test_crosslinks/CrossLinkTester.cpp
==============================================================================
--- UDM/trunk/tests/test_crosslinks/CrossLinkTester.cpp	Mon Nov 18 16:21:57 2013	(r4204)
+++ UDM/trunk/tests/test_crosslinks/CrossLinkTester.cpp	Fri Dec  6 09:35:18 2013	(r4205)
@@ -1,13 +1,17 @@
 #include "CrossLinkTester.h"
-#include "CLPackage.h"
+//#include "CLPackage.h"
 #include "CL.h"
-#include "Package1.h"
-#include "Package2.h"
+#include "CD1.h"
+#include "CD2.h"
+#include "CD3.h"
 
 CPPUNIT_TEST_SUITE_REGISTRATION( UdmTests::CrossLinkTester );
 
-using namespace Package1;
-using namespace Package2;
+//using namespace Package1;
+//using namespace Package2;
+using namespace CD1;
+using namespace CD2;
+using namespace CD3;
 using namespace std;
 
 void UdmTests::CrossLinkTester::test()
@@ -15,38 +19,59 @@
 	try {
 		Udm::UdmProject prj;
 		//specifying instance data networks which will be present in the project
-		Udm::DataNetworkSpecifier dnsP1("Package1_inst.xml", "Package1", ClassA::meta);
-		Udm::DataNetworkSpecifier dnsP2("Package2_inst.xml", "Package2", Class1::meta);
+		Udm::DataNetworkSpecifier cd1_dn("CD1_inst.xml", "CD1", M1::meta);
+		Udm::DataNetworkSpecifier cd2_dn("CD2_inst.xml", "CD2", M2::meta);
+		Udm::DataNetworkSpecifier cd3_dn("CD3_inst.xml", "CD3", MM3::meta);
+		//Udm::DataNetworkSpecifier BdnsP1("Package1_inst.xml", "CD1", ClassA::meta);
+		//Udm::DataNetworkSpecifier dnsP2("Package2_inst.xml", "CD2", Class1::meta);
 		vector<Udm::DataNetworkSpecifier> dnsvec;
-		dnsvec.push_back(dnsP1);
-		dnsvec.push_back(dnsP2);
+		dnsvec.push_back(cd1_dn);
+		dnsvec.push_back(cd2_dn);
+		dnsvec.push_back(cd3_dn);
 		//creating a Udm Project
 		prj.CreateNew("test.udm", dnsvec, CL::diagram, Udm::CHANGES_LOST_DEFAULT);
 		//obtaining handles to the datanetworks which were created
-		Udm::DataNetwork& p1 = prj.GetDataNetwork("Package1_inst.xml");
-		Udm::DataNetwork& p2 = prj.GetDataNetwork("Package2_inst.xml");
+		Udm::DataNetwork& p1 = prj.GetDataNetwork("CD1_inst.xml");
+		Udm::DataNetwork& p2 = prj.GetDataNetwork("CD2_inst.xml");
+		Udm::DataNetwork& p3 = prj.GetDataNetwork("CD3_inst.xml");
 		//obtaining handles to the root objects (this is normal - existing - Udm operation)
-		ClassA rootP1 = ClassA::Cast( p1.GetRootObject());
-		Class1 rootP2 = Class1::Cast( p2.GetRootObject());
+		CD1::M1 m1 = CD1::M1::Cast( p1.GetRootObject());
+		CD2::M2 m2 = CD2::M2::Cast( p2.GetRootObject());
+		CD3::MM3 m3 = CD3::MM3::Cast( p3.GetRootObject());
 		// create Class2
-		Class2 class2= Class2::Create( rootP2);
+		//M2 class2= M2::Create( m2);
 		// create Class3
-		NSp::NSc::Class3 class3 = NSp::NSc::Class3::Create(rootP2);
+		//NSp::NSc::Class3 class3 = NSp::NSc::Class3::Create(rootP2);
+		//MM3 class3 = MM3::Create( m2);
 		// create cross links
-		rootP1.dst1()+= rootP2;
-		rootP1.dst1()+= class2;
-		rootP1.dst2()= class2;
-		rootP1.dst3()+= class3;
+		//rootP1.dst1()= rootP2;
+		//rootP1.dst1()= class3;
+		//rootP1.dst2()= class2;
+		//rootP1.dst3()+= class3;
+		
 		// verification
-		std::set< Class1> dst1s= rootP1.dst1();
-		CPPUNIT_ASSERT( dst1s.size() == 2);
-		CPPUNIT_ASSERT( dst1s.find( rootP2) != dst1s.end());
-		CPPUNIT_ASSERT( dst1s.find( class2) != dst1s.end());
-		const Class2& dst2= rootP1.dst2();
-		CPPUNIT_ASSERT( dst2 == class2);
-		std::set< NSp::NSc::Class3> dst3s = rootP1.dst3();
-		CPPUNIT_ASSERT( dst3s.size() == 1);
-		CPPUNIT_ASSERT( dst3s.find( class3) != dst3s.end());
+		set<CD1::M1> a;
+		m2.dst() = m1;
+		a.insert(m1);
+		m3.src() = a;
+
+		CD1::M1 m1_too = m2.dst();
+		CPPUNIT_ASSERT( m1 == m1_too);
+		set<CD1::M1> a_too = m3.src();
+		CPPUNIT_ASSERT(a_too.size() == a.size());
+		CPPUNIT_ASSERT(a_too.begin() != a.find(m1));
+
+
+
+		//std::set< Class1> dst1s= rootP1.dst();
+		//CPPUNIT_ASSERT( dst1s.size() == 2);
+		//CPPUNIT_ASSERT( dst1s.find( rootP2) != dst1s.end());
+		//CPPUNIT_ASSERT( dst1s.find( class2) != dst1s.end());
+		//const Class2& dst2= rootP1.dst2();
+		//CPPUNIT_ASSERT( dst2 == class2);
+		//std::set< NSp::NSc::Class3> dst3s = rootP1.dst3();
+		//CPPUNIT_ASSERT( dst3s.size() == 1);
+		//CPPUNIT_ASSERT( dst3s.find( class3) != dst3s.end());
 	} catch( udm_exception &e)
 	{
 		std::cout << e.what() << std::endl;
@@ -55,3 +80,4 @@
 }
 
 
+

Modified: UDM/trunk/tests/test_crosslinks/Makefile.am
==============================================================================
--- UDM/trunk/tests/test_crosslinks/Makefile.am	Mon Nov 18 16:21:57 2013	(r4204)
+++ UDM/trunk/tests/test_crosslinks/Makefile.am	Fri Dec  6 09:35:18 2013	(r4205)
@@ -1,42 +1,42 @@
-## Makefile.am -- Process this file with automake to produce Makefile.in
-
-AM_CPPFLAGS		= -I$(top_srcdir)/include $(CPPUNITINC)
-
-noinst_PROGRAMS		= test_CrossLinks
-TESTS			= $(noinst_PROGRAMS)
-
-BUILT_SOURCES		= CL.cpp CL.h CL.xsd \
-			  CLPackage.cpp CLPackage.h CLPackage.xsd \
-			  Package1.cpp Package1.h Package1.xsd \
-			  Package2.cpp Package2.h Package2.xsd
-test_CrossLinks_SOURCES	= CrossLinkTester.cpp CrossLinkTester.h \
-			  test_CrossLinks.cpp
-nodist_test_CrossLinks_SOURCES	= $(BUILT_SOURCES)
-test_CrossLinks_LDADD	= ../../lib/libudm.la $(CPPUNITLIBS)
-
-CLEANFILES		= $(BUILT_SOURCES) sources-stamp
-
-
-sources-stamp: CL_udm.udm ../../bin/Udm Makefile
-	@rm -f sources-temp
-	@touch sources-temp
-	../../bin/Udm $< -d ../../etc -T
-	@mv -f sources-temp $@
-
-$(BUILT_SOURCES): sources-stamp
-## Recover from the removal of $@
-	@if test -f $@; then :; else \
-		trap 'rm -rf sources-lock sources-stamp' 1 2 13 15; \
-		if mkdir sources-lock 2>/dev/null; then \
-## This code is being executed by the first process.
-			rm -f sources-stamp; \
-			$(MAKE) $(AM_MAKEFLAGS) sources-stamp; \
-			rmdir sources-lock; \
-		else \
-## This code is being executed by the follower processes.
-## Wait until the first process is done.
-			while test -d sources-lock; do sleep 1; done; \
-## Succeed if and only if the first process succeeded.
-			test -f sources-stamp; exit $$?; \
-		fi; \
-	fi
+## Makefile.am -- Process this file with automake to produce Makefile.in
+
+AM_CPPFLAGS		= -I$(top_srcdir)/include $(CPPUNITINC)
+
+noinst_PROGRAMS		= test_CrossLinks
+TESTS			= $(noinst_PROGRAMS)
+
+BUILT_SOURCES		= CL.cpp CL.h CL.xsd \
+			  CD1.cpp CD1.h CD1.xsd \
+			  CD2.cpp CD2.h CD2.xsd \
+			  CD3.cpp CD3.h CD3.xsd
+test_CrossLinks_SOURCES	= CrossLinkTester.cpp CrossLinkTester.h \
+			  test_CrossLinks.cpp
+nodist_test_CrossLinks_SOURCES	= $(BUILT_SOURCES)
+test_CrossLinks_LDADD	= ../../lib/libudm.la $(CPPUNITLIBS)
+
+CLEANFILES		= $(BUILT_SOURCES) sources-stamp
+
+
+sources-stamp: CL_udm.udm ../../bin/Udm Makefile
+	@rm -f sources-temp
+	@touch sources-temp
+	../../bin/Udm $< -d ../../etc -T
+	@mv -f sources-temp $@
+
+$(BUILT_SOURCES): sources-stamp
+## Recover from the removal of $@
+	@if test -f $@; then :; else \
+		trap 'rm -rf sources-lock sources-stamp' 1 2 13 15; \
+		if mkdir sources-lock 2>/dev/null; then \
+## This code is being executed by the first process.
+			rm -f sources-stamp; \
+			$(MAKE) $(AM_MAKEFLAGS) sources-stamp; \
+			rmdir sources-lock; \
+		else \
+## This code is being executed by the follower processes.
+## Wait until the first process is done.
+			while test -d sources-lock; do sleep 1; done; \
+## Succeed if and only if the first process succeeded.
+			test -f sources-stamp; exit $$?; \
+		fi; \
+	fi


More information about the Mobies-commit mailing list