-
Notifications
You must be signed in to change notification settings - Fork 1
/
nightly.test
37 lines (30 loc) · 1.36 KB
/
nightly.test
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
from testharness.testsuite import MakeSuiteRunner
from testharness.servers import StaticWebServer
import os.path
# 'context' is predefined globally. until this is fixed, sorry :)
suiteRunner = MakeSuiteRunner(context)
# testharness honours a '#' within this string :)
tests = '''
TestWatchableThread
TestWatchable
TestTopology1 -s {ws_hostname} -p {ws_port} --path Topology1TestScript.txt
TestTopology2 -s {ws_hostname} -p {ws_port} --path Topology2TestScript.txt
TestTopology3 -s {ws_hostname} -p {ws_port} --path Topology3TestScript.txt
#TestTopology4 -s {ws_hostname} -p {ws_port} --path Topology4TestScript.txt
TestTopology5 -s {ws_hostname} -p {ws_port} --path Topology5TestScript.txt
TestTopology6 -s {ws_hostname} -p {ws_port} --path Topology6TestScript.txt
'''
w = StaticWebServer(os.path.join("TestScripts"))
w.start()
try:
suiteRunner.run(tests.format(
# There is a problem with DNS resolution of the loopback name on windows and other platforms (linux is ok)
# So, we're hard coding the loopback address for now to allow the tests to run properly
# The symptom of the fault is that the server name gets resolved to 0.0.0.0 instead of
# the actual IP address of the server.
#ws_hostname = w.host(),
ws_hostname = "127.0.0.1",
ws_port = w.port()
))
finally:
w.stop()