From 62a13e9ecd31da5ef335f245b66be826d6b5b4ff Mon Sep 17 00:00:00 2001 From: 3405691582 Date: Sat, 19 Sep 2020 20:46:53 -0400 Subject: [PATCH] [test] Erase SDKROOT since env -u is not portable. The `env -u` flag is not portable and not available on all platforms, so this unit test will fail when the feature is unavailable. Instead of trying to unset the field, just erase it instead, since trying to copy the entire invoked environment is difficult. --- .../swift_build_sdk_interfaces/early-exits.test-sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ModuleInterface/swift_build_sdk_interfaces/early-exits.test-sh b/test/ModuleInterface/swift_build_sdk_interfaces/early-exits.test-sh index d6e53a0135cd0..b951a7f01c218 100644 --- a/test/ModuleInterface/swift_build_sdk_interfaces/early-exits.test-sh +++ b/test/ModuleInterface/swift_build_sdk_interfaces/early-exits.test-sh @@ -1,7 +1,7 @@ RUN: env SWIFT_EXEC=%swiftc_driver_plain not %{python} %utils/swift_build_sdk_interfaces.py %mcp_opt 2>&1 | %FileCheck -check-prefix NO-OUTPUT %s NO-OUTPUT: argument -o is required -RUN: env -u SDKROOT SWIFT_EXEC=%swiftc_driver_plain not %{python} %utils/swift_build_sdk_interfaces.py %mcp_opt -o %t 2>&1 | %FileCheck -check-prefix NO-SDK %s +RUN: env SDKROOT='' SWIFT_EXEC=%swiftc_driver_plain not %{python} %utils/swift_build_sdk_interfaces.py %mcp_opt -o %t 2>&1 | %FileCheck -check-prefix NO-SDK %s NO-SDK: SDKROOT must be set RUN: env SWIFT_EXEC=%swiftc_driver_plain not %{python} %utils/swift_build_sdk_interfaces.py %mcp_opt -o %t -sdk %S/nonexistent 2>&1 | %FileCheck -check-prefix BAD-SDK %s