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
Remove TaskConstructionTester default run destination argument
This makes it more obvious that a task construction test is targeting the macOS platform, and makes our test infrastructure slightly less Apple-centric by ceasing to encode an implicit assumption of a default platform.
Copy file name to clipboardExpand all lines: Sources/SWBTestSupport/PlatformFilter.swift
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -126,7 +126,7 @@ extension CoreBasedTests {
126
126
127
127
letfiltersString= platformFilters.sorted().map{ $0.platform +($0.environment.nilIfEmpty.map{"-\($0)"}??"")}.joined(separator:", ") // Just for test logging.
128
128
129
-
tryawaitTaskConstructionTester(core, testWorkspace).checkBuild(BuildParameters(configuration:"Debug", activeRunDestination: runDestination), userPreferences:UserPreferences.defaultForTesting.with(enableDebugActivityLogs:true)){ results in
129
+
tryawaitTaskConstructionTester(core, testWorkspace).checkBuild(BuildParameters(configuration:"Debug"), runDestination: runDestination, userPreferences:UserPreferences.defaultForTesting.with(enableDebugActivityLogs:true)){ results in
// If the build parameters don't specify a run destination, but we were passed one, then use the one we were passed. (checkBuild() defaults this to .macOS.)
preconditionFailure("Specified run destinations from both explicit build parameters and default destination: \(lhs), \(rhs)")
772
+
caselet(.some(destination),nil):
773
+
destination
774
+
caselet(nil,.some(destination)):
775
+
destination
776
+
case(nil,nil):
777
+
nil
778
+
}
770
779
771
780
// Define a default set of overrides.
772
781
varoverrides=[
@@ -781,14 +790,14 @@ package final class TaskConstructionTester {
781
790
782
791
// If we have a run destination, then we default ONLY_ACTIVE_ARCH to YES. This means when they build with a non-generic run destination, that run destination's architecture will be used rather than building universal.
783
792
// If we don't have a run destination, then defaulting ONLY_ACTIVE_ARCH is probably the wrong thing to do.
784
-
ifrunDestination!=nil{
793
+
ifactiveRunDestination!=nil{
785
794
overrides["ONLY_ACTIVE_ARCH"]="YES"
786
795
}
787
796
// Add overrides from the parameters we were passed, which will supersede the default overrides above.
/// Returns the effective build request to use for the build.
@@ -819,7 +828,7 @@ package final class TaskConstructionTester {
819
828
/// Construct the tasks for the given build parameters, and test the result.
820
829
/// - parameter runDestination: If the run destination in `parameter` is nil, then the value passed here will be used instead. Due to the defined default value, this means that tests build for macOS unless they specify otherwise.
821
830
/// - parameter checkTaskGraphIntegrity: If `true` (the default), then the task graph's integrity will be checked, and test errors will be emitted for scenarios such as missing producers for nodes, and multiple producers for nodes. A test may wish to pass `false` for this if it is deliberately constructing a bad task graph in order to examine the resulting errors.
0 commit comments