@@ -102,8 +102,8 @@ def is_on_darwin() -> bool:
102
102
def set_environment (* , swiftpm_bin_dir : pathlib .Path ,) -> None :
103
103
os .environ ["SWIFTCI_IS_SELF_HOSTED" ] = "1"
104
104
105
- # Set the SWIFTPM_BIN_DIR path
106
- os .environ ["SWIFTPM_BIN_DIR " ] = str (swiftpm_bin_dir )
105
+ # Set the SWIFTPM_CUSTOM_BIN_DIR path
106
+ os .environ ["SWIFTPM_CUSTOM_BIN_DIR " ] = str (swiftpm_bin_dir )
107
107
108
108
# Ensure SDKROOT is configure
109
109
if is_on_darwin ():
@@ -133,6 +133,7 @@ def run_bootstrap(swiftpm_bin_dir: pathlib.Path) -> None:
133
133
134
134
def main () -> None :
135
135
args = get_arguments ()
136
+ ignore = "-Xlinker /ignore:4217" if os .name == "nt" else ""
136
137
logging .getLogger ().setLevel (logging .DEBUG if args .is_verbose else logging .INFO )
137
138
logging .debug ("Args: %r" , args )
138
139
@@ -144,31 +145,27 @@ def main() -> None:
144
145
shlex .split ("swift --version" ),
145
146
)
146
147
147
- # call(
148
- # shlex.split("swift package reset"),
149
- # )
150
148
call (
151
149
shlex .split ("swift package update" ),
152
150
)
153
151
call (
154
- shlex .split (f"swift build --configuration { args .config } " ),
155
- )
156
- swift_testing_arg = "--enable-swift-testing" if args .enable_swift_testing else ""
157
- xctest_arg = "--enable-xctest" if args .enable_swift_testing else ""
158
- call (
159
- shlex .split (f"swift test --configuration { args .config } --parallel { swift_testing_arg } { xctest_arg } " ),
152
+ shlex .split (f"swift build --configuration { args .config } { ignore } " ),
160
153
)
161
154
162
- with change_directory (REPO_ROOT_PATH / "IntegrationTests" ):
163
- call (
164
- shlex .split ("swift package update" ),
165
- )
166
- call (
167
- shlex .split (
168
- f"{ swiftpm_bin_dir / 'swift-test' } --parallel" ,
169
- posix = (os .name == "posix" ), # must be set correctly, otherwhsie shlex.split("C:\\Foo\\bar") become ['CFoobar']
170
- ),
171
- )
155
+ if os .name != "nt" : # turn off for Windows until we get the hang resolved
156
+ swift_testing_arg = "--enable-swift-testing" if args .enable_swift_testing else ""
157
+ xctest_arg = "--enable-xctest" if args .enable_swift_testing else ""
158
+ call (
159
+ shlex .split (f"swift run swift-test --configuration { args .config } --parallel { swift_testing_arg } { xctest_arg } --scratch-path .test { ignore } " ),
160
+ )
161
+
162
+ integration_test_dir = REPO_ROOT_PATH / "IntegrationTests"
163
+ call (
164
+ shlex .split (f"swift package --package-path { integration_test_dir } update" ),
165
+ )
166
+ call (
167
+ shlex .split (f"swift run swift-test --package-path { integration_test_dir } --parallel { ignore } " ),
168
+ )
172
169
173
170
if is_on_darwin ():
174
171
run_bootstrap (swiftpm_bin_dir = swiftpm_bin_dir )
0 commit comments