Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1064)

Unified Diff: sky/tools/sky_server

Issue 705623003: Fix test_sky in release builds (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sky/tools/skydb » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/tools/sky_server
diff --git a/sky/tools/sky_server b/sky/tools/sky_server
index be4e0604d8cbb6e26c39a0b8138ee1b658c736e6..7b8f092b121ec5a4755617c4f683b6afa2447970 100755
--- a/sky/tools/sky_server
+++ b/sky/tools/sky_server
@@ -8,7 +8,8 @@ import cherrypy
import json
import os
import staticdirindex
-import skypy.paths as paths
+from skypy.paths import Paths
+import skypy.configuration as configuration
def skydir(section="", dir="", path="", **kwargs):
if cherrypy.request.params.get('format') is None:
@@ -33,10 +34,13 @@ def main():
help='Enable logging to the console.')
parser.add_argument('app_path', type=str)
parser.add_argument('port', type=int)
+ configuration.add_arguments(parser)
args = parser.parse_args()
log_dir = os.path.abspath(os.getcwd())
+ paths = Paths(os.path.join('out', args.configuration))
+
config = {
'global': {
'server.socket_port': args.port,
@@ -55,15 +59,15 @@ def main():
},
'/mojo/public': {
'tools.staticdir.on': True,
- 'tools.staticdir.dir': os.path.join(paths.GEN_ROOT, 'mojo', 'public'),
+ 'tools.staticdir.dir': os.path.join(paths.gen_root, 'mojo', 'public'),
},
'/mojo/services': {
'tools.staticdir.on': True,
- 'tools.staticdir.dir': os.path.join(paths.GEN_ROOT, 'mojo', 'services'),
+ 'tools.staticdir.dir': os.path.join(paths.gen_root, 'mojo', 'services'),
},
'/sky/services': {
'tools.staticdir.on': True,
- 'tools.staticdir.dir': os.path.join(paths.GEN_ROOT, 'sky', 'services'),
+ 'tools.staticdir.dir': os.path.join(paths.gen_root, 'sky', 'services'),
},
}
cherrypy.quickstart(config=config)
« no previous file with comments | « no previous file | sky/tools/skydb » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698