[llvm-commits] [zorg] r130580 - /zorg/trunk/lnt/lnt/tests/nt.py
Daniel Dunbar
daniel at zuster.org
Fri Apr 29 20:07:04 PDT 2011
Author: ddunbar
Date: Fri Apr 29 22:07:04 2011
New Revision: 130580
URL: http://llvm.org/viewvc/llvm-project?rev=130580&view=rev
Log:
LNT/nt: Add an option to make it easier to run tests under the Darwin
iOS simulator.
Modified:
zorg/trunk/lnt/lnt/tests/nt.py
Modified: zorg/trunk/lnt/lnt/tests/nt.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/tests/nt.py?rev=130580&r1=130579&r2=130580&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/tests/nt.py (original)
+++ zorg/trunk/lnt/lnt/tests/nt.py Fri Apr 29 22:07:04 2011
@@ -59,7 +59,22 @@
if opts.disable_fp_elim:
target_llcflags.append('-disable-fp-elim')
make_variables['TARGET_LLCFLAGS'] = ' '.join(target_llcflags)
-
+
+ # Set up environment overrides if requested, to effectively run under the
+ # specified the Darwin iOS simulator.
+ #
+ # See /D/P/../Developer/Tools/RunPlatformUnitTests.
+ if opts.ios_simulator_sdk is not None:
+ make_variables['EXECUTION_ENVIRONMENT_OVERRIDES'] = ' '.join(
+ ['DYLD_FRAMEWORK_PATH="%s"' % opts.ios_simulator_sdk,
+ 'DYLD_LIBRARY_PATH=""',
+ 'DYLD_ROOT_PATH="%s"' % opts.ios_simulator_sdk,
+ 'DYLD_NEW_LOCAL_SHARED_REGIONS=YES',
+ 'DYLD_NO_FIX_PREBINDING=YES',
+ 'IPHONE_SIMULATOR_ROOT="%s"' % opts.ios_simulator_sdk,
+ 'CFFIXED_USER_HOME="%s"' % os.path.expanduser(
+ "~/Library/Application Support/iPhone Simulator/User")])
+
# Pick apart the build mode.
build_mode = opts.build_mode
if build_mode.startswith("Debug"):
@@ -753,6 +768,11 @@
help="Set remote execution client [%default]",
type=str, default="ssh", metavar="RSH",)
+ group.add_option("", "--use-ios-simulator", dest="ios_simulator_sdk",
+ help=("Execute using an iOS simulator SDK (using "
+ "environment overrides)"),
+ type=str, default=None, metavar="SDKPATH")
+
group.add_option("", "--multisample", dest="multisample",
help="Accumulate test data from multiple runs",
type=int, default=None, metavar="N")
@@ -874,6 +894,16 @@
parser.error('invalid --liblto-path argument %r' % (
opts.liblto_path,))
+ # Set up iOS simulator options.
+ if opts.ios_simulator_sdk:
+ # Warn if the user asked to run under an iOS simulator SDK, but
+ # didn't set an isysroot for compilation.
+ if opts.isysroot is None:
+ warning('expected --isysroot when executing with '
+ '--ios-simulator-sdk')
+
+ opts.isysroot = opts.ios_simulator_sdk
+
# FIXME: We need to validate that there is no configured output in the
# test-suite directory, that borks things. <rdar://problem/7876418>
More information about the llvm-commits
mailing list