From b656a0cab7ef7e631f671bc867f14e1c428b2872 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vedran=20Mileti=C4=87?= Date: Sat, 6 Apr 2013 14:58:48 +0200 Subject: [PATCH 1/6] Introduce compound name for static TestSuite declaration and be stricter about allowed module name --- src/create-module.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/create-module.py b/src/create-module.py index de716ef53..dc8fd8f13 100755 --- a/src/create-module.py +++ b/src/create-module.py @@ -201,11 +201,12 @@ public: %(CAPITALIZED)sTestSuite::%(CAPITALIZED)sTestSuite () : TestSuite ("%(MODULE)s", UNIT) { - AddTestCase (new %(CAPITALIZED)sTestCase1); + // TestDuration for TestCase can be QUICK, EXTENSIVE or TAKES_FOREVER + AddTestCase (new %(CAPITALIZED)sTestCase1, TestCase::QUICK); } // Do not forget to allocate an instance of this TestSuite -static %(CAPITALIZED)sTestSuite %(MODULE)sTestSuite; +static %(CAPITALIZED)sTestSuite %(COMPOUND)sTestSuite; ''' @@ -318,7 +319,10 @@ def main(argv): parser.print_help() return 1 - modname = args[0] + modname = args[0].lower() + if False in [word.isalnum() for word in modname.split("-")]: + print >> sys.stderr, "Module name should only contain alphanumeric characters and dashes" + return 2 assert os.path.sep not in modname moduledir = os.path.join(os.path.dirname(__file__), modname) @@ -327,6 +331,8 @@ def main(argv): print >> sys.stderr, "Module %r already exists" % (modname,) return 2 + print "Creating module %r" % (modname,) + os.mkdir(moduledir) wscript = file(os.path.join(moduledir, "wscript"), "wt") wscript.write(WSCRIPT_TEMPLATE % dict(MODULE=modname)) @@ -355,7 +361,10 @@ def main(argv): testdir = os.path.join(moduledir, "test") os.mkdir(testdir) test_cc = file(os.path.join(moduledir, "test", "%s-test-suite.cc" % modname), "wt") - test_cc.write(TEST_CC_TEMPLATE % dict(MODULE=modname, CAPITALIZED=''.join([word.capitalize() for word in modname.split('-')]))) + test_cc.write(TEST_CC_TEMPLATE % dict(MODULE=modname, + CAPITALIZED=''.join([word.capitalize() for word in modname.split('-')]), + COMPOUND=''.join([modname.split('-')[0]] + [word.capitalize() for word in modname.split('-')[1:]]), + )) test_cc.close() From 41cc7abc1e94eecdb9b1a61f7971236fdd335ab1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vedran=20Mileti=C4=87?= Date: Sat, 6 Apr 2013 15:05:18 +0200 Subject: [PATCH 2/6] Update release notes about Waf and create-module.py changes --- RELEASE_NOTES | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 937a15f66..3e7d1e9c6 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -25,6 +25,10 @@ New user-visible features - ns-3-click: it's now possible to (i) have Click pull random numbers from ns-3 and (ii) have ns-3 set "defines" in Click via the simulation file (see src/click/examples/nsclick-defines.cc). +- Waf shipped with ns-3 has been upgraded to version 1.7.10 and custom + pkg-config generator has been replaced by Waf's builtin tool. +- create-module.py script has been updated to work with waf 1.7 and support + for creating modules with names containing dashes has been added. Bugs fixed ---------- From 346a7252400831e7d15b3866fbee77680718b5c7 Mon Sep 17 00:00:00 2001 From: Hajime Tazaki Date: Sat, 6 Apr 2013 23:08:12 +0900 Subject: [PATCH 3/6] Bug 1612 - pyviz (visualizer) will not be installed --- src/visualizer/wscript | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/visualizer/wscript b/src/visualizer/wscript index 618380064..77526c48f 100644 --- a/src/visualizer/wscript +++ b/src/visualizer/wscript @@ -71,4 +71,27 @@ def build(bld): ]) headers.source.append('model/pyviz.h') + vissrc = [ + 'visualizer/base.py', + 'visualizer/core.py', + 'visualizer/higcontainer.py', + 'visualizer/hud.py', + 'visualizer/__init__.py', + 'visualizer/svgitem.py', + ] + pyviz = bld(features='py') + pyviz.source = vissrc + pyviz.install_path = '${PYTHONARCHDIR}/visualizer' + + visplugin_src = [ + 'visualizer/plugins/interface_statistics.py', + 'visualizer/plugins/ipv4_routing_table.py', + 'visualizer/plugins/olsr.py', + 'visualizer/plugins/show_last_packets.py', + 'visualizer/plugins/wifi_intrastructure_link.py' + ] + pyvizplug = bld(features='py') + pyvizplug.source = visplugin_src + pyvizplug.install_path = '${PYTHONARCHDIR}/visualizer/plugins' + bld.ns3_python_bindings() From 792e59bf389c35fcf0b545ba0cd4eeae3b8ed5f0 Mon Sep 17 00:00:00 2001 From: Hajime Tazaki Date: Sat, 6 Apr 2013 23:08:13 +0900 Subject: [PATCH 4/6] Bug 1409: Add an attribute "SystemId" to configure the ID for MPI --- src/network/model/node.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/network/model/node.cc b/src/network/model/node.cc index 7320d4535..bd76674ef 100644 --- a/src/network/model/node.cc +++ b/src/network/model/node.cc @@ -62,6 +62,11 @@ Node::GetTypeId (void) UintegerValue (0), MakeUintegerAccessor (&Node::m_id), MakeUintegerChecker ()) + .AddAttribute ("SystemId", "The systemId of this node: a unique integer used for parallel simulations.", + TypeId::ATTR_GET|TypeId::ATTR_SET, + UintegerValue (0), + MakeUintegerAccessor (&Node::m_sid), + MakeUintegerChecker ()) ; return tid; } From 4c6177b67142ac70200fd264216cd9cb2d8ba278 Mon Sep 17 00:00:00 2001 From: Hajime Tazaki Date: Sat, 6 Apr 2013 23:24:25 +0900 Subject: [PATCH 5/6] update release note for Bug 1409 and Bug 1612 --- RELEASE_NOTES | 2 ++ 1 file changed, 2 insertions(+) diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 3e7d1e9c6..e649997ff 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -35,6 +35,8 @@ Bugs fixed - bug 1566 - WiFi SNR tag improvements - Bug 1582 - IPv6 raw socket return value is not like Linux socket - bug 1585 - Length field of A-MSDU subframe header endianness +- Bug 1409 - Add an attribute "SystemId" to configure the ID for MPI +- Bug 1612 - pyviz (visualizer) will not be installed Known issues ------------ From 44e8b40ac91c35f4c139d7f73c95a5b864ac7d60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vedran=20Mileti=C4=87?= Date: Sat, 6 Apr 2013 17:54:20 +0200 Subject: [PATCH 6/6] Rename SequenceNumber TestSuite to sequence-number for consistency --- src/network/test/sequence-number-test-suite.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/network/test/sequence-number-test-suite.cc b/src/network/test/sequence-number-test-suite.cc index 725108fe7..7ec604bfe 100644 --- a/src/network/test/sequence-number-test-suite.cc +++ b/src/network/test/sequence-number-test-suite.cc @@ -78,7 +78,7 @@ public: }; SequenceNumberTestCase::SequenceNumberTestCase () - : TestCase ("SequenceNumber") + : TestCase ("Sequence number test case") { m_oldval = 0; m_newval = 0; @@ -184,7 +184,7 @@ static class SequenceNumberTestSuite : public TestSuite { public: SequenceNumberTestSuite () - : TestSuite ("SequenceNumber", UNIT) + : TestSuite ("sequence-number", UNIT) { AddTestCase (new SequenceNumberTestCase (), TestCase::QUICK); }