From f9b906675fbfebdfaff452b2126302f814a3e7b4 Mon Sep 17 00:00:00 2001
From: Dariusz Rybicki <dariusz@elixxir.io>
Date: Tue, 30 Aug 2022 01:36:34 +0100
Subject: [PATCH] Update run-tests script

---
 run-tests.sh | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/run-tests.sh b/run-tests.sh
index c997bc19..21fc4d89 100755
--- a/run-tests.sh
+++ b/run-tests.sh
@@ -4,15 +4,17 @@ set -e
 echo "\n\033[1;32mâ–¶ Xcode version\033[0m"
 xcodebuild -version
 
-if [ ! -n "$1" ]; then
+if [ "$1" = "macos" ]; then
 
   echo "\n\033[1;32mâ–¶ Running package tests on macOS...\033[0m"
   set -o pipefail && swift test 2>&1 | ./xcbeautify
 
+elif [ "$1" = "ios" ]; then
+
   echo "\n\033[1;32mâ–¶ Running package tests on iOS Simulator...\033[0m"
   set -o pipefail && xcodebuild -scheme 'elixxir-dapps-sdk-swift-Package' -sdk iphonesimulator -destination 'platform=iOS Simulator,OS=15.5,name=iPhone 13' test | ./xcbeautify
 
-elif [ "$1" = "examples" ]; then
+elif [ "$1" = "ios-examples" ]; then
 
   echo "\n\033[1;32mâ–¶ Running XXMessenger example tests on iOS Simulator...\033[0m"
   set -o pipefail && xcodebuild -workspace 'Examples/xx-messenger/XXMessenger.xcworkspace' -scheme 'XXMessenger' -sdk iphonesimulator -destination 'platform=iOS Simulator,OS=15.5,name=iPhone 13' test | ./xcbeautify
@@ -20,8 +22,9 @@ elif [ "$1" = "examples" ]; then
 else
 
   echo "\n\033[1;31mâ–¶ Invalid option.\033[0m Usage:"
-  echo "  run-tests.sh          - Run package tests"
-  echo "  run-tests.sh examples - Run examples tests"
+  echo "  run-tests.sh macos        - Run package tests on macOS"
+  echo "  run-tests.sh ios          - Run package tests on iOS Simulator"
+  echo "  run-tests.sh ios-examples - Run iOS examples tests"
   exit 1
 
 fi
-- 
GitLab