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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | client/tests/ltp/ltp.patch » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/common_lib/utils.py
diff --git a/client/common_lib/utils.py b/client/common_lib/utils.py
index fcbdd8423eb121426e615294390d3bffbb2e201b..26c4d01ed712e2121825aef62aae2d1a3390fab4 100644
--- a/client/common_lib/utils.py
+++ b/client/common_lib/utils.py
@@ -1247,3 +1247,24 @@ def sh_escape(command):
command = command.replace('"', r'\"')
command = command.replace('`', r'\`')
return command
+
+
+def configure(extra=None, configure='./configure'):
+ """
+ Run configure passing in the correct host, build, and target options.
+
+ @param extra: extra command line arguments to pass to configure
+ @param configure: which configure script to use
+ """
+ args = []
+ if 'CHOST' in os.environ:
+ args.append('--host=' + os.environ['CHOST'])
+ if 'CBUILD' in os.environ:
+ args.append('--build=' + os.environ['CBUILD'])
+ if 'CTARGET' in os.environ:
+ args.append('--target=' + os.environ['CTARGET'])
+ if extra:
+ args.append(extra)
+
+ system('%s %s' % (configure, ' '.join(args)))
+
« 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