Skip to content

Commit

Permalink
Disable building tests when building SwiftUI previews
Browse files Browse the repository at this point in the history
  • Loading branch information
buggmagnet committed Jan 16, 2025
1 parent b7ac66c commit abd22d4
Showing 1 changed file with 135 additions and 2 deletions.
137 changes: 135 additions & 2 deletions ios/MullvadVPN.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -4727,6 +4727,7 @@
isa = PBXNativeTarget;
buildConfigurationList = 589A455928E094B300565204 /* Build configuration list for PBXNativeTarget "OperationsTests" */;
buildPhases = (
A948D1CA2D390832009EF2DC /* Do not build tests for previews */,
589A454E28E094B300565204 /* Sources */,
589A454F28E094B300565204 /* Frameworks */,
589A455028E094B300565204 /* Resources */,
Expand All @@ -4745,6 +4746,7 @@
isa = PBXNativeTarget;
buildConfigurationList = 58B0A2A5238EE67E00BC001D /* Build configuration list for PBXNativeTarget "MullvadVPNTests" */;
buildPhases = (
A948D1C92D3907A3009EF2DC /* Do not build tests for previews */,
58B0A29C238EE67E00BC001D /* Sources */,
58B0A29D238EE67E00BC001D /* Frameworks */,
58B0A29E238EE67E00BC001D /* Resources */,
Expand Down Expand Up @@ -4812,6 +4814,7 @@
isa = PBXNativeTarget;
buildConfigurationList = 58C7A44E2A863F4A0060C66F /* Build configuration list for PBXNativeTarget "PacketTunnelCoreTests" */;
buildPhases = (
A948D1CB2D390860009EF2DC /* Do not build tests for previews */,
58C7A4392A863F450060C66F /* Sources */,
58C7A43A2A863F450060C66F /* Frameworks */,
58C7A43B2A863F450060C66F /* Resources */,
Expand Down Expand Up @@ -4960,6 +4963,7 @@
isa = PBXNativeTarget;
buildConfigurationList = 58FBFBEF291622580020E046 /* Build configuration list for PBXNativeTarget "MullvadRESTTests" */;
buildPhases = (
A948D1CC2D39087C009EF2DC /* Do not build tests for previews */,
58FBFBE2291622580020E046 /* Sources */,
58FBFBE3291622580020E046 /* Frameworks */,
58FBFBE4291622580020E046 /* Resources */,
Expand Down Expand Up @@ -4998,6 +5002,7 @@
isa = PBXNativeTarget;
buildConfigurationList = 7A88DCE82A8FABBF00D2FF0E /* Build configuration list for PBXNativeTarget "RoutingTests" */;
buildPhases = (
A948D1CD2D39088E009EF2DC /* Do not build tests for previews */,
7A88DCD32A8FABBE00D2FF0E /* Sources */,
7A88DCD42A8FABBE00D2FF0E /* Frameworks */,
7A88DCD52A8FABBE00D2FF0E /* Resources */,
Expand Down Expand Up @@ -5063,6 +5068,7 @@
isa = PBXNativeTarget;
buildConfigurationList = A9D9A4C72C36D53C004088DD /* Build configuration list for PBXNativeTarget "MullvadRustRuntimeTests" */;
buildPhases = (
A948D1CE2D3908A3009EF2DC /* Do not build tests for previews */,
A9D9A4BC2C36D53C004088DD /* Sources */,
A9D9A4BD2C36D53C004088DD /* Frameworks */,
A9D9A4BE2C36D53C004088DD /* Resources */,
Expand All @@ -5085,6 +5091,7 @@
isa = PBXNativeTarget;
buildConfigurationList = F0ACE3162BE4E479006D5333 /* Build configuration list for PBXNativeTarget "MullvadMockData" */;
buildPhases = (
A9477FCE2D3918DD005A389D /* Do not build Mock Data for SwiftUI previews */,
F0ACE3032BE4E478006D5333 /* Headers */,
F0ACE3042BE4E478006D5333 /* Sources */,
F0ACE3052BE4E478006D5333 /* Frameworks */,
Expand Down Expand Up @@ -5397,7 +5404,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if [[ \"$(uname -m)\" == arm64 ]]; then\n export PATH=\"/opt/homebrew/bin:$PATH\"\nfi\n\nif which swiftlint > /dev/null; then\n swiftlint\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n";
shellScript = "if [ \"$ENABLE_PREVIEWS\" == \"YES\" ]; then\n echo \"Do not swiftlint for previews\"\n exit 0\nfi\n\nif [[ \"$(uname -m)\" == arm64 ]]; then\n export PATH=\"/opt/homebrew/bin:$PATH\"\nfi\n\nif which swiftlint > /dev/null; then\n swiftlint\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n";
};
580E3F222A9861990061809D /* Run SwiftLint */ = {
isa = PBXShellScriptBuildPhase;
Expand All @@ -5416,7 +5423,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if [[ \"$(uname -m)\" == arm64 ]]; then\n export PATH=\"/opt/homebrew/bin:$PATH\"\nfi\n\nif which swiftlint > /dev/null; then\n swiftlint PacketTunnel/**/*.swift\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n";
shellScript = "if [ \"$ENABLE_PREVIEWS\" == \"YES\" ]; then\n echo \"Do not swiftlint for previews\"\n exit 0\nfi\n\nif [[ \"$(uname -m)\" == arm64 ]]; then\n export PATH=\"/opt/homebrew/bin:$PATH\"\nfi\n\nif which swiftlint > /dev/null; then\n swiftlint PacketTunnel/**/*.swift\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n";
};
A93969802CE603110032A7A0 /* Import maybenot_machines */ = {
isa = PBXShellScriptBuildPhase;
Expand All @@ -5436,6 +5443,132 @@
shellPath = /bin/sh;
shellScript = "MAYBENOT_MACHINES=`cat ${SRCROOT}/../dist-assets/maybenot_machines`\ncat > ${SRCROOT}/PacketTunnelCore/Daita/Maybenot.swift << EOF\n// swiftlint:disable line_length\n// This is an autogenerated file, do not edit\npublic struct Maybenot {\n public let machines=\"\"\"\n$MAYBENOT_MACHINES\n\"\"\"\n public let maximumEvents: UInt32 = 2048\n public let maximumActions: UInt32 = 1024\n public let maximumPadding: Double = 1.0\n public let maximumBlocking: Double = 1.0\n}\n// swiftlint:enable line_length\nEOF\n";
};
A9477FCE2D3918DD005A389D /* Do not build Mock Data for SwiftUI previews */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "Do not build Mock Data for SwiftUI previews";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# Type a script or drag a script file from your workspace to insert its path.\nif [ \"$ENABLE_PREVIEWS\" == \"YES\" ]; then\n echo \"Do not build MockData for previews\"\n exit 0\nfi\n";
};
A948D1C92D3907A3009EF2DC /* Do not build tests for previews */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "Do not build tests for previews";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# Type a script or drag a script file from your workspace to insert its path.\nif [ \"$ENABLE_PREVIEWS\" == \"YES\" ]; then\n echo \"Do not build tests for previews\"\n exit 0\nfi\n";
};
A948D1CA2D390832009EF2DC /* Do not build tests for previews */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "Do not build tests for previews";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# Type a script or drag a script file from your workspace to insert its path.\nif [ \"$ENABLE_PREVIEWS\" == \"YES\" ]; then\n echo \"Do not build tests for previews\"\n exit 0\nfi\n";
};
A948D1CB2D390860009EF2DC /* Do not build tests for previews */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "Do not build tests for previews";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# Type a script or drag a script file from your workspace to insert its path.\nif [ \"$ENABLE_PREVIEWS\" == \"YES\" ]; then\n echo \"Do not build tests for previews\"\n exit 0\nfi\n";
};
A948D1CC2D39087C009EF2DC /* Do not build tests for previews */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "Do not build tests for previews";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# Type a script or drag a script file from your workspace to insert its path.\nif [ \"$ENABLE_PREVIEWS\" == \"YES\" ]; then\n echo \"Do not build tests for previews\"\n exit 0\nfi\n";
};
A948D1CD2D39088E009EF2DC /* Do not build tests for previews */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "Do not build tests for previews";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# Type a script or drag a script file from your workspace to insert its path.\nif [ \"$ENABLE_PREVIEWS\" == \"YES\" ]; then\n echo \"Do not build tests for previews\"\n exit 0\nfi\n";
};
A948D1CE2D3908A3009EF2DC /* Do not build tests for previews */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "Do not build tests for previews";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# Type a script or drag a script file from your workspace to insert its path.\nif [ \"$ENABLE_PREVIEWS\" == \"YES\" ]; then\n echo \"Do not build tests for previews\"\n exit 0\nfi\n";
};
A992DA2A2C2470B300DE7CE5 /* Build MullvadRustRuntime */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down

0 comments on commit abd22d4

Please sign in to comment.