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

Side by Side Diff: client/common_lib/utils.py

Issue 1161005: autotest: Make the "ltp" test comile on ARM. (Closed)
Patch Set: Move configure() back to utils Created 10 years, 9 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
« no previous file with comments | « no previous file | client/tests/ltp/ltp.patch » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # 1 #
2 # Copyright 2008 Google Inc. Released under the GPL v2 2 # Copyright 2008 Google Inc. Released under the GPL v2
3 3
4 import os, pickle, random, re, resource, select, shutil, signal, StringIO 4 import os, pickle, random, re, resource, select, shutil, signal, StringIO
5 import socket, struct, subprocess, sys, time, textwrap, urlparse 5 import socket, struct, subprocess, sys, time, textwrap, urlparse
6 import warnings, smtplib, logging, urllib2 6 import warnings, smtplib, logging, urllib2
7 try: 7 try:
8 import hashlib 8 import hashlib
9 except ImportError: 9 except ImportError:
10 import md5, sha 10 import md5, sha
(...skipping 1229 matching lines...) Expand 10 before | Expand all | Expand 10 after
1240 quotes are NOT added and so should be added at some point by 1240 quotes are NOT added and so should be added at some point by
1241 the caller. 1241 the caller.
1242 1242
1243 See also: http://www.tldp.org/LDP/abs/html/escapingsection.html 1243 See also: http://www.tldp.org/LDP/abs/html/escapingsection.html
1244 """ 1244 """
1245 command = command.replace("\\", "\\\\") 1245 command = command.replace("\\", "\\\\")
1246 command = command.replace("$", r'\$') 1246 command = command.replace("$", r'\$')
1247 command = command.replace('"', r'\"') 1247 command = command.replace('"', r'\"')
1248 command = command.replace('`', r'\`') 1248 command = command.replace('`', r'\`')
1249 return command 1249 return command
1250
1251
1252 def configure(extra=None, configure='./configure'):
1253 """
1254 Run configure passing in the correct host, build, and target options.
1255
1256 @param extra: extra command line arguments to pass to configure
1257 @param configure: which configure script to use
1258 """
1259 args = []
1260 if 'CHOST' in os.environ:
1261 args.append('--host=' + os.environ['CHOST'])
1262 if 'CBUILD' in os.environ:
1263 args.append('--build=' + os.environ['CBUILD'])
1264 if 'CTARGET' in os.environ:
1265 args.append('--target=' + os.environ['CTARGET'])
1266 if extra:
1267 args.append(extra)
1268
1269 system('%s %s' % (configure, ' '.join(args)))
1270
OLDNEW
« no previous file with comments | « no previous file | client/tests/ltp/ltp.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698