From c66d1d8e6095c3a013e3f304303adfcc3303d610 Mon Sep 17 00:00:00 2001 From: Jose Date: Mon, 13 Mar 2023 14:02:07 +0100 Subject: Fix fallback path for Swift iOS test driver --- scripts/Util.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'scripts/Util.py') diff --git a/scripts/Util.py b/scripts/Util.py index 2f582c8b3ca..7467d5115ad 100644 --- a/scripts/Util.py +++ b/scripts/Util.py @@ -4059,15 +4059,14 @@ class SwiftMapping(Mapping): targetBuildDir = re.search("\sTARGET_BUILD_DIR = (.*)", run(cmd)).groups(1)[0] testDriver = os.path.join(targetBuildDir, "TestDriver.app") - if os.path.exists(testDriver): - return testDriver - else: + if not os.path.exists(testDriver): # Fallback location, required with Xcode 14.2 - return os.path.join( + testDriver = os.path.join( current.testcase.getMapping().getPath(), "build", "{0}-{1}".format(current.config.buildConfig, current.config.buildPlatform), - "/TestDriver.app") + "TestDriver.app") + return testDriver def getSSLProps(self, process, current): props = Mapping.getByName("cpp").getSSLProps(process, current) -- cgit v1.2.3