-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add startws.py: starts a static webserver for TestScripts.
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.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 'Now hosting [{root_dir}] at {host}:{port}'.format(root_dir = rootDir, host = w.host(), port = w.port()) | ||
|
||
try: | ||
while True: | ||
time.sleep(10) | ||
finally: | ||
w.stop() | ||
|