--- a/src/brite/conf_files/ASBarabasi.conf Wed Jun 01 10:31:49 2011 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-#This config file was generated by the GUI.
-
-BriteConfig
-
-BeginModel
- Name = 4 #Router Barabasi=2, AS Barabasi =4
- N = 1000 #Number of nodes in graph
- HS = 1000 #Size of main plane (number of squares)
- LS = 100 #Size of inner planes (number of squares)
- NodePlacement = 1 #Random = 1, Heavy Tailed = 2
- m = 2 #Number of neighboring node each new node connects to.
- BWDist = 1 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
- BWMin = 10.0
- BWMax = 1024.0
-EndModel
-
-
-BeginOutput #**Atleast one of these options should have value 1**
- BRITE = 1 #0 = Do not save as BRITE, 1 = save as BRITE.
- OTTER = 0 #0 = Do not visualize with Otter, 1 = Visualize
-EndOutput
--- a/src/brite/conf_files/ASWaxman.conf Wed Jun 01 10:31:49 2011 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-#This config file was generated by the GUI.
-
-BriteConfig
-
-BeginModel
- Name = 3 #Router Waxman = 1, AS Waxman = 3
- N = 1000 #Number of nodes in graph
- HS = 1000 #Size of main plane (number of squares)
- LS = 100 #Size of inner planes (number of squares)
- NodePlacement = 1 #Random = 1, Heavy Tailed = 2
- GrowthType = 1 #Incremental = 1, All = 2
- m = 2 #Number of neighboring node each new node connects to.
- alpha = 0.15 #Waxman Parameter
- beta = 0.2 #Waxman Parameter
- BWDist = 1 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
- BWMin = 10.0
- BWMax = 1024.0
-EndModel
-
-BeginOutput #**Atleast one of these options should have value 1**
- BRITE = 1 #0 = Do not save as BRITE, 1 = save as BRITE.
- OTTER = 0 #0 = Do not visualize with Otter, 1 = Visualize
-EndOutput
--- a/src/brite/conf_files/RTBarabasi.conf Wed Jun 01 10:31:49 2011 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-#This config file was generated by the GUI.
-
-BriteConfig
-
-BeginModel
- Name = 2 #Router Barabasi=2, AS Barabasi =4
- N = 100 #Number of nodes in graph
- HS = 1000 #Size of main plane (number of squares)
- LS = 100 #Size of inner planes (number of squares)
- NodePlacement = 1 #Random = 1, Heavy Tailed = 2
- m = 2 #Number of neighboring node each new node connects to.
- BWDist = 1 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
- BWMin = 10.0
- BWMax = 1024.0
-EndModel
-
-
-
-BeginOutput #**Atleast one of these options should have value 1**
- BRITE = 1 #0 = Do not save as BRITE, 1 = save as BRITE.
- OTTER = 0 #0 = Do not visualize with Otter, 1 = Visualize
-EndOutput
--- a/src/brite/conf_files/RTBarabasi10.conf Wed Jun 01 10:31:49 2011 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-#This config file was generated by the GUI.
-
-BriteConfig
-
-BeginModel
- Name = 2 #Router Barabasi=2, AS Barabasi =4
- N = 10 #Number of nodes in graph
- HS = 1000 #Size of main plane (number of squares)
- LS = 100 #Size of inner planes (number of squares)
- NodePlacement = 1 #Random = 1, Heavy Tailed = 2
- m = 2 #Number of neighboring node each new node connects to.
- BWDist = 1 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
- BWMin = 10.0
- BWMax = 1024.0
-EndModel
-
-
-
-BeginOutput #**Atleast one of these options should have value 1**
- BRITE = 1 #0 = Do not save as BRITE, 1 = save as BRITE.
- OTTER = 0 #0 = Do not visualize with Otter, 1 = Visualize
-EndOutput
--- a/src/brite/conf_files/RTBarabasi20.conf Wed Jun 01 10:31:49 2011 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-#This config file was generated by the GUI.
-
-BriteConfig
-
-BeginModel
- Name = 2 #Router Barabasi=2, AS Barabasi =4
- N = 20 #Number of nodes in graph
- HS = 1000 #Size of main plane (number of squares)
- LS = 100 #Size of inner planes (number of squares)
- NodePlacement = 1 #Random = 1, Heavy Tailed = 2
- m = 2 #Number of neighboring node each new node connects to.
- BWDist = 1 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
- BWMin = 10.0
- BWMax = 1024.0
-EndModel
-
-
-
-BeginOutput #**Atleast one of these options should have value 1**
- BRITE = 1 #0 = Do not save as BRITE, 1 = save as BRITE.
- OTTER = 1 #0 = Do not visualize with Otter, 1 = Visualize
-EndOutput
--- a/src/brite/conf_files/RTBarabasi5.conf Wed Jun 01 10:31:49 2011 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-#This config file was generated by the GUI.
-
-BriteConfig
-
-BeginModel
- Name = 2 #Router Barabasi=2, AS Barabasi =4
- N = 5 #Number of nodes in graph
- HS = 1000 #Size of main plane (number of squares)
- LS = 100 #Size of inner planes (number of squares)
- NodePlacement = 1 #Random = 1, Heavy Tailed = 2
- m = 2 #Number of neighboring node each new node connects to.
- BWDist = 1 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
- BWMin = 10.0
- BWMax = 1024.0
-EndModel
-
-
-
-BeginOutput #**Atleast one of these options should have value 1**
- BRITE = 1 #0 = Do not save as BRITE, 1 = save as BRITE.
- OTTER = 0 #0 = Do not visualize with Otter, 1 = Visualize
-EndOutput
--- a/src/brite/conf_files/RTWaxman.conf Wed Jun 01 10:31:49 2011 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-#This config file was generated by the GUI.
-
-BriteConfig
-
-BeginModel
- Name = 1 #Router Waxman = 1, AS Waxman = 3
- N = 1000 #Number of nodes in graph
- HS = 1000 #Size of main plane (number of squares)
- LS = 100 #Size of inner planes (number of squares)
- NodePlacement = 1 #Random = 1, Heavy Tailed = 2
- GrowthType = 1 #Incremental = 1, All = 2
- m = 2 #Number of neighboring node each new node connects to.
- alpha = 0.15 #Waxman Parameter
- beta = 0.2 #Waxman Parameter
- BWDist = 1 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
- BWMin = 10.0
- BWMax = 1024.0
-EndModel
-
-
-
-BeginOutput #**Atleast one of these options should have value 1**
- BRITE = 1 #0 = Do not save as BRITE, 1 = save as BRITE.
- OTTER = 1 #0 = Do not visualize with Otter, 1 = Visualize
-EndOutput
--- a/src/brite/conf_files/RTWaxman10.conf Wed Jun 01 10:31:49 2011 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-#This config file was generated by the GUI.
-
-BriteConfig
-
-BeginModel
- Name = 1 #Router Waxman = 1, AS Waxman = 3
- N = 10 #Number of nodes in graph
- HS = 1000 #Size of main plane (number of squares)
- LS = 100 #Size of inner planes (number of squares)
- NodePlacement = 1 #Random = 1, Heavy Tailed = 2
- GrowthType = 1 #Incremental = 1, All = 2
- m = 2 #Number of neighboring node each new node connects to.
- alpha = 0.15 #Waxman Parameter
- beta = 0.2 #Waxman Parameter
- BWDist = 1 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
- BWMin = 10.0
- BWMax = 1024.0
-EndModel
-
-
-
-BeginOutput #**Atleast one of these options should have value 1**
- BRITE = 1 #0 = Do not save as BRITE, 1 = save as BRITE.
- OTTER = 0 #0 = Do not visualize with Otter, 1 = Visualize
-EndOutput
--- a/src/brite/conf_files/RTWaxman20.conf Wed Jun 01 10:31:49 2011 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-#This config file was generated by the GUI.
-
-BriteConfig
-
-BeginModel
- Name = 1 #Router Waxman = 1, AS Waxman = 3
- N = 20 #Number of nodes in graph
- HS = 1000 #Size of main plane (number of squares)
- LS = 100 #Size of inner planes (number of squares)
- NodePlacement = 1 #Random = 1, Heavy Tailed = 2
- GrowthType = 1 #Incremental = 1, All = 2
- m = 2 #Number of neighboring node each new node connects to.
- alpha = 0.15 #Waxman Parameter
- beta = 0.2 #Waxman Parameter
- BWDist = 1 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
- BWMin = 10.0
- BWMax = 1024.0
-EndModel
-
-
-
-BeginOutput #**Atleast one of these options should have value 1**
- BRITE = 1 #0 = Do not save as BRITE, 1 = save as BRITE.
- OTTER = 0 #0 = Do not visualize with Otter, 1 = Visualize
-EndOutput
--- a/src/brite/conf_files/RTWaxman5.conf Wed Jun 01 10:31:49 2011 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-#This config file was generated by the GUI.
-
-BriteConfig
-
-BeginModel
- Name = 1 #Router Waxman = 1, AS Waxman = 3
- N = 5 #Number of nodes in graph
- HS = 1000 #Size of main plane (number of squares)
- LS = 100 #Size of inner planes (number of squares)
- NodePlacement = 1 #Random = 1, Heavy Tailed = 2
- GrowthType = 1 #Incremental = 1, All = 2
- m = 2 #Number of neighboring node each new node connects to.
- alpha = 0.15 #Waxman Parameter
- beta = 0.2 #Waxman Parameter
- BWDist = 1 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
- BWMin = 10.0
- BWMax = 1024.0
-EndModel
-
-
-
-BeginOutput #**Atleast one of these options should have value 1**
- BRITE = 1 #0 = Do not save as BRITE, 1 = save as BRITE.
- OTTER = 0 #0 = Do not visualize with Otter, 1 = Visualize
-EndOutput
--- a/src/brite/conf_files/TD_ASBarabasi_RTWaxman.conf Wed Jun 01 10:31:49 2011 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-#This config file was generated by the GUI.
-
-BriteConfig
-
-BeginModel
- Name = 5 #Top Down = 5
- edgeConn = 2 #Random=1, Smallest Nonleaf = 2, Smallest Deg = 3, k-Degree=4
- k = -1 #Only needed if edgeConn is set to K-Degree, otherwise use -1
- BWInter = 1 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
- BWInterMin = 10.0
- BWInterMax = 1024.0
- BWIntra = 3 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
- BWIntraMin = 10.0
- BWIntraMax = 1024.0
-EndModel
-
-BeginModel
- Name = 4 #Router Barabasi=2, AS Barabasi =4
- N = 20 #Number of nodes in graph
- HS = 1000 #Size of main plane (number of squares)
- LS = 100 #Size of inner planes (number of squares)
- NodePlacement = 1 #Random = 1, Heavy Tailed = 2
- m = 10 #Number of neighboring node each new node connects to.
- BWDist = 1 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
- BWMin = -1.0
- BWMax = -1.0
-EndModel
-
-BeginModel
- Name = 1 #Router Waxman=2, AS Waxman =3
- N = 40 #Number of nodes in graph
- HS = 1000 #Size of main plane (number of squares)
- LS = 100 #Size of inner planes (number of squares)
- NodePlacement = 2 #Random = 1, Heavy Tailed = 2
- GrowthType = 1 #Incremental = 1, All = 2
- m = 1 #Number of neighboring node each new node connects to.
- alpha = 0.5 #Waxman Parameter
- beta = 0.8 #Waxman Parameter
- BWDist = 1 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
- BWMin = -1.0
- BWMax = -1.0
-EndModel
-
-
-
-BeginOutput #**Atleast one of these options should have value 1**
- BRITE = 1 #0 = Do not save as BRITE, 1 = save as BRITE.
- OTTER = 0 #0 = Do not visualize with Otter, 1 = Visualize
-EndOutput
-
--- a/src/brite/examples/brite-generic-example.cc Wed Jun 01 10:31:49 2011 -0400
+++ b/src/brite/examples/brite-generic-example.cc Wed Jun 01 13:03:21 2011 -0400
@@ -19,8 +19,10 @@
#include <string>
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
+#include "ns3/internet-module.h"
+#include "ns3/point-to-point-module.h"
#include "ns3/mobility-module.h"
+#include "ns3/applications-module.h"
#include "ns3/brite-module.h"
#include "ns3/ipv4-static-routing-helper.h"
#include "ns3/ipv4-list-routing-helper.h"
@@ -41,9 +43,9 @@
// BRITE needs a configuration file to build its graph. By default, this
// example will use the RTWaxman20.conf file. There are many others
// which can be found in the BRITE/conf_files directory
- std::string confFile = "../BRITE/conf_files/RTWaxman20.conf";
- std::string seedFile = "../BRITE/seed_file";
- std::string newseedFile = "../BRITE/newseed_file";
+ std::string confFile = "src/brite/examples/conf_files/RTWaxman20.conf";
+ std::string seedFile = "src/brite/examples/conf_files/seed_file";
+ std::string newseedFile = "src/brite/examples/conf_files/newseed_file";
bool verbose = false;
bool tracing = false;
bool nix = false;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/brite/examples/conf_files/ASBarabasi.conf Wed Jun 01 13:03:21 2011 -0400
@@ -0,0 +1,21 @@
+#This config file was generated by the GUI.
+
+BriteConfig
+
+BeginModel
+ Name = 4 #Router Barabasi=2, AS Barabasi =4
+ N = 1000 #Number of nodes in graph
+ HS = 1000 #Size of main plane (number of squares)
+ LS = 100 #Size of inner planes (number of squares)
+ NodePlacement = 1 #Random = 1, Heavy Tailed = 2
+ m = 2 #Number of neighboring node each new node connects to.
+ BWDist = 1 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
+ BWMin = 10.0
+ BWMax = 1024.0
+EndModel
+
+
+BeginOutput #**Atleast one of these options should have value 1**
+ BRITE = 1 #0 = Do not save as BRITE, 1 = save as BRITE.
+ OTTER = 0 #0 = Do not visualize with Otter, 1 = Visualize
+EndOutput
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/brite/examples/conf_files/ASWaxman.conf Wed Jun 01 13:03:21 2011 -0400
@@ -0,0 +1,23 @@
+#This config file was generated by the GUI.
+
+BriteConfig
+
+BeginModel
+ Name = 3 #Router Waxman = 1, AS Waxman = 3
+ N = 1000 #Number of nodes in graph
+ HS = 1000 #Size of main plane (number of squares)
+ LS = 100 #Size of inner planes (number of squares)
+ NodePlacement = 1 #Random = 1, Heavy Tailed = 2
+ GrowthType = 1 #Incremental = 1, All = 2
+ m = 2 #Number of neighboring node each new node connects to.
+ alpha = 0.15 #Waxman Parameter
+ beta = 0.2 #Waxman Parameter
+ BWDist = 1 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
+ BWMin = 10.0
+ BWMax = 1024.0
+EndModel
+
+BeginOutput #**Atleast one of these options should have value 1**
+ BRITE = 1 #0 = Do not save as BRITE, 1 = save as BRITE.
+ OTTER = 0 #0 = Do not visualize with Otter, 1 = Visualize
+EndOutput
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/brite/examples/conf_files/RTBarabasi.conf Wed Jun 01 13:03:21 2011 -0400
@@ -0,0 +1,22 @@
+#This config file was generated by the GUI.
+
+BriteConfig
+
+BeginModel
+ Name = 2 #Router Barabasi=2, AS Barabasi =4
+ N = 100 #Number of nodes in graph
+ HS = 1000 #Size of main plane (number of squares)
+ LS = 100 #Size of inner planes (number of squares)
+ NodePlacement = 1 #Random = 1, Heavy Tailed = 2
+ m = 2 #Number of neighboring node each new node connects to.
+ BWDist = 1 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
+ BWMin = 10.0
+ BWMax = 1024.0
+EndModel
+
+
+
+BeginOutput #**Atleast one of these options should have value 1**
+ BRITE = 1 #0 = Do not save as BRITE, 1 = save as BRITE.
+ OTTER = 0 #0 = Do not visualize with Otter, 1 = Visualize
+EndOutput
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/brite/examples/conf_files/RTBarabasi10.conf Wed Jun 01 13:03:21 2011 -0400
@@ -0,0 +1,22 @@
+#This config file was generated by the GUI.
+
+BriteConfig
+
+BeginModel
+ Name = 2 #Router Barabasi=2, AS Barabasi =4
+ N = 10 #Number of nodes in graph
+ HS = 1000 #Size of main plane (number of squares)
+ LS = 100 #Size of inner planes (number of squares)
+ NodePlacement = 1 #Random = 1, Heavy Tailed = 2
+ m = 2 #Number of neighboring node each new node connects to.
+ BWDist = 1 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
+ BWMin = 10.0
+ BWMax = 1024.0
+EndModel
+
+
+
+BeginOutput #**Atleast one of these options should have value 1**
+ BRITE = 1 #0 = Do not save as BRITE, 1 = save as BRITE.
+ OTTER = 0 #0 = Do not visualize with Otter, 1 = Visualize
+EndOutput
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/brite/examples/conf_files/RTBarabasi20.conf Wed Jun 01 13:03:21 2011 -0400
@@ -0,0 +1,22 @@
+#This config file was generated by the GUI.
+
+BriteConfig
+
+BeginModel
+ Name = 2 #Router Barabasi=2, AS Barabasi =4
+ N = 20 #Number of nodes in graph
+ HS = 1000 #Size of main plane (number of squares)
+ LS = 100 #Size of inner planes (number of squares)
+ NodePlacement = 1 #Random = 1, Heavy Tailed = 2
+ m = 2 #Number of neighboring node each new node connects to.
+ BWDist = 1 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
+ BWMin = 10.0
+ BWMax = 1024.0
+EndModel
+
+
+
+BeginOutput #**Atleast one of these options should have value 1**
+ BRITE = 1 #0 = Do not save as BRITE, 1 = save as BRITE.
+ OTTER = 1 #0 = Do not visualize with Otter, 1 = Visualize
+EndOutput
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/brite/examples/conf_files/RTBarabasi5.conf Wed Jun 01 13:03:21 2011 -0400
@@ -0,0 +1,22 @@
+#This config file was generated by the GUI.
+
+BriteConfig
+
+BeginModel
+ Name = 2 #Router Barabasi=2, AS Barabasi =4
+ N = 5 #Number of nodes in graph
+ HS = 1000 #Size of main plane (number of squares)
+ LS = 100 #Size of inner planes (number of squares)
+ NodePlacement = 1 #Random = 1, Heavy Tailed = 2
+ m = 2 #Number of neighboring node each new node connects to.
+ BWDist = 1 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
+ BWMin = 10.0
+ BWMax = 1024.0
+EndModel
+
+
+
+BeginOutput #**Atleast one of these options should have value 1**
+ BRITE = 1 #0 = Do not save as BRITE, 1 = save as BRITE.
+ OTTER = 0 #0 = Do not visualize with Otter, 1 = Visualize
+EndOutput
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/brite/examples/conf_files/RTWaxman.conf Wed Jun 01 13:03:21 2011 -0400
@@ -0,0 +1,25 @@
+#This config file was generated by the GUI.
+
+BriteConfig
+
+BeginModel
+ Name = 1 #Router Waxman = 1, AS Waxman = 3
+ N = 1000 #Number of nodes in graph
+ HS = 1000 #Size of main plane (number of squares)
+ LS = 100 #Size of inner planes (number of squares)
+ NodePlacement = 1 #Random = 1, Heavy Tailed = 2
+ GrowthType = 1 #Incremental = 1, All = 2
+ m = 2 #Number of neighboring node each new node connects to.
+ alpha = 0.15 #Waxman Parameter
+ beta = 0.2 #Waxman Parameter
+ BWDist = 1 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
+ BWMin = 10.0
+ BWMax = 1024.0
+EndModel
+
+
+
+BeginOutput #**Atleast one of these options should have value 1**
+ BRITE = 1 #0 = Do not save as BRITE, 1 = save as BRITE.
+ OTTER = 1 #0 = Do not visualize with Otter, 1 = Visualize
+EndOutput
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/brite/examples/conf_files/RTWaxman10.conf Wed Jun 01 13:03:21 2011 -0400
@@ -0,0 +1,25 @@
+#This config file was generated by the GUI.
+
+BriteConfig
+
+BeginModel
+ Name = 1 #Router Waxman = 1, AS Waxman = 3
+ N = 10 #Number of nodes in graph
+ HS = 1000 #Size of main plane (number of squares)
+ LS = 100 #Size of inner planes (number of squares)
+ NodePlacement = 1 #Random = 1, Heavy Tailed = 2
+ GrowthType = 1 #Incremental = 1, All = 2
+ m = 2 #Number of neighboring node each new node connects to.
+ alpha = 0.15 #Waxman Parameter
+ beta = 0.2 #Waxman Parameter
+ BWDist = 1 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
+ BWMin = 10.0
+ BWMax = 1024.0
+EndModel
+
+
+
+BeginOutput #**Atleast one of these options should have value 1**
+ BRITE = 1 #0 = Do not save as BRITE, 1 = save as BRITE.
+ OTTER = 0 #0 = Do not visualize with Otter, 1 = Visualize
+EndOutput
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/brite/examples/conf_files/RTWaxman20.conf Wed Jun 01 13:03:21 2011 -0400
@@ -0,0 +1,25 @@
+#This config file was generated by the GUI.
+
+BriteConfig
+
+BeginModel
+ Name = 1 #Router Waxman = 1, AS Waxman = 3
+ N = 20 #Number of nodes in graph
+ HS = 1000 #Size of main plane (number of squares)
+ LS = 100 #Size of inner planes (number of squares)
+ NodePlacement = 1 #Random = 1, Heavy Tailed = 2
+ GrowthType = 1 #Incremental = 1, All = 2
+ m = 2 #Number of neighboring node each new node connects to.
+ alpha = 0.15 #Waxman Parameter
+ beta = 0.2 #Waxman Parameter
+ BWDist = 1 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
+ BWMin = 10.0
+ BWMax = 1024.0
+EndModel
+
+
+
+BeginOutput #**Atleast one of these options should have value 1**
+ BRITE = 1 #0 = Do not save as BRITE, 1 = save as BRITE.
+ OTTER = 0 #0 = Do not visualize with Otter, 1 = Visualize
+EndOutput
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/brite/examples/conf_files/RTWaxman5.conf Wed Jun 01 13:03:21 2011 -0400
@@ -0,0 +1,25 @@
+#This config file was generated by the GUI.
+
+BriteConfig
+
+BeginModel
+ Name = 1 #Router Waxman = 1, AS Waxman = 3
+ N = 5 #Number of nodes in graph
+ HS = 1000 #Size of main plane (number of squares)
+ LS = 100 #Size of inner planes (number of squares)
+ NodePlacement = 1 #Random = 1, Heavy Tailed = 2
+ GrowthType = 1 #Incremental = 1, All = 2
+ m = 2 #Number of neighboring node each new node connects to.
+ alpha = 0.15 #Waxman Parameter
+ beta = 0.2 #Waxman Parameter
+ BWDist = 1 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
+ BWMin = 10.0
+ BWMax = 1024.0
+EndModel
+
+
+
+BeginOutput #**Atleast one of these options should have value 1**
+ BRITE = 1 #0 = Do not save as BRITE, 1 = save as BRITE.
+ OTTER = 0 #0 = Do not visualize with Otter, 1 = Visualize
+EndOutput
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/brite/examples/conf_files/TD_ASBarabasi_RTWaxman.conf Wed Jun 01 13:03:21 2011 -0400
@@ -0,0 +1,50 @@
+#This config file was generated by the GUI.
+
+BriteConfig
+
+BeginModel
+ Name = 5 #Top Down = 5
+ edgeConn = 2 #Random=1, Smallest Nonleaf = 2, Smallest Deg = 3, k-Degree=4
+ k = -1 #Only needed if edgeConn is set to K-Degree, otherwise use -1
+ BWInter = 1 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
+ BWInterMin = 10.0
+ BWInterMax = 1024.0
+ BWIntra = 3 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
+ BWIntraMin = 10.0
+ BWIntraMax = 1024.0
+EndModel
+
+BeginModel
+ Name = 4 #Router Barabasi=2, AS Barabasi =4
+ N = 20 #Number of nodes in graph
+ HS = 1000 #Size of main plane (number of squares)
+ LS = 100 #Size of inner planes (number of squares)
+ NodePlacement = 1 #Random = 1, Heavy Tailed = 2
+ m = 10 #Number of neighboring node each new node connects to.
+ BWDist = 1 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
+ BWMin = -1.0
+ BWMax = -1.0
+EndModel
+
+BeginModel
+ Name = 1 #Router Waxman=2, AS Waxman =3
+ N = 40 #Number of nodes in graph
+ HS = 1000 #Size of main plane (number of squares)
+ LS = 100 #Size of inner planes (number of squares)
+ NodePlacement = 2 #Random = 1, Heavy Tailed = 2
+ GrowthType = 1 #Incremental = 1, All = 2
+ m = 1 #Number of neighboring node each new node connects to.
+ alpha = 0.5 #Waxman Parameter
+ beta = 0.8 #Waxman Parameter
+ BWDist = 1 #Constant = 1, Uniform =2, HeavyTailed = 3, Exponential =4
+ BWMin = -1.0
+ BWMax = -1.0
+EndModel
+
+
+
+BeginOutput #**Atleast one of these options should have value 1**
+ BRITE = 1 #0 = Do not save as BRITE, 1 = save as BRITE.
+ OTTER = 0 #0 = Do not visualize with Otter, 1 = Visualize
+EndOutput
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/brite/examples/conf_files/seed_file Wed Jun 01 13:03:21 2011 -0400
@@ -0,0 +1,6 @@
+PLACES 929 18840 38318
+CONNECT 26883 38699 1089
+EDGE_CONN 53489 32975 5141
+GROUPING 34898 48253 21264
+ASSIGNMENT 44174 29196 31893
+BANDWIDTH 2445 3871 43415
--- a/src/brite/examples/wscript Wed Jun 01 10:31:49 2011 -0400
+++ b/src/brite/examples/wscript Wed Jun 01 13:03:21 2011 -0400
@@ -1,6 +1,5 @@
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
def build(bld):
- obj = bld.create_ns3_program('brite-generic-example',
- ['brite', 'internet'])
+ obj = bld.create_ns3_program('brite-generic-example', ['brite', 'internet', 'point-to-point', 'nix-vector-routing', 'applications', 'visualizer'])
obj.source = 'brite-generic-example.cc'
--- a/src/brite/helper/brite-topology-helper.h Wed Jun 01 10:31:49 2011 -0400
+++ b/src/brite/helper/brite-topology-helper.h Wed Jun 01 13:03:21 2011 -0400
@@ -26,7 +26,6 @@
#include "ns3/channel.h"
#include "ns3/node-container.h"
#include "ns3/node-list.h"
-#include "ns3/net-device-container.h"
#include "Brite.h"
namespace ns3 {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/brite/test/examples-to-run.py Wed Jun 01 13:03:21 2011 -0400
@@ -0,0 +1,20 @@
+#! /usr/bin/env python
+## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
+
+# A list of C++ examples to run in order to ensure that they remain
+# buildable and runnable over time. Each tuple in the list contains
+#
+# (example_name, do_run, do_valgrind_run).
+#
+# See test.py for more information.
+cpp_examples = [
+ ("brite-generic-example", "ENABLE_BRITE == True", "False"),
+]
+
+# A list of Python examples to run in order to ensure that they remain
+# runnable over time. Each tuple in the list contains
+#
+# (example_name, do_run).
+#
+# See test.py for more information.
+python_examples = []
--- a/src/brite/wscript Wed Jun 01 10:31:49 2011 -0400
+++ b/src/brite/wscript Wed Jun 01 13:03:21 2011 -0400
@@ -58,7 +58,7 @@
def build(bld):
- module = bld.create_ns3_module('brite', ['internet'])
+ module = bld.create_ns3_module('brite', ['network', 'core'])
module.source = [
]
--- a/src/wscript Wed Jun 01 10:31:49 2011 -0400
+++ b/src/wscript Wed Jun 01 13:03:21 2011 -0400
@@ -54,7 +54,7 @@
'wimax',
'lte',
'mpi',
- 'brite',
+ 'brite',
'topology-read',
'energy',
'tools',
--- a/test.py Wed Jun 01 10:31:49 2011 -0400
+++ b/test.py Wed Jun 01 13:03:21 2011 -0400
@@ -29,6 +29,8 @@
import shutil
import re
+from utils import get_list_from_file
+
#
# XXX This should really be part of a waf command to list the configuration
# items relative to optional ns-3 pieces.
@@ -41,20 +43,29 @@
#
interesting_config_items = [
"NS3_BUILDDIR",
+ "NS3_ENABLED_MODULES",
"NS3_MODULE_PATH",
"NSC_ENABLED",
"ENABLE_REAL_TIME",
+ "ENABLE_THREADING",
"ENABLE_EXAMPLES",
+ "ENABLE_TESTS",
+ "EXAMPLE_DIRECTORIES",
"ENABLE_PYTHON_BINDINGS",
"ENABLE_CLICK",
+ "ENABLE_OPENFLOW",
"ENABLE_BRITE",
]
NSC_ENABLED = False
ENABLE_REAL_TIME = False
+ENABLE_THREADING = False
ENABLE_EXAMPLES = True
+ENABLE_TESTS = True
ENABLE_CLICK = False
+ENABLE_OPENFLOW = False
ENABLE_BRITE = False
+EXAMPLE_DIRECTORIES = []
#
# If the user has constrained us to run certain kinds of tests, we can tell waf
@@ -70,6 +81,7 @@
"ns3-tcp-cwnd",
"nsc-tcp-loss",
"ns3-tcp-interoperability",
+ "routing-click",
]
#
@@ -83,140 +95,63 @@
]
#
-# A list of examples to run as smoke tests just to ensure that they remain
-# buildable and runnable over time. Also a condition under which to run
-# the example (from the waf configuration), and a condition under which to
-# run the example under valgrind. This is because NSC causes illegal
-# instruction crashes when run under valgrind.
+# Parse the examples-to-run file if it exists.
#
-# XXX Should this not be read from a configuration file somewhere and not
-# hardcoded.
+# This function adds any C++ examples or Python examples that are to be run
+# to the lists in example_tests and python_tests, respectively.
#
-example_tests = [
- ("src/devices/bridge/examples/csma-bridge", "True", "True"),
- ("src/devices/bridge/examples/csma-bridge-one-hop", "True", "True"),
- ("examples/csma/csma-broadcast", "True", "True"),
- ("examples/csma/csma-multicast", "True", "True"),
- ("examples/csma/csma-one-subnet", "True", "True"),
- ("examples/csma/csma-packet-socket", "True", "True"),
- ("examples/csma/csma-ping", "True", "True"),
- ("examples/csma/csma-raw-ip-socket", "True", "True"),
- ("examples/csma/csma-star", "True", "True"),
-
- ("examples/emulation/emu-ping", "False", "True"),
- ("examples/emulation/emu-udp-echo", "False", "True"),
-
- ("examples/energy/energy-model-example", "True", "True"),
-
- ("examples/error-model/simple-error-model", "True", "True"),
+def parse_examples_to_run_file(
+ examples_to_run_path,
+ cpp_executable_dir,
+ python_script_dir,
+ example_tests,
+ python_tests):
- ("examples/ipv6/icmpv6-redirect", "True", "True"),
- ("examples/ipv6/ping6", "True", "True"),
- ("examples/ipv6/radvd", "True", "True"),
- ("examples/ipv6/radvd-two-prefix", "True", "True"),
- ("examples/ipv6/test-ipv6", "True", "True"),
-
- ("examples/mesh/mesh", "True", "True"),
-
- ("examples/naming/object-names", "True", "True"),
-
- ("examples/realtime/realtime-udp-echo", "ENABLE_REAL_TIME == True", "True"),
-
- ("examples/routing/dynamic-global-routing", "True", "True"),
- ("examples/routing/global-injection-slash32", "True", "True"),
- ("examples/routing/global-routing-slash32", "True", "True"),
- ("examples/routing/mixed-global-routing", "True", "True"),
- ("src/routing/nix-vector-routing/examples/nix-simple", "True", "True"),
- ("src/routing/nix-vector-routing/examples/nms-p2p-nix", "False", "True"), # Takes too long to run
- ("examples/routing/simple-alternate-routing", "True", "True"),
- ("examples/routing/simple-global-routing", "True", "True"),
- ("src/routing/olsr/examples/simple-point-to-point-olsr", "True", "True"),
- ("examples/routing/simple-routing-ping6", "True", "True"),
- ("examples/routing/static-routing-slash32", "True", "True"),
- ("src/routing/aodv/examples/aodv", "True", "True"),
-
- ("src/spectrum/examples/adhoc-aloha-ideal-phy", "True", "True"),
- ("src/spectrum/examples/adhoc-aloha-ideal-phy-with-microwave-oven", "True", "True"),
-
- ("examples/stats/wifi-example-sim", "True", "True"),
-
- ("examples/tap/tap-wifi-dumbbell", "False", "True"), # Requires manual configuration
-
- ("examples/tcp/star", "True", "True"),
- ("examples/tcp/tcp-large-transfer", "True", "True"),
- ("examples/tcp/tcp-nsc-lfn", "NSC_ENABLED == True", "False"),
- ("examples/tcp/tcp-nsc-zoo", "NSC_ENABLED == True", "False"),
- ("examples/tcp/tcp-star-server", "True", "True"),
+ # Look for the examples-to-run file exists.
+ if os.path.exists(examples_to_run_path):
- ("examples/topology-read/topology-read --input=../../examples/topology-read/Inet_small_toposample.txt", "True", "True"),
- ("examples/topology-read/topology-read --format=Rocketfuel --input=../../examples/topology-read/RocketFuel_toposample_1239_weights.txt", "True", "True"),
-
- ("src/devices/virtual-net-device/examples/virtual-net-device", "True", "True"),
-
- ("examples/tutorial/first", "True", "True"),
- ("examples/tutorial/hello-simulator", "True", "True"),
- ("examples/tutorial/second", "True", "True"),
- ("examples/tutorial/third", "True", "True"),
- ("examples/tutorial/fourth", "True", "True"),
- ("examples/tutorial/fifth", "True", "True"),
- ("examples/tutorial/sixth", "True", "True"),
-
- ("examples/udp/udp-echo", "True", "True"),
-
- ("examples/wireless/mixed-wireless", "True", "True"),
- ("examples/wireless/multirate --totalTime=0.3s --rateManager=ns3::AarfcdWifiManager", "True", "True"),
- ("examples/wireless/multirate --totalTime=0.3s --rateManager=ns3::AmrrWifiManager", "True", "True"),
- ("examples/wireless/multirate --totalTime=0.3s --rateManager=ns3::CaraWifiManager", "True", "True"),
- ("examples/wireless/multirate --totalTime=0.3s --rateManager=ns3::IdealWifiManager", "True", "True"),
- ("examples/wireless/multirate --totalTime=0.3s --rateManager=ns3::MinstrelWifiManager", "True", "True"),
- ("examples/wireless/multirate --totalTime=0.3s --rateManager=ns3::OnoeWifiManager", "True", "True"),
- ("examples/wireless/multirate --totalTime=0.3s --rateManager=ns3::RraaWifiManager", "True", "True"),
- ("examples/wireless/simple-wifi-frame-aggregation", "True", "True"),
- ("examples/wireless/wifi-adhoc", "False", "True"), # Takes too long to run
- ("examples/wireless/wifi-ap --verbose=0", "True", "True"), # Don't let it spew to stdout
- ("examples/wireless/wifi-clear-channel-cmu", "False", "True"), # Requires specific hardware
- ("examples/wireless/wifi-simple-adhoc", "True", "True"),
- ("examples/wireless/wifi-simple-adhoc-grid", "True", "True"),
- ("examples/wireless/wifi-simple-infra", "True", "True"),
- ("examples/wireless/wifi-simple-interference", "True", "True"),
- ("examples/wireless/wifi-wired-bridging", "True", "True"),
-
- ("src/routing/click/examples/nsclick-simple-lan", "ENABLE_CLICK == True", "True"),
+ # Each tuple in the C++ list of examples to run contains
+ #
+ # (example_name, do_run, do_valgrind_run)
+ #
+ # where example_name is the executable to be run, do_run is a
+ # condition under which to run the example, and do_valgrind_run is
+ # a condition under which to run the example under valgrind. This
+ # is needed because NSC causes illegal instruction crashes with
+ # some tests when they are run under valgrind.
+ #
+ # Note that the two conditions are Python statements that
+ # can depend on waf configuration variables. For example,
+ #
+ # ("tcp-nsc-lfn", "NSC_ENABLED == True", "NSC_ENABLED == False"),
+ #
+ cpp_examples = get_list_from_file(examples_to_run_path, "cpp_examples")
+ for example_name, do_run, do_valgrind_run in cpp_examples:
+ example_path = os.path.join(cpp_executable_dir, example_name)
+ # Add all of the C++ examples that were built, i.e. found
+ # in the directory, to the list of C++ examples to run.
+ if os.path.exists(example_path):
+ example_tests.append((example_path, do_run, do_valgrind_run))
- ("examples/wimax/wimax-simple", "True", "True"),
- ("examples/wimax/wimax-ipv4", "True", "True"),
- ("examples/wimax/wimax-multicast", "True", "True"),
-
- ("src/brite/examples/brite-generic-example --confFile=../BRITE/conf_files/RTWaxman20.conf", "ENABLE_BRITE == True", "True"),
- ("src/brite/examples/brite-generic-example --confFile=../BRITE/conf_files/RTBarabasi.conf", "ENABLE_BRITE == True", "True"),
- ("src/brite/examples/brite-generic-example --confFile=../BRITE/conf_files/RTImport_GTITM.conf", "ENABLE_BRITE == True", "True"),
- ("src/brite/examples/brite-generic-example --confFile=../BRITE/conf_files/ASImport_GTITM.conf", "ENABLE_BRITE == True", "True"),
-
-]
-
-#
-# A list of python examples to run as smoke tests just to ensure that they
-# runnable over time. Also a condition under which to run the example (from
-# the waf configuration)
-#
-# XXX Should this not be read from a configuration file somewhere and not
-# hardcoded.
-#
-python_tests = [
- ("src/devices/bridge/examples/csma-bridge.py", "True"),
-
- ("src/contrib/flow-monitor/examples/wifi-olsr-flowmon.py", "True"),
-
- ("examples/routing/simple-routing-ping6.py", "True"),
-
- ("examples/tap/tap-csma-virtual-machine.py", "False"), # requires enable-sudo
- ("examples/tap/tap-wifi-virtual-machine.py", "False"), # requires enable-sudo
-
- ("examples/tutorial/first.py", "True"),
-
- ("examples/wireless/wifi-ap.py", "True"),
- ("examples/wireless/mixed-wireless.py", "True"),
-]
+ # Each tuple in the Python list of examples to run contains
+ #
+ # (example_name, do_run)
+ #
+ # where example_name is the Python script to be run and
+ # do_run is a condition under which to run the example.
+ #
+ # Note that the condition is a Python statement that can
+ # depend on waf configuration variables. For example,
+ #
+ # ("realtime-udp-echo.py", "ENABLE_REAL_TIME == True"),
+ #
+ python_examples = get_list_from_file(examples_to_run_path, "python_examples")
+ for example_name, do_run in python_examples:
+ example_path = os.path.join(python_script_dir, example_name)
+ # Add all of the Python examples that were found to the
+ # list of Python examples to run.
+ if os.path.exists(example_path):
+ python_tests.append((example_path, do_run))
#
# The test suites are going to want to output status. They are running
@@ -244,7 +179,12 @@
#
def translate_to_text(results_file, text_file):
f = open(text_file, 'w')
- dom = xml.dom.minidom.parse(results_file)
+ try:
+ dom = xml.dom.minidom.parse(results_file)
+ except xml.parsers.expat.error:
+ print "\nAn error was encountered while parsing the XML file %s." % (results_file)
+ sys.exit(1)
+
for suite in dom.getElementsByTagName("TestSuite"):
result = get_node_text(suite.getElementsByTagName("SuiteResult")[0])
name = get_node_text(suite.getElementsByTagName("SuiteName")[0])
@@ -746,14 +686,17 @@
#
VALGRIND_SUPPRESSIONS_FILE = "testpy.supp"
-def run_job_synchronously(shell_command, directory, valgrind, is_python):
+def run_job_synchronously(shell_command, directory, valgrind, is_python, build_path=""):
(base, build) = os.path.split (NS3_BUILDDIR)
suppressions_path = os.path.join (base, VALGRIND_SUPPRESSIONS_FILE)
if is_python:
path_cmd = "python " + os.path.join (base, shell_command)
else:
- path_cmd = os.path.join (NS3_BUILDDIR, NS3_ACTIVE_VARIANT, shell_command)
+ if len(build_path):
+ path_cmd = os.path.join (build_path, shell_command)
+ else:
+ path_cmd = os.path.join (NS3_BUILDDIR, NS3_ACTIVE_VARIANT, shell_command)
if valgrind:
cmd = "valgrind --suppressions=%s --leak-check=full --show-reachable=yes --error-exitcode=2 %s" % (suppressions_path,
@@ -807,6 +750,7 @@
self.tmp_file_name = ""
self.returncode = False
self.elapsed_time = 0
+ self.build_path = ""
#
# A job is either a standard job or a special job indicating that a worker
@@ -850,6 +794,14 @@
self.shell_command = shell_command
#
+ # This is the build path where ns-3 was built. For example,
+ #
+ # "/home/craigdo/repos/ns-3-allinone-test/ns-3-dev/build/debug"
+ #
+ def set_build_path(self, build_path):
+ self.build_path = build_path
+
+ #
# This is the dispaly name of the job, typically the test suite or example
# name. For example,
#
@@ -962,7 +914,7 @@
# "examples/mixed-wireless.py"
#
(job.returncode, standard_out, standard_err, et) = run_job_synchronously(job.shell_command,
- job.cwd, options.valgrind, job.is_pyexample)
+ job.cwd, options.valgrind, job.is_pyexample, job.build_path)
else:
#
# If we're a test suite, we need to provide a little more info
@@ -1051,6 +1003,54 @@
read_waf_config()
make_paths()
+ # Get the information from the build status file.
+ build_status_file = os.path.join (NS3_BUILDDIR, NS3_ACTIVE_VARIANT, 'build-status.py')
+ if os.path.exists(build_status_file):
+ ns3_runnable_programs = get_list_from_file(build_status_file, "ns3_runnable_programs")
+ ns3_runnable_scripts = get_list_from_file(build_status_file, "ns3_runnable_scripts")
+ else:
+ print >> sys.stderr, 'The build status file was not found. You must do waf build before running test.py.'
+ sys.exit(2)
+
+ # Generate the lists of examples to run as smoke tests in order to
+ # ensure that they remain buildable and runnable over time.
+ #
+ example_tests = []
+ python_tests = []
+ for directory in EXAMPLE_DIRECTORIES:
+ # Set the directories and paths for this example.
+ example_directory = os.path.join("examples", directory)
+ examples_to_run_path = os.path.join(example_directory, "examples-to-run.py")
+ cpp_executable_dir = os.path.join(NS3_BUILDDIR, NS3_ACTIVE_VARIANT, example_directory)
+ python_script_dir = os.path.join(example_directory)
+
+ # Parse this example directory's file.
+ parse_examples_to_run_file(
+ examples_to_run_path,
+ cpp_executable_dir,
+ python_script_dir,
+ example_tests,
+ python_tests)
+
+ for module in NS3_ENABLED_MODULES:
+ # Remove the "ns3-" from the module name.
+ module = module[len("ns3-"):]
+
+ # Set the directories and paths for this example.
+ module_directory = os.path.join("src", module)
+ example_directory = os.path.join(module_directory, "examples")
+ examples_to_run_path = os.path.join(module_directory, "test", "examples-to-run.py")
+ cpp_executable_dir = os.path.join(NS3_BUILDDIR, NS3_ACTIVE_VARIANT, example_directory)
+ python_script_dir = os.path.join(example_directory)
+
+ # Parse this module's file.
+ parse_examples_to_run_file(
+ examples_to_run_path,
+ cpp_executable_dir,
+ python_script_dir,
+ example_tests,
+ python_tests)
+
#
# If lots of logging is enabled, we can crash Python when it tries to
# save all of the text. We just don't allow logging to be turned on when
@@ -1290,48 +1290,58 @@
if len(options.constrain) == 0 or options.constrain == "example":
if ENABLE_EXAMPLES:
for test, do_run, do_valgrind_run in example_tests:
- if eval(do_run):
- job = Job()
- job.set_is_example(True)
- job.set_is_pyexample(False)
- job.set_display_name(test)
- job.set_tmp_file_name("")
- job.set_cwd(testpy_output_dir)
- job.set_basedir(os.getcwd())
- job.set_tempdir(testpy_output_dir)
- job.set_shell_command(test)
- if options.valgrind and not eval(do_valgrind_run):
- job.set_is_skip (True)
+ # Don't try to run this example if it isn't runnable.
+ if os.path.basename(test) in ns3_runnable_programs:
+ if eval(do_run):
+ job = Job()
+ job.set_is_example(True)
+ job.set_is_pyexample(False)
+ job.set_display_name(test)
+ job.set_tmp_file_name("")
+ job.set_cwd(testpy_output_dir)
+ job.set_basedir(os.getcwd())
+ job.set_tempdir(testpy_output_dir)
+ job.set_shell_command(test)
+ job.set_build_path("")
- if options.verbose:
- print "Queue %s" % test
+ if options.valgrind and not eval(do_valgrind_run):
+ job.set_is_skip (True)
- input_queue.put(job)
- jobs = jobs + 1
- total_tests = total_tests + 1
+ if options.verbose:
+ print "Queue %s" % test
+
+ input_queue.put(job)
+ jobs = jobs + 1
+ total_tests = total_tests + 1
elif len(options.example):
- #
- # If you tell me to run an example, I will try and run the example
- # irrespective of any condition.
- #
- job = Job()
- job.set_is_example(True)
- job.set_is_pyexample(False)
- job.set_display_name(options.example)
- job.set_tmp_file_name("")
- job.set_cwd(testpy_output_dir)
- job.set_basedir(os.getcwd())
- job.set_tempdir(testpy_output_dir)
- job.set_shell_command("examples/%s" % options.example)
-
- if options.verbose:
- print "Queue %s" % options.example
+ # Don't try to run this example if it isn't runnable.
+ example_name = os.path.basename(options.example)
+ if example_name not in ns3_runnable_programs:
+ print "Example %s is not runnable." % example_name
+ else:
+ #
+ # If you tell me to run an example, I will try and run the example
+ # irrespective of any condition.
+ #
+ job = Job()
+ job.set_is_example(True)
+ job.set_is_pyexample(False)
+ job.set_display_name(options.example)
+ job.set_tmp_file_name("")
+ job.set_cwd(testpy_output_dir)
+ job.set_basedir(os.getcwd())
+ job.set_tempdir(testpy_output_dir)
+ job.set_shell_command(options.example)
+ job.set_build_path(options.buildpath)
- input_queue.put(job)
- jobs = jobs + 1
- total_tests = total_tests + 1
+ if options.verbose:
+ print "Queue %s" % options.example
+
+ input_queue.put(job)
+ jobs = jobs + 1
+ total_tests = total_tests + 1
#
# Run some Python examples as smoke tests. We have a list of all of
@@ -1357,62 +1367,72 @@
if len(options.constrain) == 0 or options.constrain == "pyexample":
if ENABLE_EXAMPLES:
for test, do_run in python_tests:
- if eval(do_run):
- job = Job()
- job.set_is_example(False)
- job.set_is_pyexample(True)
- job.set_display_name(test)
- job.set_tmp_file_name("")
- job.set_cwd(testpy_output_dir)
- job.set_basedir(os.getcwd())
- job.set_tempdir(testpy_output_dir)
- job.set_shell_command(test)
+
+ # Don't try to run this example if it isn't runnable.
+ if os.path.basename(test) in ns3_runnable_scripts:
+ if eval(do_run):
+ job = Job()
+ job.set_is_example(False)
+ job.set_is_pyexample(True)
+ job.set_display_name(test)
+ job.set_tmp_file_name("")
+ job.set_cwd(testpy_output_dir)
+ job.set_basedir(os.getcwd())
+ job.set_tempdir(testpy_output_dir)
+ job.set_shell_command(test)
+ job.set_build_path("")
- #
- # Python programs and valgrind do not work and play
- # well together, so we skip them under valgrind.
- # We go through the trouble of doing all of this
- # work to report the skipped tests in a consistent
- # way throught the output formatter.
- #
- if options.valgrind:
- job.set_is_skip (True)
+ #
+ # Python programs and valgrind do not work and play
+ # well together, so we skip them under valgrind.
+ # We go through the trouble of doing all of this
+ # work to report the skipped tests in a consistent
+ # way throught the output formatter.
+ #
+ if options.valgrind:
+ job.set_is_skip (True)
- #
- # The user can disable python bindings, so we need
- # to pay attention to that and give some feedback
- # that we're not testing them
- #
- if not ENABLE_PYTHON_BINDINGS:
- job.set_is_skip (True)
+ #
+ # The user can disable python bindings, so we need
+ # to pay attention to that and give some feedback
+ # that we're not testing them
+ #
+ if not ENABLE_PYTHON_BINDINGS:
+ job.set_is_skip (True)
- if options.verbose:
- print "Queue %s" % test
+ if options.verbose:
+ print "Queue %s" % test
- input_queue.put(job)
- jobs = jobs + 1
- total_tests = total_tests + 1
+ input_queue.put(job)
+ jobs = jobs + 1
+ total_tests = total_tests + 1
elif len(options.pyexample):
- #
- # If you tell me to run a python example, I will try and run the example
- # irrespective of any condition.
- #
- job = Job()
- job.set_is_pyexample(True)
- job.set_display_name(options.pyexample)
- job.set_tmp_file_name("")
- job.set_cwd(testpy_output_dir)
- job.set_basedir(os.getcwd())
- job.set_tempdir(testpy_output_dir)
- job.set_shell_command("examples/%s" % options.pyexample)
-
- if options.verbose:
- print "Queue %s" % options.pyexample
+ # Don't try to run this example if it isn't runnable.
+ example_name = os.path.basename(options.pyexample)
+ if example_name not in ns3_runnable_scripts:
+ print "Example %s is not runnable." % example_name
+ else:
+ #
+ # If you tell me to run a python example, I will try and run the example
+ # irrespective of any condition.
+ #
+ job = Job()
+ job.set_is_pyexample(True)
+ job.set_display_name(options.pyexample)
+ job.set_tmp_file_name("")
+ job.set_cwd(testpy_output_dir)
+ job.set_basedir(os.getcwd())
+ job.set_tempdir(testpy_output_dir)
+ job.set_shell_command(options.pyexample)
+ job.set_build_path("")
- input_queue.put(job)
- jobs = jobs + 1
- total_tests = total_tests + 1
+ if options.verbose:
+ print "Queue %s" % options.pyexample
+
+ input_queue.put(job)
+ jobs = jobs + 1
+ total_tests = total_tests + 1
#
# Tell the worker threads to pack up and go home for the day. Each one
@@ -1611,6 +1631,19 @@
shutil.copyfile(xml_results_file, options.xml)
#
+ # Let the user know if they need to turn on tests or examples.
+ #
+ if not ENABLE_TESTS or not ENABLE_EXAMPLES:
+ print
+ if not ENABLE_TESTS:
+ print '*** Note: ns-3 tests are currently disabled. Enable them by adding'
+ print '*** "--enable-tests" to ./waf configure or modifying your .ns3rc file.'
+ print
+ if not ENABLE_EXAMPLES:
+ print '*** Note: ns-3 examples are currently disabled. Enable them by adding'
+ print '*** "--enable-examples" to ./waf configure or modifying your .ns3rc file.'
+ print
+ #
# If we have been asked to retain all of the little temporary files, we
# don't delete tm. If we do delete the temporary files, delete only the
# directory we just created. We don't want to happily delete any retained
@@ -1626,13 +1659,17 @@
def main(argv):
parser = optparse.OptionParser()
+ parser.add_option("-b", "--buildpath", action="store", type="string", dest="buildpath", default="",
+ metavar="BUILDPATH",
+ help="specify the path where ns-3 was built (defaults to the build directory for the current variant)")
+
parser.add_option("-c", "--constrain", action="store", type="string", dest="constrain", default="",
metavar="KIND",
help="constrain the test-runner by kind of test")
parser.add_option("-e", "--example", action="store", type="string", dest="example", default="",
metavar="EXAMPLE",
- help="specify a single example to run")
+ help="specify a single example to run (with relative path)")
parser.add_option("-g", "--grind", action="store_true", dest="valgrind", default=False,
help="run the test suites and examples using valgrind")
@@ -1651,7 +1688,7 @@
parser.add_option("-p", "--pyexample", action="store", type="string", dest="pyexample", default="",
metavar="PYEXAMPLE",
- help="specify a single python example to run")
+ help="specify a single python example to run (with relative path)")
parser.add_option("-r", "--retain", action="store_true", dest="retain", default=False,
help="retain all temporary files (which are normally deleted)")