~comnets/openwns-systemtest-wimac/systemtest-wimac--main--1.0

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
#! /usr/bin/env python

# this is needed, so that the script can be called from everywhere
import os
import sys
base, tail = os.path.split(sys.argv[0])
os.chdir(base)

# Append the python sub-dir of WNS--main--x.y ...
sys.path.append(os.path.join('..', '..', '..', 'sandbox', 'default', 'lib', 'python2.4', 'site-packages'))

# ... because the module WNS unit test framework is located there.
import pywns.WNSUnit


testSuite = pywns.WNSUnit.TestSuite()

#### create the system Tests

##################################################################################
#~~~~~~~~~~~~~~~~~~~~~~  TEST-SUITE -- Base Test~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
testSuite1 = pywns.WNSUnit.ProbesTestSuite( sandboxPath = os.path.join('..', '..', '..', 'sandbox'),
                                           
                                           configFile = 'config.py',
                                           shortDescription = 'Two stations. One neer one far. RoundRobin',
                                           requireReferenceOutput = True,
                                           disabled = False,
                                           disabledReason = "",
                                           workingDir = 'configBase')

##################################################################################
#~~~~~~~~~~~~~~~~~~~~~~  TEST-SUITE -- Base Test~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
testSuite2 = pywns.WNSUnit.ProbesTestSuite( sandboxPath = os.path.join('..', '..', '..', 'sandbox'),
                                           
                                           configFile = 'configPF.py',
                                           shortDescription = 'Two stations. One neer one far. ProportionalFair',
                                           requireReferenceOutput = True,
                                           disabled = False,
                                           disabledReason = "",
                                           workingDir = 'configBase')

##################################################################################
#~~~~~~~~~~~~~~~~~~~~~~  TEST-SUITE -- OFDMA Test ~~~~~~~~~~~~~~~~~~~~~~~~~
testSuite3 = pywns.WNSUnit.ProbesTestSuite( sandboxPath = os.path.join('..', '..', '..', 'sandbox'),
                                           
                                           configFile = 'config.py',
                                           shortDescription = 'Using multiple subchannels',
                                           requireReferenceOutput = False,
                                           disabled = False,
                                           disabledReason = "",
                                           workingDir = 'configOFDMA')

testSuite11 = pywns.WNSUnit.ProbesTestSuite( sandboxPath = os.path.join('..', '..', '..', 'sandbox'),
                                           
                                           configFile = 'configMulticell.py',
                                           shortDescription = 'Using multiple subchannels in 7 cells',
                                           requireReferenceOutput = False,
                                           disabled = False,
                                           disabledReason = "",
                                           workingDir = 'configOFDMA')
##################################################################################
#~~~~~~~~~~~~~~~~~~~~~~  TEST-SUITE -- SDMA Test ~~~~~~~~~~~~~~~~~~~~~~~~~
testSuite10 = pywns.WNSUnit.ProbesTestSuite( sandboxPath = os.path.join('..', '..', '..', 'sandbox'),
                                           configFile = 'configSDMA.py',
                                           shortDescription = 'Using SDMA',
                                           requireReferenceOutput = False,
                                           disabled = False,
                                           disabledReason = "",
                                           workingDir = 'configBeamforming')

##################################################################################
#~~~~~~~~~~~~~~~~~~~~~~  TEST-SUITE -- BypassQueue Test ~~~~~~~~~~~~~~~~~~~~~~~~~
testSuite4 = pywns.WNSUnit.ProbesTestSuite( sandboxPath = os.path.join('..', '..', '..', 'sandbox'),
                                           
                                           configFile = 'config.py',
                                           shortDescription = 'Same as basic test but with bypass queue',
                                           requireReferenceOutput = True,
                                           disabled = True,
                                           disabledReason = "Problem with multiple CIDs for QoS.",
                                           workingDir = 'configBypass')

##################################################################################
#~~~~~~~~~~~~~~~~~~~~~~  TEST-SUITE -- IMT-Advanced Tests ~~~~~~~~~~~~~~~~~~~~~~~~~
testSuite5 = pywns.WNSUnit.ProbesTestSuite( sandboxPath = os.path.join('..', '..', '..', 'sandbox'),
                                           
                                           configFile = 'configUMa.py',
                                           shortDescription = "IMT-A Urban Macro Scenario with 5MHz BW in 3 sectors.",
                                           requireReferenceOutput = False,
                                           disabled = False,
                                           disabledReason = "",
                                           workingDir = 'configIMTA')

testSuite6 = pywns.WNSUnit.ProbesTestSuite( sandboxPath = os.path.join('..', '..', '..', 'sandbox'),
                                           
                                           configFile = 'configUMi.py',
                                           shortDescription = "IMT-A Urban Micro Scenario with 5MHz BW in 3 sectors.",
                                           requireReferenceOutput = False,
                                           disabled = False,
                                           disabledReason = "",
                                           workingDir = 'configIMTA')

testSuite7 = pywns.WNSUnit.ProbesTestSuite( sandboxPath = os.path.join('..', '..', '..', 'sandbox'),
                                           
                                           configFile = 'configRMa.py',
                                           shortDescription = "IMT-A Rural Micro Scenario with 5MHz BW in 3 sectors.",
                                           requireReferenceOutput = False,
                                           disabled = False,
                                           disabledReason = "",
                                           workingDir = 'configIMTA')

testSuite8 = pywns.WNSUnit.ProbesTestSuite( sandboxPath = os.path.join('..', '..', '..', 'sandbox'),
                                           
                                           configFile = 'configSMa.py',
                                           shortDescription = "IMT-A Suburban Macro Scenario with 5MHz BW in 3 sectors.",
                                           requireReferenceOutput = False,
                                           disabled = False,
                                           disabledReason = "",
                                           workingDir = 'configIMTA')

testSuite9 = pywns.WNSUnit.ProbesTestSuite( sandboxPath = os.path.join('..', '..', '..', 'sandbox'),
                                           
                                           configFile = 'configInH.py',
                                           shortDescription = "IMT-A Indoor Hotspot Scenario with 5MHz BW in 3 sectors.",
                                           requireReferenceOutput = False,
                                           disabled = False,
                                           disabledReason = "",
                                           workingDir = 'configIMTA')


testSuite.addTest(testSuite9)
testSuite.addTest(testSuite2)
testSuite.addTest(testSuite3)
testSuite.addTest(testSuite4)
testSuite.addTest(testSuite5)
testSuite.addTest(testSuite6)
testSuite.addTest(testSuite7)
testSuite.addTest(testSuite8)
testSuite.addTest(testSuite1)
testSuite.addTest(testSuite10)
testSuite.addTest(testSuite11)

if __name__ == '__main__':
    # This is only evaluated if the script is called by hand

    # if you need to change the verbosity do it here
    verbosity = 2

    pywns.WNSUnit.verbosity = verbosity

    # Create test runner
    testRunner = pywns.WNSUnit.TextTestRunner()

    # Finally, run the tests.
    testRunner.run(testSuite)