--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/.project Mon Jan 23 11:48:40 2012 +0100
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>Bake</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.python.pydev.PyDevBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.python.pydev.pythonNature</nature>
+ </natures>
+</projectDescription>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/.project_old Mon Jan 23 11:48:40 2012 +0100
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>bake</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.python.pydev.PyDevBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.python.pydev.pythonNature</nature>
+ </natures>
+</projectDescription>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/.pydevproject Mon Jan 23 11:48:40 2012 +0100
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?eclipse-pydev version="1.0"?>
+
+<pydev_project>
+<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
+<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 3.0</pydev_property>
+<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
+<path>/bake</path>
+</pydev_pathproperty>
+</pydev_project>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/.pydevproject_old Mon Jan 23 11:48:40 2012 +0100
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?eclipse-pydev version="1.0"?>
+
+<pydev_project>
+<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
+<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 3.0</pydev_property>
+<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
+<path>/bake</path>
+</pydev_pathproperty>
+</pydev_project>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/_bakeconf.xml Mon Jan 23 11:48:40 2012 +0100
@@ -0,0 +1,117 @@
+<configuration>
+ <modules>
+
+ <module name="click-1.8.0">
+ <source type="archive">
+ <attribute name="url" value="http://read.cs.ucla.edu/click/click-1.8.0.tar.gz"/>
+ </source>
+ <build type="autotools" objdir="yes">
+ <attribute name="configure_arguments" value="--enable-userlevel --disable-linuxmodule --enable-nsclick --enable-wifi"/>
+ </build>
+ </module>
+
+ <module name="openflow-ns3">
+ <source type="mercurial">
+ <attribute name="url" value="http://code.nsnam.org/bhurd/openflow"/>
+ </source>
+ <build type="waf" objdir="yes"/>
+ </module>
+
+ <module name="ns-3-dce">
+ <source type="mercurial">
+ <attribute name="url" value="http://code.nsnam.org/furbani/ns-3-dce"/>
+ </source>
+ <build type="waf" objdir="yes"/>
+ </module>
+
+ <module name="gccxml-ns3">
+ <source type="cvs">
+ <attribute name="root" value=":pserver:anoncvs:@www.gccxml.org:/cvsroot/GCC_XML"/>
+ <attribute name="module" value="gccxml"/>
+ <attribute name="date" value="2009-09-21"/>
+ </source>
+ <build type="cmake" objdir="yes">
+ </build>
+ </module>
+
+ <module name="pygccxml">
+ <source type="archive">
+ <attribute name="url" value="http://mesh.dl.sourceforge.net/project/pygccxml/pygccxml/pygccxml-1.0/pygccxml-1.0.0.zip"/>
+ </source>
+ <build type="python" objdir="yes">
+ </build>
+ <depends_on name="gccxml-ns3"/>
+ </module>
+
+ <module name="pybindgen">
+ <source type="bazaar">
+ <attribute name="url" value="https://launchpad.net/pybindgen"/>
+ <attribute name="revision" value="revno:795"/>
+ </source>
+ <build type="waf" objdir="yes">
+ <attribute name="build_arguments" value="--generate-version"/>
+ </build>
+ <depends_on name="pygccxml" optional="True"/>
+ </module>
+
+ <module name="nsc">
+ <source type="mercurial">
+ <attribute name="url" value="https://secure.wand.net.nz/mercurial/nsc"/>
+ </source>
+ <!-- problem: scons has no generic command-line support for builddir and installdir -->
+ <build type="inline" classname="NscModuleBuild">
+ <code>class NscModuleBuild(InlineModuleBuild):
+ def __init__(self):
+ InlineModuleBuild.__init__(self)
+ def build(self, env, jobs):
+ env.run(['python', os.path.join(env.srcdir, 'scons.py'),
+ '-j', str(jobs), '--prefix=' + env.installdir, 'install'],
+ directory=env.srcdir)
+ def clean(self, env):
+ env.run(['python', os.path.join(env.srcdir, 'scons.py'), '-c'],
+ directory=env.srcdir)
+ def check_version(self, env):
+ return True</code>
+ </build>
+ </module>
+
+ <module name="ns-3-dev">
+ <source type="mercurial">
+ <attribute name="url" value="http://code.nsnam.org/ns-3-dev"/>
+ </source>
+ <depends_on name="nsc" optional="True"/>
+ <depends_on name="pybindgen" optional="True"/>
+ <depends_on name="click-1.8.0" optional="True"/>
+ <depends_on name="openflow-ns3" optional="True"/>
+ <build type="waf" objdir="yes">
+ <attribute name="configure_arguments" value="--with-nsc=$INSTALLDIR --with-nsclick=$INSTALLDIR --with-openflow=$INSTALLDIR"/>
+ </build>
+ </module>
+
+ </modules>
+
+ <predefined name="ns3">
+ <enable name="ns-3-dev"/>
+ <configuration installdir="." sourcedir="../source"/>
+ <append module="ns-3-dev" name="configure_arguments" value="--enable-examples --enable-tests"/>
+ </predefined>
+ <predefined name="nopython">
+ <disable name="pybindgen"/>
+ </predefined>
+ <predefined name="dbg">
+ <configuration objdir="dbg"/>
+ <append name="CFLAGS" value="-g -O0"/>
+ <append name="CXXFLAGS" value="-g -O0"/>
+ </predefined>
+ <predefined name="opt">
+ <configuration objdir="opt"/>
+ <append name="CFLAGS" value="-g -O3"/>
+ <append name="CXXFLAGS" value="-g -O3"/>
+ </predefined>
+ <predefined name="cov">
+ <configuration objdir="cov"/>
+ <append name="CFLAGS" value="-fprofile-arcs -ftest-coverage "/>
+ <append name="CXXFLAGS" value="-fprofile-arcs -ftest-coverage "/>
+ <append name="LDFLAGS" value="-lgcov"/>
+ </predefined>
+</configuration>
--- a/bake/Configuration.py Fri Nov 18 14:12:31 2011 +0100
+++ b/bake/Configuration.py Mon Jan 23 11:48:40 2012 +0100
@@ -334,7 +334,8 @@
self._relative_directory_root = root.get('relative_directory_root')
original_bakefile = root.get('bakefile')
metadata = root.find('metadata')
- self._metadata_file = MetadataFile (metadata.get('filename'),
+ if metadata :
+ self._metadata_file = MetadataFile (metadata.get('filename'),
h = metadata.get('hash'))
# read which modules are enabled
@@ -349,7 +350,10 @@
disabled = self.lookup(module.get('name'))
self.disable(disabled)
- return self._metadata_file.is_hash_ok() and original_bakefile == self._bakefile
+ if metadata:
+ return self._metadata_file.is_hash_ok() and original_bakefile == self._bakefile
+ else :
+ return True
def set_installdir(self, installdir):
self._installdir = installdir
--- a/bake/ModuleBuild.py Fri Nov 18 14:12:31 2011 +0100
+++ b/bake/ModuleBuild.py Mon Jan 23 11:48:40 2012 +0100
@@ -2,7 +2,7 @@
import os
from Utils import ModuleAttributeBase
from Exceptions import NotImplemented
-from bake.Exceptions import TaskError
+from Exceptions import TaskError
class ModuleBuild(ModuleAttributeBase):
@@ -190,6 +190,21 @@
options = []
if self.attribute('cmake_arguments').value != '':
options = self.attribute('cmake_arguments').value.split(' ')
+
+ # if the object directory does not exist, it should create it, to
+ # avoid build error, since the cmake does not create the directory
+ # it also makes it orthogonal to waf, that creates the target object dir
+ try:
+ env.run(['mkdir', env.objdir],
+ directory=env.srcdir)
+ except TaskError as e:
+ # assume that if an error is thrown is because the directory already
+ # exist, otherwise re-propagates the error
+ if not "error 1" in e._reason :
+ raise TaskError(e._reason)
+
+ directory=env.objdir
+
env.run(['cmake', env.srcdir, '-DCMAKE_INSTALL_PREFIX=' + env.installdir] +
self._variables() + options,
directory=env.objdir)
--- a/bake/ModuleEnvironment.py Fri Nov 18 14:12:31 2011 +0100
+++ b/bake/ModuleEnvironment.py Mon Jan 23 11:48:40 2012 +0100
@@ -3,7 +3,7 @@
import sys
import platform
-from bake.Exceptions import TaskError
+from Exceptions import TaskError
class ModuleEnvironment:
(HIGHER, LOWER, EQUAL) = range(0,3)
--- a/bake/ModuleSource.py Fri Nov 18 14:12:31 2011 +0100
+++ b/bake/ModuleSource.py Mon Jan 23 11:48:40 2012 +0100
@@ -144,6 +144,7 @@
# finally, rename the extraction directory to the target directory name.
try:
os.rename(os.path.join(tempdir, actual_extract_dir), env.srcdir)
+ os.remove(tempdir)
except (OSError, IOError) as e:
raise TaskError('Rename problem for module: %s, from: %s, to: %s, Error: %s'
% (env._module_name,os.path.join(tempdir, actual_extract_dir),env.srcdir, e))
@@ -230,6 +231,7 @@
import os
try:
os.rename(os.path.join(tempdir, actual_checkout_dir), env.srcdir)
+ os.remove(tempdir)
except AttributeError as e:
raise TaskError('Atribute type error expected String, Error: %s' % e)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/bakeconfOK.xml Mon Jan 23 11:48:40 2012 +0100
@@ -0,0 +1,117 @@
+<configuration>
+ <modules>
+
+ <module name="click-1.8.0">
+ <source type="archive">
+ <attribute name="url" value="http://read.cs.ucla.edu/click/click-1.8.0.tar.gz"/>
+ </source>
+ <build type="autotools" objdir="yes">
+ <attribute name="configure_arguments" value="--enable-userlevel --disable-linuxmodule --enable-nsclick --enable-wifi"/>
+ </build>
+ </module>
+
+ <module name="openflow-ns3">
+ <source type="mercurial">
+ <attribute name="url" value="http://code.nsnam.org/bhurd/openflow"/>
+ </source>
+ <build type="waf" objdir="yes"/>
+ </module>
+
+ <module name="bake-dev">
+ <source type="mercurial">
+ <attribute name="url" value="http://code.nsnam.org/daniel/bake"/>
+ </source>
+ <build type="waf" objdir="yes"/>
+ </module>
+
+ <module name="gccxml-ns3">
+ <source type="cvs">
+ <attribute name="root" value=":pserver:anoncvs:@www.gccxml.org:/cvsroot/GCC_XML"/>
+ <attribute name="module" value="gccxml"/>
+ <attribute name="date" value="2009-09-21"/>
+ </source>
+ <build type="cmake" objdir="yes">
+ </build>
+ </module>
+
+ <module name="pygccxml">
+ <source type="archive">
+ <attribute name="url" value="http://mesh.dl.sourceforge.net/project/pygccxml/pygccxml/pygccxml-1.0/pygccxml-1.0.0.zip"/>
+ </source>
+ <build type="python" objdir="yes">
+ </build>
+ <depends_on name="gccxml-ns3"/>
+ </module>
+
+ <module name="pybindgen">
+ <source type="bazaar">
+ <attribute name="url" value="https://launchpad.net/pybindgen"/>
+ <attribute name="revision" value="revno:795"/>
+ </source>
+ <build type="waf" objdir="yes">
+ <attribute name="build_arguments" value="--generate-version"/>
+ </build>
+ <depends_on name="pygccxml" optional="True"/>
+ </module>
+
+ <module name="nsc">
+ <source type="mercurial">
+ <attribute name="url" value="https://secure.wand.net.nz/mercurial/nsc"/>
+ </source>
+ <!-- problem: scons has no generic command-line support for builddir and installdir -->
+ <build type="inline" classname="NscModuleBuild">
+ <code>class NscModuleBuild(InlineModuleBuild):
+ def __init__(self):
+ InlineModuleBuild.__init__(self)
+ def build(self, env, jobs):
+ env.run(['python', os.path.join(env.srcdir, 'scons.py'),
+ '-j', str(jobs), '--prefix=' + env.installdir, 'install'],
+ directory=env.srcdir)
+ def clean(self, env):
+ env.run(['python', os.path.join(env.srcdir, 'scons.py'), '-c'],
+ directory=env.srcdir)
+ def check_version(self, env):
+ return True</code>
+ </build>
+ </module>
+
+ <module name="ns-3-dev">
+ <source type="mercurial">
+ <attribute name="url" value="http://code.nsnam.org/ns-3-dev"/>
+ </source>
+ <depends_on name="nsc" optional="True"/>
+ <depends_on name="pybindgen" optional="True"/>
+ <depends_on name="click-1.8.0" optional="True"/>
+ <depends_on name="openflow-ns3" optional="True"/>
+ <build type="waf" objdir="yes">
+ <attribute name="configure_arguments" value="--with-nsc=$INSTALLDIR --with-nsclick=$INSTALLDIR --with-openflow=$INSTALLDIR"/>
+ </build>
+ </module>
+
+ </modules>
+
+ <predefined name="ns3">
+ <enable name="ns-3-dev"/>
+ <configuration installdir="." sourcedir="../source"/>
+ <append module="ns-3-dev" name="configure_arguments" value="--enable-examples --enable-tests"/>
+ </predefined>
+ <predefined name="nopython">
+ <disable name="pybindgen"/>
+ </predefined>
+ <predefined name="dbg">
+ <configuration objdir="dbg"/>
+ <append name="CFLAGS" value="-g -O0"/>
+ <append name="CXXFLAGS" value="-g -O0"/>
+ </predefined>
+ <predefined name="opt">
+ <configuration objdir="opt"/>
+ <append name="CFLAGS" value="-g -O3"/>
+ <append name="CXXFLAGS" value="-g -O3"/>
+ </predefined>
+ <predefined name="cov">
+ <configuration objdir="cov"/>
+ <append name="CFLAGS" value="-fprofile-arcs -ftest-coverage "/>
+ <append name="CXXFLAGS" value="-fprofile-arcs -ftest-coverage "/>
+ <append name="LDFLAGS" value="-lgcov"/>
+ </predefined>
+</configuration>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/bakeconfWorkingOnDCE.xml Mon Jan 23 11:48:40 2012 +0100
@@ -0,0 +1,128 @@
+<configuration>
+ <modules>
+
+ <module name="click-1.8.0">
+ <source type="archive">
+ <attribute name="url" value="http://read.cs.ucla.edu/click/click-1.8.0.tar.gz"/>
+ </source>
+ <build type="autotools" objdir="yes">
+ <attribute name="configure_arguments" value="--enable-userlevel --disable-linuxmodule --enable-nsclick --enable-wifi"/>
+ </build>
+ </module>
+
+ <module name="openflow-ns3">
+ <source type="mercurial">
+ <attribute name="url" value="http://code.nsnam.org/bhurd/openflow"/>
+ </source>
+ <build type="waf" objdir="yes"/>
+ </module>
+
+ <module name="ns-3-dce">
+ <source type="mercurial">
+ <attribute name="url" value="http://code.nsnam.org/furbani/ns-3-dce"/>
+ </source>
+ <depends_on name="ns-3-dev" optional="False"/>
+ <build type="waf" objdir="yes">
+ <attribute name="configure_arguments" value="configure --prefix='pwd'/../build --verbose --enable-kernel-stack='pwd'/../ns-3-linux"/>
+ </build>
+ </module>
+
+hg clone http://code.nsnam.org/mathieu/readversiondef
+
+hg clone http://code.nsnam.org/furbani/ns-3-linux op
+
+hg clone http://code.nsnam.org/ns-3-dev -r cf417e0145eb
+
+git clone git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git net-next-2.6
+
+ <module name="gccxml-ns3">
+ <source type="cvs">
+ <attribute name="root" value=":pserver:anoncvs:@www.gccxml.org:/cvsroot/GCC_XML"/>
+ <attribute name="module" value="gccxml"/>
+ <attribute name="date" value="2009-09-21"/>
+ </source>
+ <build type="cmake" objdir="yes">
+ </build>
+ </module>
+
+ <module name="pygccxml">
+ <source type="archive">
+ <attribute name="url" value="http://mesh.dl.sourceforge.net/project/pygccxml/pygccxml/pygccxml-1.0/pygccxml-1.0.0.zip"/>
+ </source>
+ <build type="python" objdir="yes">
+ </build>
+ <depends_on name="gccxml-ns3"/>
+ </module>
+
+ <module name="pybindgen">
+ <source type="bazaar">
+ <attribute name="url" value="https://launchpad.net/pybindgen"/>
+ <attribute name="revision" value="revno:795"/>
+ </source>
+ <build type="waf" objdir="yes">
+ <attribute name="build_arguments" value="--generate-version"/>
+ </build>
+ <depends_on name="pygccxml" optional="True"/>
+ </module>
+
+ <module name="nsc">
+ <source type="mercurial">
+ <attribute name="url" value="https://secure.wand.net.nz/mercurial/nsc"/>
+ </source>
+ <!-- problem: scons has no generic command-line support for builddir and installdir -->
+ <build type="inline" classname="NscModuleBuild">
+ <code>class NscModuleBuild(InlineModuleBuild):
+ def __init__(self):
+ InlineModuleBuild.__init__(self)
+ def build(self, env, jobs):
+ env.run(['python', os.path.join(env.srcdir, 'scons.py'),
+ '-j', str(jobs), '--prefix=' + env.installdir, 'install'],
+ directory=env.srcdir)
+ def clean(self, env):
+ env.run(['python', os.path.join(env.srcdir, 'scons.py'), '-c'],
+ directory=env.srcdir)
+ def check_version(self, env):
+ return True</code>
+ </build>
+ </module>
+
+ <module name="ns-3-dev">
+ <source type="mercurial">
+ <attribute name="url" value="http://code.nsnam.org/ns-3-dev"/>
+ </source>
+ <depends_on name="nsc" optional="True"/>
+ <depends_on name="pybindgen" optional="True"/>
+ <depends_on name="click-1.8.0" optional="True"/>
+ <depends_on name="openflow-ns3" optional="True"/>
+ <build type="waf" objdir="yes">
+ <attribute name="configure_arguments" value="--with-nsc=$INSTALLDIR --with-nsclick=$INSTALLDIR --with-openflow=$INSTALLDIR"/>
+ </build>
+ </module>
+
+ </modules>
+
+ <predefined name="ns3">
+ <enable name="ns-3-dev"/>
+ <configuration installdir="." sourcedir="../source"/>
+ <append module="ns-3-dev" name="configure_arguments" value="--enable-examples --enable-tests"/>
+ </predefined>
+ <predefined name="nopython">
+ <disable name="pybindgen"/>
+ </predefined>
+ <predefined name="dbg">
+ <configuration objdir="dbg"/>
+ <append name="CFLAGS" value="-g -O0"/>
+ <append name="CXXFLAGS" value="-g -O0"/>
+ </predefined>
+ <predefined name="opt">
+ <configuration objdir="opt"/>
+ <append name="CFLAGS" value="-g -O3"/>
+ <append name="CXXFLAGS" value="-g -O3"/>
+ </predefined>
+ <predefined name="cov">
+ <configuration objdir="cov"/>
+ <append name="CFLAGS" value="-fprofile-arcs -ftest-coverage "/>
+ <append name="CXXFLAGS" value="-fprofile-arcs -ftest-coverage "/>
+ <append name="LDFLAGS" value="-lgcov"/>
+ </predefined>
+</configuration>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/clone_and_compile_ns3_dce.sh Mon Jan 23 11:48:40 2012 +0100
@@ -0,0 +1,426 @@
+<?xml version="1.0" encoding="ascii"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
+<head>
+<link rel="icon" href="/furbani/ns-3-dce/static/hgicon.png" type="image/png" />
+<meta name="robots" content="index, nofollow"/>
+<link rel="stylesheet" href="/furbani/ns-3-dce/static/style-gitweb.css" type="text/css" />
+
+
+<title>furbani/ns-3-dce: utils/clone_and_compile_ns3_dce.sh@60a9cf52e24a</title>
+<link rel="alternate" type="application/atom+xml"
+ href="/furbani/ns-3-dce/atom-log" title="Atom feed for furbani/ns-3-dce"/>
+<link rel="alternate" type="application/rss+xml"
+ href="/furbani/ns-3-dce/rss-log" title="RSS feed for furbani/ns-3-dce"/>
+</head>
+<body>
+
+<div class="page_header">
+<a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="/furbani/ns-3-dce/summary">furbani/ns-3-dce</a> / file revision
+</div>
+
+<div class="page_nav">
+<a href="/furbani/ns-3-dce/summary">summary</a> |
+<a href="/furbani/ns-3-dce/shortlog">shortlog</a> |
+<a href="/furbani/ns-3-dce/log">changelog</a> |
+<a href="/furbani/ns-3-dce/graph">graph</a> |
+<a href="/furbani/ns-3-dce/tags">tags</a> |
+<a href="/furbani/ns-3-dce/branches">branches</a> |
+<a href="/furbani/ns-3-dce/file/60a9cf52e24a/utils/">files</a> |
+<a href="/furbani/ns-3-dce/rev/60a9cf52e24a">changeset</a> |
+file |
+<a href="/furbani/ns-3-dce/file/tip/utils/clone_and_compile_ns3_dce.sh">latest</a> |
+<a href="/furbani/ns-3-dce/log/60a9cf52e24a/utils/clone_and_compile_ns3_dce.sh">revisions</a> |
+<a href="/furbani/ns-3-dce/annotate/60a9cf52e24a/utils/clone_and_compile_ns3_dce.sh">annotate</a> |
+<a href="/furbani/ns-3-dce/diff/60a9cf52e24a/utils/clone_and_compile_ns3_dce.sh">diff</a> |
+<a href="/furbani/ns-3-dce/raw-file/60a9cf52e24a/utils/clone_and_compile_ns3_dce.sh">raw</a> |
+<a href="/furbani/ns-3-dce/help">help</a>
+<br/>
+</div>
+
+<div class="title">utils/clone_and_compile_ns3_dce.sh</div>
+
+<div class="title_text">
+<table cellspacing="0">
+<tr>
+ <td>author</td>
+ <td>frederic.urbani@inria.fr</td></tr>
+<tr>
+ <td></td>
+ <td>Tue Dec 13 10:51:45 2011 +0100 (3 hours ago)</td></tr>
+
+<tr>
+ <td>changeset 204</td>
+ <td style="font-family:monospace"><a class="list" href="/furbani/ns-3-dce/rev/60a9cf52e24a">60a9cf52e24a</a></td></tr>
+
+<tr>
+<td>parent 203</td>
+<td style="font-family:monospace">
+<a class="list" href="/furbani/ns-3-dce/file/84a1955f45cf/utils/clone_and_compile_ns3_dce.sh">
+84a1955f45cf
+</a>
+</td>
+</tr>
+
+<tr>
+ <td>permissions</td>
+ <td style="font-family:monospace">-rwxr-xr-x</td></tr>
+</table>
+</div>
+
+<div class="page_path">
+Fix kernel mode and tests.
+</div>
+
+<div class="page_body">
+
+<div style="font-family:monospace" class="parity0">
+<pre><a class="linenr" href="#l1" id="l1"> 1</a> #!/bin/bash
+</pre>
+</div>
+<div style="font-family:monospace" class="parity1">
+<pre><a class="linenr" href="#l2" id="l2"> 2</a> # this script checkout NS3 and DCE sources, and build them.
+</pre>
+</div>
+<div style="font-family:monospace" class="parity0">
+<pre><a class="linenr" href="#l3" id="l3"> 3</a> USE_KERNEL=NO
+</pre>
+</div>
+<div style="font-family:monospace" class="parity1">
+<pre><a class="linenr" href="#l4" id="l4"> 4</a> cd `dirname $BASH_SOURCE`/../..
+</pre>
+</div>
+<div style="font-family:monospace" class="parity0">
+<pre><a class="linenr" href="#l5" id="l5"> 5</a> SAVE_PATH=$PATH
+</pre>
+</div>
+<div style="font-family:monospace" class="parity1">
+<pre><a class="linenr" href="#l6" id="l6"> 6</a> SAVE_LDLP=$LD_LIBRARY_PATH
+</pre>
+</div>
+<div style="font-family:monospace" class="parity0">
+<pre><a class="linenr" href="#l7" id="l7"> 7</a> SAVE_PKG=$PKG_CONFIG_PATH
+</pre>
+</div>
+<div style="font-family:monospace" class="parity1">
+<pre><a class="linenr" href="#l8" id="l8"> 8</a> #echo clone ns-3-dce :
+</pre>
+</div>
+<div style="font-family:monospace" class="parity0">
+<pre><a class="linenr" href="#l9" id="l9"> 9</a> #hg clone http://code.nsnam.org/furbani/ns-3-dce
+</pre>
+</div>
+<div style="font-family:monospace" class="parity1">
+<pre><a class="linenr" href="#l10" id="l10"> 10</a> echo clone readversiondef
+</pre>
+</div>
+<div style="font-family:monospace" class="parity0">
+<pre><a class="linenr" href="#l11" id="l11"> 11</a> hg clone http://code.nsnam.org/mathieu/readversiondef
+</pre>
+</div>
+<div style="font-family:monospace" class="parity1">
+<pre><a class="linenr" href="#l12" id="l12"> 12</a> if [ "YES" == "$USE_KERNEL" ]
+</pre>
+</div>
+<div style="font-family:monospace" class="parity0">
+<pre><a class="linenr" href="#l13" id="l13"> 13</a> then
+</pre>
+</div>
+<div style="font-family:monospace" class="parity1">
+<pre><a class="linenr" href="#l14" id="l14"> 14</a> echo clone ns-3-linux
+</pre>
+</div>
+<div style="font-family:monospace" class="parity0">
+<pre><a class="linenr" href="#l15" id="l15"> 15</a> hg clone http://code.nsnam.org/furbani/ns-3-linux
+</pre>
+</div>
+<div style="font-family:monospace" class="parity1">
+<pre><a class="linenr" href="#l16" id="l16"> 16</a> fi
+</pre>
+</div>
+<div style="font-family:monospace" class="parity0">
+<pre><a class="linenr" href="#l17" id="l17"> 17</a> echo clone ns-3-dev
+</pre>
+</div>
+<div style="font-family:monospace" class="parity1">
+<pre><a class="linenr" href="#l18" id="l18"> 18</a> hg clone http://code.nsnam.org/ns-3-dev -r 027aae146ae2
+</pre>
+</div>
+<div style="font-family:monospace" class="parity0">
+<pre><a class="linenr" href="#l19" id="l19"> 19</a> mkdir build
+</pre>
+</div>
+<div style="font-family:monospace" class="parity1">
+<pre><a class="linenr" href="#l20" id="l20"> 20</a> cd ns-3-dev
+</pre>
+</div>
+<div style="font-family:monospace" class="parity0">
+<pre><a class="linenr" href="#l21" id="l21"> 21</a> patch -p1 <../ns-3-dce/utils/packet-socket-upgrade-exp.patch
+</pre>
+</div>
+<div style="font-family:monospace" class="parity1">
+<pre><a class="linenr" href="#l22" id="l22"> 22</a> patch -p1 <../ns-3-dce/utils/0001-Replace-references-to-m_recvpktinfo-with-method-call.patch
+</pre>
+</div>
+<div style="font-family:monospace" class="parity0">
+<pre><a class="linenr" href="#l23" id="l23"> 23</a> patch -p1 <../ns-3-dce/utils/0002-A-new-templated-static-method-Ipv4RoutingHelper-GetR.patch
+</pre>
+</div>
+<div style="font-family:monospace" class="parity1">
+<pre><a class="linenr" href="#l24" id="l24"> 24</a> ./waf configure --prefix=`pwd`/../build --enable-tests
+</pre>
+</div>
+<div style="font-family:monospace" class="parity0">
+<pre><a class="linenr" href="#l25" id="l25"> 25</a> ./waf
+</pre>
+</div>
+<div style="font-family:monospace" class="parity1">
+<pre><a class="linenr" href="#l26" id="l26"> 26</a> ./waf install
+</pre>
+</div>
+<div style="font-family:monospace" class="parity0">
+<pre><a class="linenr" href="#l27" id="l27"> 27</a> cd ..
+</pre>
+</div>
+<div style="font-family:monospace" class="parity1">
+<pre><a class="linenr" href="#l28" id="l28"> 28</a> export PATH=$SAVE_PATH:`pwd`/build/bin
+</pre>
+</div>
+<div style="font-family:monospace" class="parity0">
+<pre><a class="linenr" href="#l29" id="l29"> 29</a> export LD_LIBRARY_PATH=$SAVE_LDLP:`pwd`/build/lib
+</pre>
+</div>
+<div style="font-family:monospace" class="parity1">
+<pre><a class="linenr" href="#l30" id="l30"> 30</a> export PKG_CONFIG_PATH=$SAVE_PKG:`pwd`/build/lib/pkgconfig
+</pre>
+</div>
+<div style="font-family:monospace" class="parity0">
+<pre><a class="linenr" href="#l31" id="l31"> 31</a> cd readversiondef/
+</pre>
+</div>
+<div style="font-family:monospace" class="parity1">
+<pre><a class="linenr" href="#l32" id="l32"> 32</a> make
+</pre>
+</div>
+<div style="font-family:monospace" class="parity0">
+<pre><a class="linenr" href="#l33" id="l33"> 33</a> make install PREFIX=`pwd`/../build/
+</pre>
+</div>
+<div style="font-family:monospace" class="parity1">
+<pre><a class="linenr" href="#l34" id="l34"> 34</a> cd ..
+</pre>
+</div>
+<div style="font-family:monospace" class="parity0">
+<pre><a class="linenr" href="#l35" id="l35"> 35</a> if [ "YES" == "$USE_KERNEL" ]
+</pre>
+</div>
+<div style="font-family:monospace" class="parity1">
+<pre><a class="linenr" href="#l36" id="l36"> 36</a> then
+</pre>
+</div>
+<div style="font-family:monospace" class="parity0">
+<pre><a class="linenr" href="#l37" id="l37"> 37</a> cd ns-3-linux/
+</pre>
+</div>
+<div style="font-family:monospace" class="parity1">
+<pre><a class="linenr" href="#l38" id="l38"> 38</a> # git clone git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6.git net-next-2.6
+</pre>
+</div>
+<div style="font-family:monospace" class="parity0">
+<pre><a class="linenr" href="#l39" id="l39"> 39</a> git clone git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git net-next-2.6
+</pre>
+</div>
+<div style="font-family:monospace" class="parity1">
+<pre><a class="linenr" href="#l40" id="l40"> 40</a> make unpatch
+</pre>
+</div>
+<div style="font-family:monospace" class="parity0">
+<pre><a class="linenr" href="#l41" id="l41"> 41</a> make setup
+</pre>
+</div>
+<div style="font-family:monospace" class="parity1">
+<pre><a class="linenr" href="#l42" id="l42"> 42</a> make defconfig
+</pre>
+</div>
+<div style="font-family:monospace" class="parity0">
+<pre><a class="linenr" href="#l43" id="l43"> 43</a> make config
+</pre>
+</div>
+<div style="font-family:monospace" class="parity1">
+<pre><a class="linenr" href="#l44" id="l44"> 44</a> sed s/CONFIG_PACKET=m/CONFIG_PACKET=y/ config >c2
+</pre>
+</div>
+<div style="font-family:monospace" class="parity0">
+<pre><a class="linenr" href="#l45" id="l45"> 45</a> rm config
+</pre>
+</div>
+<div style="font-family:monospace" class="parity1">
+<pre><a class="linenr" href="#l46" id="l46"> 46</a> mv c2 config
+</pre>
+</div>
+<div style="font-family:monospace" class="parity0">
+<pre><a class="linenr" href="#l47" id="l47"> 47</a> make
+</pre>
+</div>
+<div style="font-family:monospace" class="parity1">
+<pre><a class="linenr" href="#l48" id="l48"> 48</a> cd ..
+</pre>
+</div>
+<div style="font-family:monospace" class="parity0">
+<pre><a class="linenr" href="#l49" id="l49"> 49</a> # wget http://devresources.linuxfoundation.org/dev/iproute2/download/iproute2-2.6.33.tar.bz2
+</pre>
+</div>
+<div style="font-family:monospace" class="parity1">
+<pre><a class="linenr" href="#l50" id="l50"> 50</a> wget http://www.linuxgrill.com/anonymous/iproute2/NEW-OSDL/iproute2-2.6.38.tar.bz2
+</pre>
+</div>
+<div style="font-family:monospace" class="parity0">
+<pre><a class="linenr" href="#l51" id="l51"> 51</a> # tar jxf iproute2-2.6.33.tar.bz2
+</pre>
+</div>
+<div style="font-family:monospace" class="parity1">
+<pre><a class="linenr" href="#l52" id="l52"> 52</a> tar jxf iproute2-2.6.38.tar.bz2
+</pre>
+</div>
+<div style="font-family:monospace" class="parity0">
+<pre><a class="linenr" href="#l53" id="l53"> 53</a> # cd iproute2-2.6.33
+</pre>
+</div>
+<div style="font-family:monospace" class="parity1">
+<pre><a class="linenr" href="#l54" id="l54"> 54</a> cd iproute2-2.6.38
+</pre>
+</div>
+<div style="font-family:monospace" class="parity0">
+<pre><a class="linenr" href="#l55" id="l55"> 55</a> ./configure
+</pre>
+</div>
+<div style="font-family:monospace" class="parity1">
+<pre><a class="linenr" href="#l56" id="l56"> 56</a> LDFLAGS=-pie make CCOPTS='-fpic -D_GNU_SOURCE -O0 -U_FORTIFY_SOURCE'
+</pre>
+</div>
+<div style="font-family:monospace" class="parity0">
+<pre><a class="linenr" href="#l57" id="l57"> 57</a> cd ../ns-3-dce
+</pre>
+</div>
+<div style="font-family:monospace" class="parity1">
+<pre><a class="linenr" href="#l58" id="l58"> 58</a> mkdir -p build/bin_dce
+</pre>
+</div>
+<div style="font-family:monospace" class="parity0">
+<pre><a class="linenr" href="#l59" id="l59"> 59</a> cd build/bin_dce
+</pre>
+</div>
+<div style="font-family:monospace" class="parity1">
+<pre><a class="linenr" href="#l60" id="l60"> 60</a> ln -s ../../../ns-3-linux/libnet-next-2.6.so
+</pre>
+</div>
+<div style="font-family:monospace" class="parity0">
+<pre><a class="linenr" href="#l61" id="l61"> 61</a> # ln -s ../iproute2-2.6.33/ip/ip
+</pre>
+</div>
+<div style="font-family:monospace" class="parity1">
+<pre><a class="linenr" href="#l62" id="l62"> 62</a> ln -s ../../../iproute2-2.6.38/ip/ip
+</pre>
+</div>
+<div style="font-family:monospace" class="parity0">
+<pre><a class="linenr" href="#l63" id="l63"> 63</a> cd ../../example/ccnx
+</pre>
+</div>
+<div style="font-family:monospace" class="parity1">
+<pre><a class="linenr" href="#l64" id="l64"> 64</a> ln -s ../../build/bin_dce/libnet-next-2.6.so
+</pre>
+</div>
+<div style="font-family:monospace" class="parity0">
+<pre><a class="linenr" href="#l65" id="l65"> 65</a> # ln -s ../../ip
+</pre>
+</div>
+<div style="font-family:monospace" class="parity1">
+<pre><a class="linenr" href="#l66" id="l66"> 66</a> cd ../..
+</pre>
+</div>
+<div style="font-family:monospace" class="parity0">
+<pre><a class="linenr" href="#l67" id="l67"> 67</a> fi
+</pre>
+</div>
+<div style="font-family:monospace" class="parity1">
+<pre><a class="linenr" href="#l68" id="l68"> 68</a> cd ns-3-dce/
+</pre>
+</div>
+<div style="font-family:monospace" class="parity0">
+<pre><a class="linenr" href="#l69" id="l69"> 69</a> if [ "YES" == "$USE_KERNEL" ]
+</pre>
+</div>
+<div style="font-family:monospace" class="parity1">
+<pre><a class="linenr" href="#l70" id="l70"> 70</a> then
+</pre>
+</div>
+<div style="font-family:monospace" class="parity0">
+<pre><a class="linenr" href="#l71" id="l71"> 71</a> WAF_KERNEL=--enable-kernel-stack=`pwd`/../ns-3-linux
+</pre>
+</div>
+<div style="font-family:monospace" class="parity1">
+<pre><a class="linenr" href="#l72" id="l72"> 72</a> fi
+</pre>
+</div>
+<div style="font-family:monospace" class="parity0">
+<pre><a class="linenr" href="#l73" id="l73"> 73</a> ./waf configure --prefix=`pwd`/../build --verbose $WAF_KERNEL
+</pre>
+</div>
+<div style="font-family:monospace" class="parity1">
+<pre><a class="linenr" href="#l74" id="l74"> 74</a> ./waf
+</pre>
+</div>
+<div style="font-family:monospace" class="parity0">
+<pre><a class="linenr" href="#l75" id="l75"> 75</a> ./waf install
+</pre>
+</div>
+<div style="font-family:monospace" class="parity1">
+<pre><a class="linenr" href="#l76" id="l76"> 76</a> export LD_LIBRARY_PATH=$SAVE_LDLP:`pwd`/build/lib:`pwd`/build/bin:`pwd`/../build/lib
+</pre>
+</div>
+<div style="font-family:monospace" class="parity0">
+<pre><a class="linenr" href="#l77" id="l77"> 77</a> . utils/setenv.sh
+</pre>
+</div>
+<div style="font-family:monospace" class="parity1">
+<pre><a class="linenr" href="#l78" id="l78"> 78</a> echo Launch NS3TEST-DCE
+</pre>
+</div>
+<div style="font-family:monospace" class="parity0">
+<pre><a class="linenr" href="#l79" id="l79"> 79</a> ./build/bin/ns3test-dce --verbose
+</pre>
+</div>
+<div style="font-family:monospace" class="parity1">
+<pre><a class="linenr" href="#l80" id="l80"> 80</a>
+</pre>
+</div>
+<div style="font-family:monospace" class="parity0">
+<pre><a class="linenr" href="#l81" id="l81"> 81</a>
+</pre>
+</div>
+<div style="font-family:monospace" class="parity1">
+<pre><a class="linenr" href="#l82" id="l82"> 82</a>
+</pre>
+</div>
+<div style="font-family:monospace" class="parity0">
+<pre><a class="linenr" href="#l83" id="l83"> 83</a>
+</pre>
+</div>
+<div style="font-family:monospace" class="parity1">
+<pre><a class="linenr" href="#l84" id="l84"> 84</a>
+</pre>
+</div>
+</div>
+
+<div class="page_footer">
+<div class="page_footer_text">furbani/ns-3-dce</div>
+<div class="rss_logo">
+<a href="/furbani/ns-3-dce/rss-log">RSS</a>
+<a href="/furbani/ns-3-dce/atom-log">Atom</a>
+</div>
+<br />
+
+</div>
+</body>
+</html>
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test.xml Mon Jan 23 11:48:40 2012 +0100
@@ -0,0 +1,1 @@
+<configuration bakefile="/auto/sop-nas2a/u/sop-nas2a/vol/home_planete/dcamara/INRIA/repos/bake/test.xml" installdir="build" objdir="objdir" relative_directory_root="." sourcedir="source"><enabled name="click-1.8.0" /><modules><module name="click-1.8.0"><source type="archive"><attribute name="url" value="http://read.cs.ucla.edu/click/click-1.8.0.tar.gz" /></source><build type="autotools"><attribute name="configure_arguments" value="--enable-userlevel --disable-linuxmodule --enable-nsclick --enable-wifi" /><attribute name="maintainer" value="no" /><attribute name="CFLAGS" value="" /><attribute name="CC" value="" /><attribute name="CXXFLAGS" value="" /><attribute name="CXX" value="" /><attribute name="LDFLAGS" value="" /><attribute name="objdir" value="no" /></build></module></modules></configuration>
\ No newline at end of file
--- a/test/build.py Fri Nov 18 14:12:31 2011 +0100
+++ b/test/build.py Mon Jan 23 11:48:40 2012 +0100
@@ -190,11 +190,6 @@
created = re.compile('\d+').search(testStatus).group()
self.assertNotEqual(created, "0")
-
-
-
-
-
# TODO:
# test if the object dir is equal to the source dir, for the open flow
# case it is not allowed but I am not sure for everyone else
@@ -297,6 +292,65 @@
# testResult = waf._is_1_6_x(self._env)
# self.assertFalse(testResult)
+ def test_CmakeModule(self):
+ """Tests the WafModuleBuild Class from ModuleBuild. """
+
+ cmake = ModuleBuild.create("cmake")
+ self.assertNotEqual(cmake, None)
+ self.assertEqual(cmake.name(), "cmake")
+
+ # Environment settings
+ cvs = ModuleSource.create("cvs")
+ testResult = cvs.check_version(self._env)
+ self.assertTrue(testResult)
+ cvs.attribute("root").value = ":pserver:anoncvs:@www.gccxml.org:/cvsroot/GCC_XML"
+ cvs.attribute("module").value="gccxml"
+ cvs.attribute("date").value="2009-09-21"
+
+ self._env._module_name="gccxml"
+ self._logger.set_current_module(self._env._module_name)
+# bazaar.attribute("revision").value = "revno:795"
+
+ testStatus = commands.getoutput('mkdir /tmp/source')
+ testResult = cvs.download(self._env)
+ self.assertEqual(testResult, None)
+
+ #check that has the cmake version required is installed in the machine
+ testResult = cmake.check_version(self._env)
+ self.assertTrue(testResult)
+
+ # Expected case test
+
+ self._env.objdir = self._env.srcdir+"/object"
+ testStatus = commands.getoutput('rm -rf /tmp/source/gccxml/object')
+ testResult = cmake.build(self._env, "1")
+ self.assertEqual(testResult, None)
+ testStatus = commands.getoutput('ls /tmp/source/gccxml/object|wc')
+ created = re.compile('\d+').search(testStatus).group()
+ self.assertNotEqual(created, "0")
+
+ # call the clean to remove the build
+ # TODO: Find a solution for the remaining directories
+ # - It is strange because the waf does not remove the directories,
+ # just the object files.... Should this be like that??!?!
+ testResult = cmake.clean(self._env)
+ self.assertEqual(testResult, None)
+ testStatus = commands.getoutput('ls /tmp/source/gccxml/object/GCC/gcc/CMakeFiles/backend.dir/*.o|wc')
+ created = re.compile('\d+').search(testStatus).group()
+ self.assertEqual(created, "0")
+
+ # TODO: neighter the --generate-version appears but I couldn't also
+ # find a configuration argument for pybindgen :(
+ # Call with extra options
+ cmake.attribute("CFLAGS").value = "-g"
+# waf.attribute("configure_arguments").value = "--enable-examples --enable-tests"
+ cmake.attribute("build_arguments").value = "--generate-version"
+
+ testResult = cmake.build(self._env, "1")
+ self.assertEqual(testResult, None)
+ testStatus = commands.getoutput('ls -l /tmp/source/openflow-ns3/object|wc')
+ created = re.compile('\d+').search(testStatus).group()
+ self.assertNotEqual(created, "0")
# main call for the tests
if __name__ == '__main__':
--- a/test/source.py Fri Nov 18 14:12:31 2011 +0100
+++ b/test/source.py Mon Jan 23 11:48:40 2012 +0100
@@ -33,7 +33,7 @@
print (inst) # the exception instance
self.fail("Could not execute command %s over directory %s failed" % (command, dir))
- def test_generalFailures(self):
+ def Disable_test_generalFailures(self):
"""Tests Some general failures that could happen in the Module Source. """
#Verifies the return of the creation of a non existent module
@@ -183,7 +183,7 @@
# testStatus = commands.getoutput('chmod 755 /tmp/click-1.8.0; rm -rf /tmp/click-1.8.0')
- def test_mercurial(self):
+ def Disable_test_mercurial(self):
"""Tests the MercurialModuleSource class. """
# it first needs to be able to create the class otherwise will not be
@@ -308,7 +308,7 @@
# last clean up
self.executeCommand(["rm", "-rf", "bake"], "/tmp")
- def test_bazaar(self):
+ def Disable_test_bazaar(self):
"""Tests the BazaarModuleSource class. """
# checks if can create the class
@@ -498,6 +498,7 @@
#after the test, clean the environment
self.executeCommand(["rm", "-rf", "gccxml"], "/tmp")
+
# download a specific version
cvs.attribute("date").value="2007-09-21"
@@ -595,7 +596,7 @@
# last clean up
self.executeCommand(["rm", "-rf", "gccxml"], "/tmp")
- def test_git(self):
+ def Disable_test_git(self):
"""Tests the GitModuleSource. """
# checks if can create the class
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test2.xml Mon Jan 23 11:48:40 2012 +0100
@@ -0,0 +1,1 @@
+<configuration bakefile="/auto/sop-nas2a/u/sop-nas2a/vol/home_planete/dcamara/INRIA/repos/bake/test2.xml" installdir="build" objdir="objdir" relative_directory_root="." sourcedir="source"><enabled name="openflow-ns3" /><modules><module name="openflow-ns3"><source type="mercurial"><attribute name="url" value="http://code.nsnam.org/bhurd/openflow" /><attribute name="revision" value="tip" /></source><build type="waf"><attribute name="configure_arguments" value="" /><attribute name="CFLAGS" value="" /><attribute name="CC" value="" /><attribute name="build_arguments" value="build" /><attribute name="CXXFLAGS" value="" /><attribute name="CXX" value="" /><attribute name="LDFLAGS" value="" /><attribute name="objdir" value="no" /></build></module></modules></configuration>
\ No newline at end of file