Fixed problems due to missing NSC.
This commit is contained in:
@@ -59,13 +59,14 @@ def configure(conf):
|
||||
arch = None
|
||||
ok = False
|
||||
if arch in ('x86_64', 'i686', 'i586', 'i486', 'i386'):
|
||||
conf.env['NSC_ENABLED'] = 'yes'
|
||||
conf.env['NSC_ENABLED'] = True
|
||||
conf.env.append_value('CXXDEFINES', 'NETWORK_SIMULATION_CRADLE')
|
||||
conf.check(mandatory=True, lib='dl', define_name='HAVE_DL', uselib='DL')
|
||||
ok = True
|
||||
conf.check_message('NSC supported architecture', arch, ok)
|
||||
|
||||
if not ok:
|
||||
conf.env['NSC_ENABLED'] = False
|
||||
conf.report_optional_feature("nsc", "Network Simulation Cradle", False,
|
||||
"architecture %r not supported" % arch)
|
||||
return
|
||||
@@ -73,6 +74,7 @@ def configure(conf):
|
||||
lib_to_check = 'liblinux2.6.26.so'
|
||||
|
||||
if not os.path.exists(os.path.join(conf.env['WITH_NSC'], lib_to_check)):
|
||||
conf.env['NSC_ENABLED'] = False
|
||||
conf.report_optional_feature("nsc", "Network Simulation Cradle", False,
|
||||
"NSC library %s is missing: NSC has not been built?" % lib_to_check)
|
||||
return
|
||||
|
||||
@@ -12,9 +12,9 @@ def build(bld):
|
||||
]
|
||||
ns3tcp.source = [
|
||||
'ns3tcp-socket-writer.cc',
|
||||
'ns3tcp-socket-test-suite.cc',
|
||||
'ns3tcp-loss-test-suite.cc',
|
||||
]
|
||||
if bld.env['NSC_ENABLED']:
|
||||
ns3tcp.source.append ('ns3tcp-interop-test-suite.cc')
|
||||
ns3tcp.source.append ('ns3tcp-cwnd-test-suite.cc')
|
||||
ns3tcp.source.append ('ns3tcp-socket-test-suite.cc')
|
||||
|
||||
26
test.py
26
test.py
@@ -42,13 +42,13 @@ import re
|
||||
interesting_config_items = [
|
||||
"NS3_BUILDDIR",
|
||||
"NS3_MODULE_PATH",
|
||||
"ENABLE_NSC",
|
||||
"NSC_ENABLED",
|
||||
"ENABLE_REAL_TIME",
|
||||
"ENABLE_EXAMPLES",
|
||||
"ENABLE_PYTHON_BINDINGS",
|
||||
]
|
||||
|
||||
ENABLE_NSC = False
|
||||
NSC_ENABLED = False
|
||||
ENABLE_REAL_TIME = False
|
||||
ENABLE_EXAMPLES = True
|
||||
|
||||
@@ -68,6 +68,16 @@ core_valgrind_skip_tests = [
|
||||
"ns3-tcp-interoperability",
|
||||
]
|
||||
|
||||
#
|
||||
# There are some special cases for test suites that fail when NSC is
|
||||
# missing.
|
||||
#
|
||||
core_nsc_missing_skip_tests = [
|
||||
"ns3-tcp-cwnd",
|
||||
"nsc-tcp-loss",
|
||||
"ns3-tcp-interoperability",
|
||||
]
|
||||
|
||||
#
|
||||
# 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
|
||||
@@ -128,8 +138,8 @@ example_tests = [
|
||||
|
||||
("tcp/star", "True", "True"),
|
||||
("tcp/tcp-large-transfer", "True", "True"),
|
||||
("tcp/tcp-nsc-lfn", "ENABLE_NSC == True", "True"),
|
||||
("tcp/tcp-nsc-zoo", "ENABLE_NSC == True", "True"),
|
||||
("tcp/tcp-nsc-lfn", "NSC_ENABLED == True", "False"),
|
||||
("tcp/tcp-nsc-zoo", "NSC_ENABLED == True", "False"),
|
||||
("tcp/tcp-star-server", "True", "True"),
|
||||
|
||||
("topology-read/topology-read --input=../../examples/topology-read/Inet_small_toposample.txt", "True", "True"),
|
||||
@@ -1210,6 +1220,10 @@ def run_tests():
|
||||
if options.valgrind and test in core_valgrind_skip_tests:
|
||||
job.set_is_skip(True)
|
||||
|
||||
# Skip tests that will fail if NSC is missing.
|
||||
if not NSC_ENABLED and test in core_nsc_missing_skip_tests:
|
||||
job.set_is_skip(True)
|
||||
|
||||
if options.verbose:
|
||||
print "Queue %s" % test
|
||||
|
||||
@@ -1227,10 +1241,10 @@ def run_tests():
|
||||
# on NSC being configured by waf, that example should have a condition
|
||||
# that evaluates to true if NSC is enabled. For example,
|
||||
#
|
||||
# ("tcp-nsc-zoo", "ENABLE_NSC == True"),
|
||||
# ("tcp-nsc-zoo", "NSC_ENABLED == True"),
|
||||
#
|
||||
# In this case, the example "tcp-nsc-zoo" will only be run if we find the
|
||||
# waf configuration variable "ENABLE_NSC" to be True.
|
||||
# waf configuration variable "NSC_ENABLED" to be True.
|
||||
#
|
||||
# We don't care at all how the trace files come out, so we just write them
|
||||
# to a single temporary directory.
|
||||
|
||||
Reference in New Issue
Block a user