Skip to content

Commit

Permalink
Add startws.py: starts a static webserver for TestScripts.
Browse files Browse the repository at this point in the history
and waits for ctrl-c
  • Loading branch information
Tim Cussins committed Apr 1, 2014
1 parent ac7ed2e commit 77ad263
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions startws.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import sys
import os
import time

sys.path.append(os.path.join('dependencies', 'AnyPlatform', 'testharness'))

from testharness.servers import StaticWebServer

rootDir = 'TestScripts'

w = StaticWebServer(rootDir)
w.start()

print
print 'Now hosting [{root_dir}] at {host}:{port}'.format(root_dir = rootDir, host = w.host(), port = w.port())
print

try:
while True:
time.sleep(10)
finally:
w.stop()

0 comments on commit 77ad263

Please sign in to comment.