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

Side by Side Diff: tools/test-server.py

Issue 10990109: test runner: fix "test-server.py setup" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright 2012 the V8 project authors. All rights reserved. 3 # Copyright 2012 the V8 project authors. All rights reserved.
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are 5 # modification, are permitted provided that the following conditions are
6 # met: 6 # met:
7 # 7 #
8 # * Redistributions of source code must retain the above copyright 8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer. 9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above 10 # * Redistributions in binary form must reproduce the above
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 try: 77 try:
78 import ujson #@UnusedImport 78 import ujson #@UnusedImport
79 except ImportError: 79 except ImportError:
80 # Install pip if it doesn't exist. 80 # Install pip if it doesn't exist.
81 code = subprocess.call("which pip", shell=True) 81 code = subprocess.call("which pip", shell=True)
82 if code != 0: 82 if code != 0:
83 apt_get_code = subprocess.call("which apt-get", shell=True) 83 apt_get_code = subprocess.call("which apt-get", shell=True)
84 if apt_get_code == 0: 84 if apt_get_code == 0:
85 print("Installing pip...") 85 print("Installing pip...")
86 _Cmd("sudo apt-get install python-pip") 86 _Cmd("sudo apt-get install python-pip")
87 print("Updating pip using itself...")
88 _Cmd("sudo pip install --upgrade pip")
89 else: 87 else:
90 print("Please install pip on your machine. You can get it at: " 88 print("Please install pip on your machine. You can get it at: "
91 "http://www.pip-installer.org/en/latest/installing.html " 89 "http://www.pip-installer.org/en/latest/installing.html "
92 "or via your distro's package manager.") 90 "or via your distro's package manager.")
93 sys.exit(1) 91 sys.exit(1)
94 print("Using pip to install UltraJSON...") 92 print("Using pip to install UltraJSON...")
95 _Cmd("sudo pip install ujson") 93 _Cmd("sudo pip install ujson")
96 94
97 # Make sure we have a key pair for signing binaries. 95 # Make sure we have a key pair for signing binaries.
98 privkeyfile = os.path.expanduser("~/.ssh/v8_dtest") 96 privkeyfile = os.path.expanduser("~/.ssh/v8_dtest")
(...skipping 16 matching lines...) Expand all
115 testrunner_dir = os.path.join(ROOT, "testrunner") 113 testrunner_dir = os.path.join(ROOT, "testrunner")
116 if os.path.exists(os.path.join(testrunner_dir, "server/daemon.py")): 114 if os.path.exists(os.path.join(testrunner_dir, "server/daemon.py")):
117 _Cmd("cd %s; svn up" % testrunner_dir) 115 _Cmd("cd %s; svn up" % testrunner_dir)
118 else: 116 else:
119 path = ("http://v8.googlecode.com/svn/branches/bleeding_edge/" 117 path = ("http://v8.googlecode.com/svn/branches/bleeding_edge/"
120 "tools/testrunner") 118 "tools/testrunner")
121 _Cmd("svn checkout --force %s %s" % (path, testrunner_dir)) 119 _Cmd("svn checkout --force %s %s" % (path, testrunner_dir))
122 120
123 # Update this very script. 121 # Update this very script.
124 path = ("http://v8.googlecode.com/svn/branches/bleeding_edge/" 122 path = ("http://v8.googlecode.com/svn/branches/bleeding_edge/"
125 "tools/server.py") 123 "tools/test-server.py")
126 scriptname = os.path.abspath(sys.argv[0]) 124 scriptname = os.path.abspath(sys.argv[0])
127 _Cmd("svn cat %s > %s" % (path, scriptname)) 125 _Cmd("svn cat %s > %s" % (path, scriptname))
128 126
129 # Check out or update V8. 127 # Check out or update V8.
130 v8_dir = os.path.join(ROOT, "v8") 128 v8_dir = os.path.join(ROOT, "v8")
131 if os.path.exists(v8_dir): 129 if os.path.exists(v8_dir):
132 _Cmd("cd %s; git fetch" % v8_dir) 130 _Cmd("cd %s; git fetch" % v8_dir)
133 else: 131 else:
134 _Cmd("git clone git://github.com/v8/v8.git %s" % v8_dir) 132 _Cmd("git clone git://github.com/v8/v8.git %s" % v8_dir)
135 133
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 print("Added certificate %s to trusted certificates." % response) 206 print("Added certificate %s to trusted certificates." % response)
209 else: 207 else:
210 print("Unknown command") 208 print("Unknown command")
211 _PrintUsage() 209 _PrintUsage()
212 sys.exit(2) 210 sys.exit(2)
213 else: 211 else:
214 print("Unknown command") 212 print("Unknown command")
215 _PrintUsage() 213 _PrintUsage()
216 sys.exit(2) 214 sys.exit(2)
217 sys.exit(0) 215 sys.exit(0)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698