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

Unified Diff: devserver_test.py

Issue 6425002: devserver: allow calling devserver from anywhere (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/dev-util.git@master
Patch Set: . Created 9 years, 10 months 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 | « devserver.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: devserver_test.py
diff --git a/devserver_test.py b/devserver_test.py
index b4ccb70dfa8e845b23d539b2a2d1503f447fb2f8..69c754fcd6ed34417ee141fe3373cee9c6922d10 100755
--- a/devserver_test.py
+++ b/devserver_test.py
@@ -49,13 +49,15 @@ UPDATE_REQUEST = """<?xml version="1.0" encoding="UTF-8"?>
# TODO(girts): use a random available port.
UPDATE_URL = 'http://127.0.0.1:8080/update'
+# Run all tests while being in /
+base_dir = os.path.dirname(os.path.abspath(sys.argv[0]))
+os.chdir("/")
class DevserverTest(unittest.TestCase):
"""Regressions tests for devserver."""
def setUp(self):
"""Copies in testing files."""
- base_dir = os.path.dirname(os.path.abspath(sys.argv[0]))
# Copy in developer-test.gz, as "static/" directory is hardcoded, and it
# would be very hard to change it (static file serving is handled deep
@@ -77,7 +79,7 @@ class DevserverTest(unittest.TestCase):
"""Tests --validate_factory_config."""
cmd = [
'python',
- 'devserver.py',
+ os.path.join(base_dir, 'devserver.py'),
'--validate_factory_config',
'--factory_config', self.factory_config,
]
@@ -90,6 +92,7 @@ class DevserverTest(unittest.TestCase):
"""Starts devserver, returns process."""
cmd = [
'python',
+ os.path.join(base_dir, 'devserver.py'),
'devserver.py',
'--factory_config', self.factory_config,
]
« no previous file with comments | « devserver.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698