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

Unified Diff: tools/dom/dom.py

Issue 14732003: Implement Model-Driven-Views spec for Dart (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: small fix Created 7 years, 8 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
Index: tools/dom/dom.py
diff --git a/tools/dom/dom.py b/tools/dom/dom.py
index 5832af47e5ab4f6b143561bc11f7fe70088b5d1b..793764caf40fa6e2a3ee2ba4cc2f7ac9a4135eca 100755
--- a/tools/dom/dom.py
+++ b/tools/dom/dom.py
@@ -20,6 +20,10 @@ if utils.IsWindows():
else:
dart_bin = os.path.join(dart_out_dir, 'dart')
+dart_dir = os.path.abspath(os.path.join(
+ os.path.dirname(os.path.realpath(__file__)),
+ os.path.pardir, os.path.pardir))
+
def help():
print('Helper script to make it easy to perform common tasks encountered '
'during the life of a Dart DOM developer.\n'
@@ -98,8 +102,10 @@ def compile_dart2js(dart_file, checked):
def gen():
os.chdir(os.path.join('tools', 'dom', 'scripts'))
- return call([os.path.join(os.getcwd(), 'dartdomgenerator.py'),
+ result = call([os.path.join(os.getcwd(), 'dartdomgenerator.py'),
'--rebuild', '--parallel', '--systems=htmldart2js,htmldartium'])
+ os.chdir(os.path.join('..', '..', '..'))
+ return result
def http_server():
print('Browse tests at '
@@ -166,13 +172,6 @@ def call(args):
print error
return pipe.returncode
-def init_dir():
- ''' Makes sure that we're always rooted in the dart root folder.'''
- dart_dir = os.path.abspath(os.path.join(
- os.path.dirname(os.path.realpath(__file__)),
- os.path.pardir, os.path.pardir))
- os.chdir(dart_dir)
-
commands = {
'analyze': [analyze, 'Run the dart analyzer'],
'build': [build, 'Build dart in release mode'],
@@ -201,7 +200,8 @@ def main():
success = False
while (argv):
- init_dir()
+ # Make sure that we're always rooted in the dart root folder.
+ os.chdir(dart_dir)
command = argv.pop(0)
if not command in commands:

Powered by Google App Engine
This is Rietveld 408576698