JDevlieghere created this revision. JDevlieghere added a reviewer: aprantl. JDevlieghere requested review of this revision.
We move the triple (de)composition logic into the builder in e5d08fcbac72 <https://reviews.llvm.org/rGe5d08fcbac722d487973d9c96838c0589f1953c3> but this test is relying on Make to construct the `ARCH_CFLAGS` from the given `TRIPLE`. This updates the test to pass `ARC`, `ARCH_CFLAGS` and `SDKROOT` instead. https://reviews.llvm.org/D86244 Files: lldb/test/API/macosx/simulator/TestSimulatorPlatform.py Index: lldb/test/API/macosx/simulator/TestSimulatorPlatform.py =================================================================== --- lldb/test/API/macosx/simulator/TestSimulatorPlatform.py +++ lldb/test/API/macosx/simulator/TestSimulatorPlatform.py @@ -20,7 +20,7 @@ found = 0 for line in load_cmds.split('\n'): if expected_load_command in line: - found += 1 + found += 1 self.assertEquals( found, 1, "wrong number of load commands for {}".format( expected_load_command)) @@ -46,7 +46,24 @@ def run_with(self, arch, os, vers, env, expected_load_command): env_list = [env] if env else [] triple = '-'.join([arch, 'apple', os + vers] + env_list) - self.build(dictionary={'TRIPLE': triple}) + + version_min = '' + if vers: + if env == 'simulator': + version_min = '-m{}-simulator-version-min={}'.format(os, vers) + elif os == 'macosx': + version_min = '-m{}-version-min={}'.format(os, vers) + + sdk = lldbutil.get_xcode_sdk(os, env) + sdk_root = lldbutil.get_xcode_sdk_root(sdk) + + self.build( + dictionary={ + 'ARCH': arch, + 'ARCH_CFLAGS': '-target {} {}'.format(triple, version_min), + 'SDKROOT': sdk_root + }) + self.check_load_commands(expected_load_command) log = self.getBuildArtifact('packets.log') self.expect("log enable gdb-remote packets -f "+log)
Index: lldb/test/API/macosx/simulator/TestSimulatorPlatform.py =================================================================== --- lldb/test/API/macosx/simulator/TestSimulatorPlatform.py +++ lldb/test/API/macosx/simulator/TestSimulatorPlatform.py @@ -20,7 +20,7 @@ found = 0 for line in load_cmds.split('\n'): if expected_load_command in line: - found += 1 + found += 1 self.assertEquals( found, 1, "wrong number of load commands for {}".format( expected_load_command)) @@ -46,7 +46,24 @@ def run_with(self, arch, os, vers, env, expected_load_command): env_list = [env] if env else [] triple = '-'.join([arch, 'apple', os + vers] + env_list) - self.build(dictionary={'TRIPLE': triple}) + + version_min = '' + if vers: + if env == 'simulator': + version_min = '-m{}-simulator-version-min={}'.format(os, vers) + elif os == 'macosx': + version_min = '-m{}-version-min={}'.format(os, vers) + + sdk = lldbutil.get_xcode_sdk(os, env) + sdk_root = lldbutil.get_xcode_sdk_root(sdk) + + self.build( + dictionary={ + 'ARCH': arch, + 'ARCH_CFLAGS': '-target {} {}'.format(triple, version_min), + 'SDKROOT': sdk_root + }) + self.check_load_commands(expected_load_command) log = self.getBuildArtifact('packets.log') self.expect("log enable gdb-remote packets -f "+log)
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits