From ce118e1add93be9201e9cd69df4181c9112db398 Mon Sep 17 00:00:00 2001
From: Dariusz Rybicki <dariusz@elixxir.io>
Date: Mon, 29 Aug 2022 13:46:10 +0100
Subject: [PATCH] Update run-tests.sh

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

diff --git a/run-tests.sh b/run-tests.sh
index f1c6697a..19d132d1 100755
--- a/run-tests.sh
+++ b/run-tests.sh
@@ -1,8 +1,21 @@
 #!/bin/sh
 set -e
 
-echo "\n\033[1;32mâ–¶ Running tests on macOS...\033[0m"
-set -o pipefail && swift test 2>&1 | ./xcbeautify
+if [ "$1" = "ios" ]; then
 
-echo "\n\033[1;32mâ–¶ Running 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
+  echo "\n\033[1;32mâ–¶ Running 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" = "macos" ]; then
+  
+  echo "\n\033[1;32mâ–¶ Running tests on macOS...\033[0m"
+  set -o pipefail && swift test 2>&1 | ./xcbeautify
+
+else
+
+  echo "Invalid option. Usage:"
+  echo "  run-tests.sh ios   - Run tests on iOS Simulator"
+  echo "  run-tests.sh macos - Run tests on macOS"
+  exit 1
+
+fi
-- 
GitLab