From 6bdd710082d6beaed846beb76fa292fdb4e53953 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Tue, 22 Apr 2025 20:49:14 -0700 Subject: [PATCH] =?UTF-8?q?Add=20quiet=5Fbuild=5Fand=5Ftest.sh=20=E2=80=94?= =?UTF-8?q?=C2=A0just=20shows=20warnings=20and=20errors.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- NetNewsWire.xctestplan | 42 +++++++++++++++++++-------------------- quiet_build_and_test.sh | 44 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 21 deletions(-) create mode 100755 quiet_build_and_test.sh diff --git a/NetNewsWire.xctestplan b/NetNewsWire.xctestplan index 967295866..f5a1d35db 100644 --- a/NetNewsWire.xctestplan +++ b/NetNewsWire.xctestplan @@ -17,6 +17,27 @@ } }, "testTargets" : [ + { + "target" : { + "containerPath" : "container:RSWeb", + "identifier" : "RSWebTests", + "name" : "RSWebTests" + } + }, + { + "target" : { + "containerPath" : "container:", + "identifier" : "RSCoreTests", + "name" : "RSCoreTests" + } + }, + { + "target" : { + "containerPath" : "container:Account", + "identifier" : "AccountTests", + "name" : "AccountTests" + } + }, { "skippedTests" : [ "ScriptingTests\/testFeedOPML()" @@ -27,33 +48,12 @@ "name" : "NetNewsWireTests" } }, - { - "target" : { - "containerPath" : "container:Account", - "identifier" : "AccountTests", - "name" : "AccountTests" - } - }, { "target" : { "containerPath" : "container:RSParser", "identifier" : "RSParserTests", "name" : "RSParserTests" } - }, - { - "target" : { - "containerPath" : "container:RSWeb", - "identifier" : "RSWebTests", - "name" : "RSWebTests" - } - }, - { - "target" : { - "containerPath" : "container:Core", - "identifier" : "CoreTests", - "name" : "CoreTests" - } } ], "version" : 1 diff --git a/quiet_build_and_test.sh b/quiet_build_and_test.sh new file mode 100755 index 000000000..4804d36ff --- /dev/null +++ b/quiet_build_and_test.sh @@ -0,0 +1,44 @@ +#!/bin/bash +set -euo pipefail + +# This script is for checking that both Mac and iOS targets build and that tests pass. +# Note: depends on xcbeautify: + +# === CONFIGURABLE VARIABLES === +PROJECT_PATH="NetNewsWire.xcodeproj" +SCHEME_MAC="NetNewsWire" +SCHEME_IOS="NetNewsWire-iOS" +DESTINATION_MAC="platform=macOS,arch=arm64" +DESTINATION_IOS="platform=iOS Simulator,name=iPhone 16" + +echo "๐Ÿ›  Building macOS target..." +xcodebuild \ + -project "$PROJECT_PATH" \ + -scheme "$SCHEME_MAC" \ + -destination "$DESTINATION_MAC" \ + clean build | xcbeautify --quiet + +echo "๐Ÿ›  Building iOS target..." +xcodebuild \ + -project "$PROJECT_PATH" \ + -scheme "$SCHEME_IOS" \ + -destination "$DESTINATION_IOS" \ + clean build | xcbeautify --quiet + +echo "โœ… Builds completed." + +echo "๐Ÿงช Running tests for macOS target..." +xcodebuild \ + -project "$PROJECT_PATH" \ + -scheme "$SCHEME_MAC" \ + -destination "$DESTINATION_MAC" \ + test | xcbeautify --quiet + +echo "๐Ÿงช Running tests for iOS target..." +xcodebuild \ + -project "$PROJECT_PATH" \ + -scheme "$SCHEME_IOS" \ + -destination "$DESTINATION_IOS" \ + test | xcbeautify --quiet + +echo "๐ŸŽ‰ All builds and tests completed successfully."