Make examples that were in samples directory run

This commit is contained in:
Mitch Watrous
2011-04-15 13:03:02 -07:00
parent 357a5c8661
commit 6c0d5166e8
14 changed files with 40 additions and 8 deletions

View File

@@ -4,7 +4,7 @@ def build(bld):
if not bld.env['ENABLE_EXAMPLES']:
return;
obj = bld.create_ns3_program('main-attribute-value', ['core', 'node', 'devices/point-to-point'])
obj = bld.create_ns3_program('main-attribute-value', ['network', 'point-to-point'])
obj.source = 'main-attribute-value.cc'
obj = bld.create_ns3_program('main-callback', ['core'])
@@ -23,3 +23,7 @@ def build(bld):
['core'])
obj.source = 'sample-random-variable.cc'
if bld.env['ENABLE_THREADING'] and bld.env["ENABLE_REAL_TIME"]:
obj = bld.create_ns3_program('main-test-sync', ['network'])
obj.source = 'main-test-sync.cc'

View File

@@ -8,6 +8,12 @@
#
# See test.py for more information.
cpp_examples = [
("main-attribute-value", "True", "True"),
("main-callback", "True", "True"),
("sample-simulator", "True", "True"),
("main-ptr", "True", "True"),
("main-random-variable", "True", "True"),
("sample-random-variable", "True", "True"),
]
# A list of Python examples to run in order to ensure that they remain
@@ -16,4 +22,6 @@ cpp_examples = [
# (example_name, do_run).
#
# See test.py for more information.
python_examples = []
python_examples = [
("sample-simulator.py", "True"),
]

View File

@@ -292,6 +292,9 @@ def build(bld):
core_test.uselib = core_test.uselib + ' GSL GSLCBLAS M'
core_test.source.extend(['test/rng-test-suite.cc'])
if (bld.env['ENABLE_EXAMPLES']):
bld.add_subdirs('examples')
pymod = bld.ns3_python_bindings()
if pymod is not None:
pymod.source += ['bindings/module_helpers.cc']

View File

@@ -8,6 +8,7 @@
#
# See test.py for more information.
cpp_examples = [
("main-simple", "True", "True"),
]
# A list of Python examples to run in order to ensure that they remain

View File

@@ -283,5 +283,8 @@ def build(bld):
obj.uselib = 'DL'
internet_test.uselib = 'DL'
if (bld.env['ENABLE_EXAMPLES']):
bld.add_subdirs('examples')
bld.ns3_python_bindings()

View File

@@ -8,6 +8,9 @@
#
# See test.py for more information.
cpp_examples = [
("main-grid-topology", "True", "True"),
("main-random-topology", "True", "True"),
("main-random-walk", "True", "True"),
]
# A list of Python examples to run in order to ensure that they remain

View File

@@ -53,4 +53,7 @@ def build(bld):
'helper/ns2-mobility-helper.h',
]
if (bld.env['ENABLE_EXAMPLES']):
bld.add_subdirs('examples')
bld.ns3_python_bindings()

View File

@@ -4,13 +4,9 @@ def build(bld):
if not bld.env['ENABLE_EXAMPLES']:
return;
obj = bld.create_ns3_program('main-packet-header', ['common', 'core'])
obj = bld.create_ns3_program('main-packet-header', ['network'])
obj.source = 'main-packet-header.cc'
obj = bld.create_ns3_program('main-packet-tag', ['common', 'core'])
obj = bld.create_ns3_program('main-packet-tag', ['network'])
obj.source = 'main-packet-tag.cc'
if bld.env['ENABLE_THREADING'] and bld.env["ENABLE_REAL_TIME"]:
obj = bld.create_ns3_program('main-test-sync')
obj.source = 'main-test-sync.cc'

View File

@@ -8,6 +8,8 @@
#
# See test.py for more information.
cpp_examples = [
("main-packet-header", "True", "True"),
("main-packet-tag", "True", "True"),
]
# A list of Python examples to run in order to ensure that they remain

View File

@@ -126,4 +126,7 @@ def build(bld):
'helper/trace-helper.h',
]
if (bld.env['ENABLE_EXAMPLES']):
bld.add_subdirs('examples')
bld.ns3_python_bindings()

View File

@@ -8,6 +8,7 @@
#
# See test.py for more information.
cpp_examples = [
("main-propagation-loss", "True", "True"),
]
# A list of Python examples to run in order to ensure that they remain

View File

@@ -24,4 +24,7 @@ def build(bld):
'model/cost231-propagation-loss-model.h',
]
if (bld.env['ENABLE_EXAMPLES']):
bld.add_subdirs('examples')
bld.ns3_python_bindings()

View File

@@ -47,6 +47,7 @@ interesting_config_items = [
"NS3_MODULE_PATH",
"NSC_ENABLED",
"ENABLE_REAL_TIME",
"ENABLE_THREADING",
"ENABLE_EXAMPLES",
"EXAMPLE_DIRECTORIES",
"ENABLE_PYTHON_BINDINGS",
@@ -56,6 +57,7 @@ interesting_config_items = [
NSC_ENABLED = False
ENABLE_REAL_TIME = False
ENABLE_THREADING = False
ENABLE_EXAMPLES = True
ENABLE_CLICK = False
ENABLE_OPENFLOW = False