~thomas-philipp/openwns-systemtest-library/queueing-experimental

« back to all changes in this revision

Viewing changes to systemTest.py

  • Committer: Maciej Muehleisen
  • Date: 2008-11-01 22:21:03 UTC
  • Revision ID: mue@comnets.rwth-aachen.de-20081101222103-nrdh43je18ta98tt
Initial commit. Steps 5 and 6 still need work.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /usr/bin/env python
 
2
 
 
3
# this is needed, so that the script can be called from everywhere
 
4
import os
 
5
import sys
 
6
base, tail = os.path.split(sys.argv[0])
 
7
os.chdir(base)
 
8
 
 
9
# Append the python sub-dir of WNS--main--x.y ...
 
10
sys.path.append(os.path.join('..', '..', '..', 'sandbox', 'default', 'lib', 'python2.4', 'site-packages'))
 
11
 
 
12
# ... because the module WNS unit test framework is located there.
 
13
import pywns.WNSUnit
 
14
 
 
15
testSuite = pywns.WNSUnit.TestSuite()
 
16
 
 
17
testSuite.addTest(pywns.WNSUnit.SystemTestSuite(sandboxPath = os.path.join('..', '..', '..', 'sandbox'),
 
18
                            configFile = 'MM1realtime.py',
 
19
                            shortDescription = 'MM1 queuing system example',
 
20
                            workingDir = 'queuing',
 
21
                            disabled = False, disabledReason = ""))
 
22
 
 
23
 
 
24
for i in range(1, 7):
 
25
    print i
 
26
 
 
27
    testSuite.addTest(pywns.WNSUnit.SystemTestSuite(sandboxPath = os.path.join('..', '..', '..', 'sandbox'),
 
28
                                    configFile = 'MM1Step' + str(i) + '.py',
 
29
                                    shortDescription = 'MM1 queuing system example',
 
30
                                    workingDir = 'queuing',
 
31
                                    disabled = False, disabledReason = ""))
 
32
 
 
33
if __name__ == '__main__':
 
34
    # This is only evaluated if the script is called by hand
 
35
 
 
36
    # if you need to change the verbosity do it here
 
37
    verbosity = 2
 
38
 
 
39
    pywns.WNSUnit.verbosity = verbosity
 
40
 
 
41
    # Create test runner
 
42
    testRunner = pywns.WNSUnit.TextTestRunner(verbosity=verbosity)
 
43
 
 
44
    # Finally, run the tests.
 
45
    testRunner.run(testSuite)
 
46
    #testRunner.run(testSuite1)
 
47
    #testRunner.run(testSuite2)
 
48