validate:launcher: Add an option to only launch the http server
This commit is contained in:
parent
8a295da795
commit
0b4bd7940a
@ -218,6 +218,9 @@ def main():
|
|||||||
http_server_group.add_argument("-s", "--folder-for-http-server", dest="http_server_dir",
|
http_server_group.add_argument("-s", "--folder-for-http-server", dest="http_server_dir",
|
||||||
default=None,
|
default=None,
|
||||||
help="Folder in which to create an http server on localhost. Default is PATHS")
|
help="Folder in which to create an http server on localhost. Default is PATHS")
|
||||||
|
http_server_group.add_argument("--http-only", dest="httponly",
|
||||||
|
default=False, action='store_true',
|
||||||
|
help="Start the http server and quit")
|
||||||
|
|
||||||
assets_group = parser.add_argument_group("Handle remote assets")
|
assets_group = parser.add_argument_group("Handle remote assets")
|
||||||
assets_group.add_argument("-u", "--update-assets-command", dest="update_assets_command",
|
assets_group.add_argument("-u", "--update-assets-command", dest="update_assets_command",
|
||||||
@ -319,9 +322,13 @@ def main():
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
httpsrv = HTTPServer(options)
|
httpsrv = HTTPServer(options)
|
||||||
if tests_launcher.needs_http_server():
|
if tests_launcher.needs_http_server() or options.httponly is True:
|
||||||
httpsrv.start()
|
httpsrv.start()
|
||||||
|
|
||||||
|
if options.httponly is True:
|
||||||
|
print "Running HTTP server only"
|
||||||
|
return
|
||||||
|
|
||||||
e = None
|
e = None
|
||||||
try:
|
try:
|
||||||
tests_launcher.run_tests()
|
tests_launcher.run_tests()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user