[lldb] Set the default architecture also in buildDefault
authorRaphael Isemann <teemperor@gmail.com>
Thu, 5 Nov 2020 15:13:20 +0000 (16:13 +0100)
committerRaphael Isemann <teemperor@gmail.com>
Thu, 5 Nov 2020 15:32:05 +0000 (16:32 +0100)
In D89056 the default value for architecture was moved to `build` so that
all called functions see the same architecture value. It seems there are a
few functions that call buildDefault directly (and not via build), so
on some test configurations that set a custom arch value the architecture
value is no longer available.

This just adds the architecture code from build to buildDefault to get
the bots green again while I'm looking for a better solution.

lldb/packages/Python/lldbsuite/test/lldbtest.py

index 73007ca..08f44c7 100644 (file)
@@ -1591,6 +1591,10 @@ class Base(unittest2.TestCase):
         """Platform specific way to build the default binaries."""
         testdir = self.mydir
         testname = self.getBuildDirBasename()
+
+        if not architecture and configuration.arch:
+            architecture = configuration.arch
+
         if self.getDebugInfo():
             raise Exception("buildDefault tests must set NO_DEBUG_INFO_TESTCASE")
         module = builder_module()