View | Details | Raw Unified | Return to bug 999
Collapse All | Expand All

(-)a/src/internet-stack/wscript (-1 / +3 lines)
 Lines 59-71    Link Here 
59
        arch = None
59
        arch = None
60
    ok = False
60
    ok = False
61
    if arch in ('x86_64', 'i686', 'i586', 'i486', 'i386'):
61
    if arch in ('x86_64', 'i686', 'i586', 'i486', 'i386'):
62
        conf.env['NSC_ENABLED'] = 'yes'
62
        conf.env['NSC_ENABLED'] = True
63
        conf.env.append_value('CXXDEFINES', 'NETWORK_SIMULATION_CRADLE')
63
        conf.env.append_value('CXXDEFINES', 'NETWORK_SIMULATION_CRADLE')
64
        conf.check(mandatory=True, lib='dl', define_name='HAVE_DL', uselib='DL')
64
        conf.check(mandatory=True, lib='dl', define_name='HAVE_DL', uselib='DL')
65
        ok = True
65
        ok = True
66
    conf.check_message('NSC supported architecture', arch, ok)
66
    conf.check_message('NSC supported architecture', arch, ok)
67
    
67
    
68
    if not ok:
68
    if not ok:
69
        conf.env['NSC_ENABLED'] = False
69
        conf.report_optional_feature("nsc", "Network Simulation Cradle", False,
70
        conf.report_optional_feature("nsc", "Network Simulation Cradle", False,
70
                                     "architecture %r not supported" % arch)
71
                                     "architecture %r not supported" % arch)
71
        return
72
        return
 Lines 73-78    Link Here 
73
    lib_to_check = 'liblinux2.6.26.so'
74
    lib_to_check = 'liblinux2.6.26.so'
74
75
75
    if not os.path.exists(os.path.join(conf.env['WITH_NSC'], lib_to_check)):
76
    if not os.path.exists(os.path.join(conf.env['WITH_NSC'], lib_to_check)):
77
        conf.env['NSC_ENABLED'] = False
76
        conf.report_optional_feature("nsc", "Network Simulation Cradle", False,
78
        conf.report_optional_feature("nsc", "Network Simulation Cradle", False,
77
            "NSC library %s is missing: NSC has not been built?" % lib_to_check)
79
            "NSC library %s is missing: NSC has not been built?" % lib_to_check)
78
        return
80
        return
(-)a/src/test/ns3tcp/wscript (-1 / +1 lines)
 Lines 12-20    Link Here 
12
        ]
12
        ]
13
    ns3tcp.source = [
13
    ns3tcp.source = [
14
        'ns3tcp-socket-writer.cc',
14
        'ns3tcp-socket-writer.cc',
15
        'ns3tcp-socket-test-suite.cc',
15
        'ns3tcp-loss-test-suite.cc',
16
        'ns3tcp-loss-test-suite.cc',
16
        ]
17
        ]
17
    if bld.env['NSC_ENABLED']:
18
    if bld.env['NSC_ENABLED']:
18
        ns3tcp.source.append ('ns3tcp-interop-test-suite.cc')
19
        ns3tcp.source.append ('ns3tcp-interop-test-suite.cc')
19
        ns3tcp.source.append ('ns3tcp-cwnd-test-suite.cc')
20
        ns3tcp.source.append ('ns3tcp-cwnd-test-suite.cc')
20
        ns3tcp.source.append ('ns3tcp-socket-test-suite.cc')
(-)a/test.py (-7 / +21 lines)
 Lines 42-54    Link Here 
42
interesting_config_items = [
42
interesting_config_items = [
43
    "NS3_BUILDDIR",
43
    "NS3_BUILDDIR",
44
    "NS3_MODULE_PATH",
44
    "NS3_MODULE_PATH",
45
    "ENABLE_NSC",
45
    "NSC_ENABLED",
46
    "ENABLE_REAL_TIME",
46
    "ENABLE_REAL_TIME",
47
    "ENABLE_EXAMPLES",
47
    "ENABLE_EXAMPLES",
48
    "ENABLE_PYTHON_BINDINGS",
48
    "ENABLE_PYTHON_BINDINGS",
49
]
49
]
50
50
51
ENABLE_NSC = False
51
NSC_ENABLED = False
52
ENABLE_REAL_TIME = False
52
ENABLE_REAL_TIME = False
53
ENABLE_EXAMPLES = True
53
ENABLE_EXAMPLES = True
54
54
 Lines 68-73    Link Here 
68
    "ns3-tcp-interoperability",
68
    "ns3-tcp-interoperability",
69
]
69
]
70
70
71
# 
72
# There are some special cases for test suites that fail when NSC is
73
# missing.
74
#
75
core_nsc_missing_skip_tests = [
76
    "ns3-tcp-cwnd",
77
    "nsc-tcp-loss",
78
    "ns3-tcp-interoperability",
79
]
80
71
#
81
#
72
# A list of examples to run as smoke tests just to ensure that they remain 
82
# A list of examples to run as smoke tests just to ensure that they remain 
73
# buildable and runnable over time.  Also a condition under which to run
83
# buildable and runnable over time.  Also a condition under which to run
 Lines 128-135    Link Here 
128
138
129
    ("tcp/star", "True", "True"),
139
    ("tcp/star", "True", "True"),
130
    ("tcp/tcp-large-transfer", "True", "True"),
140
    ("tcp/tcp-large-transfer", "True", "True"),
131
    ("tcp/tcp-nsc-lfn", "ENABLE_NSC == True", "True"),
141
    ("tcp/tcp-nsc-lfn", "NSC_ENABLED == True", "False"),
132
    ("tcp/tcp-nsc-zoo", "ENABLE_NSC == True", "True"),
142
    ("tcp/tcp-nsc-zoo", "NSC_ENABLED == True", "False"),
133
    ("tcp/tcp-star-server", "True", "True"),
143
    ("tcp/tcp-star-server", "True", "True"),
134
144
135
    ("topology-read/topology-read --input=../../examples/topology-read/Inet_small_toposample.txt", "True", "True"),
145
    ("topology-read/topology-read --input=../../examples/topology-read/Inet_small_toposample.txt", "True", "True"),
 Lines 1210-1215    Link Here 
1210
            if options.valgrind and test in core_valgrind_skip_tests:
1220
            if options.valgrind and test in core_valgrind_skip_tests:
1211
                job.set_is_skip(True)
1221
                job.set_is_skip(True)
1212
1222
1223
            # Skip tests that will fail if NSC is missing.
1224
            if not NSC_ENABLED and test in core_nsc_missing_skip_tests:
1225
                job.set_is_skip(True)
1226
1213
            if options.verbose:
1227
            if options.verbose:
1214
                print "Queue %s" % test
1228
                print "Queue %s" % test
1215
1229
 Lines 1227-1236    Link Here 
1227
    # on NSC being configured by waf, that example should have a condition
1241
    # on NSC being configured by waf, that example should have a condition
1228
    # that evaluates to true if NSC is enabled.  For example,
1242
    # that evaluates to true if NSC is enabled.  For example,
1229
    #
1243
    #
1230
    #      ("tcp-nsc-zoo", "ENABLE_NSC == True"),
1244
    #      ("tcp-nsc-zoo", "NSC_ENABLED == True"),
1231
    #
1245
    #
1232
    # In this case, the example "tcp-nsc-zoo" will only be run if we find the
1246
    # In this case, the example "tcp-nsc-zoo" will only be run if we find the
1233
    # waf configuration variable "ENABLE_NSC" to be True.
1247
    # waf configuration variable "NSC_ENABLED" to be True.
1234
    #
1248
    #
1235
    # We don't care at all how the trace files come out, so we just write them 
1249
    # We don't care at all how the trace files come out, so we just write them 
1236
    # to a single temporary directory.
1250
    # to a single temporary directory.
 Lines 1650-1656    Link Here 
1650
    global options
1664
    global options
1651
    options = parser.parse_args()[0]
1665
    options = parser.parse_args()[0]
1652
    signal.signal(signal.SIGINT, sigint_hook)
1666
    signal.signal(signal.SIGINT, sigint_hook)
1653
    
1667
1654
    return run_tests()
1668
    return run_tests()
1655
1669
1656
if __name__ == '__main__':
1670
if __name__ == '__main__':

Return to bug 999