You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #3398, we introduced a way to check whether a compiler supports specific flags. This functionality relies on the Swift Driver and therefore the `Build` module which isn't available on all platforms and therefore shouldn't be used by `SPMTestSupport`.
This change removes the dependency and replaces the check in tests with a check for the 5.5 Swift compiler instead.
Copy file name to clipboardExpand all lines: Tests/FunctionalTests/MiscellaneousTests.swift
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -562,7 +562,9 @@ class MiscellaneousTestCase: XCTestCase {
562
562
563
563
func testTestsCanLinkAgainstExecutable()throws{
564
564
// Check if the host compiler supports the '-entry-point-function-name' flag.
565
-
tryXCTSkipUnless(Resources.default.swiftCompilerSupportsRenamingMainSymbol,"skipping because host compiler doesn't support '-entry-point-function-name'")
565
+
#if swift(>=5.5)
566
+
tryXCTSkipIf(true,"skipping because host compiler doesn't support '-entry-point-function-name'")
567
+
#endif
566
568
567
569
fixture(name:"Miscellaneous/TestableExe"){ prefix in
// Check if the host compiler supports the '-entry-point-function-name' flag. It's not needed for this test but is needed to build any executable from a package that uses tools version 5.5.
19
-
tryXCTSkipUnless(Resources.default.swiftCompilerSupportsRenamingMainSymbol,"skipping because host compiler doesn't support '-entry-point-function-name'")
19
+
#if swift(>=5.5)
20
+
tryXCTSkipIf(true,"skipping because host compiler doesn't support '-entry-point-function-name'")
// Check if the host compiler supports the '-entry-point-function-name' flag. It's not needed for this test but is needed to build any executable from a package that uses tools version 5.5.
38
-
tryXCTSkipUnless(Resources.default.swiftCompilerSupportsRenamingMainSymbol,"skipping because host compiler doesn't support '-entry-point-function-name'")
40
+
#if swift(>=5.5)
41
+
tryXCTSkipIf(true,"skipping because host compiler doesn't support '-entry-point-function-name'")
// Check if the host compiler supports the '-entry-point-function-name' flag. It's not needed for this test but is needed to build any executable from a package that uses tools version 5.5.
57
-
tryXCTSkipUnless(Resources.default.swiftCompilerSupportsRenamingMainSymbol,"skipping because host compiler doesn't support '-entry-point-function-name'")
61
+
#if swift(>=5.5)
62
+
tryXCTSkipIf(true,"skipping because host compiler doesn't support '-entry-point-function-name'")
63
+
#endif
58
64
59
65
fixture(name:"Miscellaneous/Plugins"){ path in
60
66
do{
@@ -73,7 +79,9 @@ class PluginTests: XCTestCase {
73
79
74
80
func testContrivedTestCases()throws{
75
81
// Check if the host compiler supports the '-entry-point-function-name' flag. It's not needed for this test but is needed to build any executable from a package that uses tools version 5.5.
76
-
tryXCTSkipUnless(Resources.default.swiftCompilerSupportsRenamingMainSymbol,"skipping because host compiler doesn't support '-entry-point-function-name'")
82
+
#if swift(>=5.5)
83
+
tryXCTSkipIf(true,"skipping because host compiler doesn't support '-entry-point-function-name'")
84
+
#endif
77
85
78
86
fixture(name:"Miscellaneous/Plugins"){ path in
79
87
do{
@@ -92,7 +100,10 @@ class PluginTests: XCTestCase {
92
100
93
101
func testPluginScriptSandbox()throws{
94
102
// Check if the host compiler supports the '-entry-point-function-name' flag. It's not needed for this test but is needed to build any executable from a package that uses tools version 5.5.
95
-
tryXCTSkipUnless(Resources.default.swiftCompilerSupportsRenamingMainSymbol,"skipping because host compiler doesn't support '-entry-point-function-name'")
103
+
#if swift(>=5.5)
104
+
tryXCTSkipIf(true,"skipping because host compiler doesn't support '-entry-point-function-name'")
105
+
#endif
106
+
96
107
#if os(macOS)
97
108
fixture(name:"Miscellaneous/Plugins"){ path in
98
109
do{
@@ -110,7 +121,10 @@ class PluginTests: XCTestCase {
110
121
111
122
func testUseOfVendedBinaryTool()throws{
112
123
// Check if the host compiler supports the '-entry-point-function-name' flag. It's not needed for this test but is needed to build any executable from a package that uses tools version 5.5.
113
-
tryXCTSkipUnless(Resources.default.swiftCompilerSupportsRenamingMainSymbol,"skipping because host compiler doesn't support '-entry-point-function-name'")
124
+
#if swift(>=5.5)
125
+
tryXCTSkipIf(true,"skipping because host compiler doesn't support '-entry-point-function-name'")
0 commit comments