[llvm-commits] [LNT] r167206 - /lnt/trunk/lnt/tests/compile.py
Michael Gottesman
mgottesman at apple.com
Wed Oct 31 19:07:40 PDT 2012
Author: mgottesman
Date: Wed Oct 31 21:07:40 2012
New Revision: 167206
URL: http://llvm.org/viewvc/llvm-project?rev=167206&view=rev
Log:
[compile test] Added code to allow a user to set arbitrary commandline arguments/env options for xcodebuild/make.
*NOTE* The make env functionality was already there. I also tidied up
things a little bit.
Modified:
lnt/trunk/lnt/tests/compile.py
Modified: lnt/trunk/lnt/tests/compile.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/tests/compile.py?rev=167206&r1=167205&r2=167206&view=diff
==============================================================================
--- lnt/trunk/lnt/tests/compile.py (original)
+++ lnt/trunk/lnt/tests/compile.py Wed Oct 31 21:07:40 2012
@@ -366,13 +366,31 @@
# Add additional arguments to force the build scenario we want.
cmd.extend(('-jobs', str(num_jobs)))
- elif build_info['style'] == 'make':
+
+ # If the user specifies any additional options to be included on the command line,
+ # append them here.
+ cmd.extend(build_info.get('extra_args', []))
+
+ # If the user specifies any extra environment variables, put
+ # them in our env dictionary.
+ env.update(build_info.get('extra_env', {}))
+ elif build_info['style'] == 'make':
+ # Get the directory in which our makefile lives.
target_dir = os.path.dirname(os.path.join(source_path, build_info['file']))
+
+ # Create our make command.
cmd = []
cmd.extend(['make', '-C', target_dir, build_info['target'], "-j",
str(num_jobs)])
- env.update(build_info.get('extra_flags', {}))
+
+ # If the user specifies any additional options to be included on the command line,
+ # append them here.
+ cmd.extend(build_info.get('extra_args', []))
+
+ # If the user specifies any extra environment variables, put
+ # them in our env dictionary.
+ env.update(build_info.get('extra_env', {}))
else:
fatal("unknown build style in project: %r" % project)
More information about the llvm-commits
mailing list