From a86a540d520b93a5f7f3c57b6f73d75aeec84f75 Mon Sep 17 00:00:00 2001 From: 3405691582 Date: Wed, 22 Jul 2020 20:38:39 -0400 Subject: [PATCH] [test] Invert stdlib_dir conditional sense. In #32903, a substitution pseudovariable was introduced to refer to the path containing Swift.swiftmodule. Since builds on Linux put this file in a path with a subdirectory named after the architecture name -- and presumably builds on mac OS do not, a conditional was required to distinguish these two cases. However, builds on OpenBSD for example also put Swift.swiftmodule in a similar subdirectory like Linux. Thus, invert the sense of this conditional to encompass both Linux, OpenBSD, and make mac OS the specific case, which it is here. --- test/lit.cfg | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/lit.cfg b/test/lit.cfg index e15dbbf6b77a7..99514d9637758 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -1441,10 +1441,10 @@ config.substitutions.append(('%target-sdk-name', config.target_sdk_name)) # Add 'stdlib_dir' as the path to the stdlib resource directory stdlib_dir = os.path.join(config.swift_lib_dir, "swift") -if platform.system() == 'Linux' or platform.system() == 'Windows': - stdlib_dir = os.path.join(stdlib_dir, config.target_sdk_name, run_cpu) -else: +if platform.system() == 'Darwin': stdlib_dir = os.path.join(stdlib_dir, config.target_sdk_name) +else: + stdlib_dir = os.path.join(stdlib_dir, config.target_sdk_name, target_arch) config.substitutions.append(('%stdlib_dir', stdlib_dir)) # Add 'stdlib_module' as the path to the stdlib .swiftmodule file