Skip to content

Commit

Permalink
Introduce dedicated script for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
waliid committed Dec 15, 2024
1 parent b038b03 commit 5b0668b
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 14 deletions.
16 changes: 2 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,11 @@ test-streams-stop:

.PHONY: test-ios
test-ios:
@Scripts/install-pkgx.sh
@Scripts/install-bundler.sh
@echo "Running unit tests..."
@Scripts/test-streams.sh -s
@pkgx bundle exec fastlane test_ios
@Scripts/test-streams.sh -k
@echo "... done.\n"
@Scripts/test.sh --platform ios

.PHONY: test-tvos
test-tvos:
@Scripts/install-pkgx.sh
@Scripts/install-bundler.sh
@echo "Running unit tests..."
@Scripts/test-streams.sh -s
@pkgx bundle exec fastlane test_tvos
@Scripts/test-streams.sh -k
@echo "... done.\n"
@Scripts/test.sh --platform tvos

.PHONY: check-quality
check-quality:
Expand Down
30 changes: 30 additions & 0 deletions Scripts/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

set -e

function usage {
echo
echo "[!] Usage: $0 --platform [ios | tvos]"
echo
exit 1
}

if [[ "$1" != "--platform" ]]; then
usage
fi

PLATFORM="$2"
if [[ $PLATFORM != "ios" && $PLATFORM != "tvos" ]]; then
usage
fi

Scripts/test-streams.sh -s

Scripts/install-pkgx.sh
Scripts/install-bundler.sh

echo "Running unit tests..."
pkgx +xcodes bundle exec fastlane "test_$PLATFORM"
echo "... done."

Scripts/test-streams.sh -k

0 comments on commit 5b0668b

Please sign in to comment.