forked from simonguest/quick-camera
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun_tests.sh
More file actions
executable file
·40 lines (32 loc) · 997 Bytes
/
run_tests.sh
File metadata and controls
executable file
·40 lines (32 loc) · 997 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
# Run CapturePlay tests from command line
# Usage: ./run_tests.sh [test_class] [test_method]
set -e
# Get the directory where this script is located
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$SCRIPT_DIR"
# Default destination
DESTINATION='platform=macOS'
# Build the xcodebuild command
CMD="xcodebuild test -scheme CapturePlay -destination '$DESTINATION'"
# If test class is provided, add -only-testing flag
if [ -n "$1" ]; then
if [ -n "$2" ]; then
# Both test class and method provided
CMD="$CMD -only-testing:CapturePlayTests/$1/$2"
echo "Running specific test: $1.$2"
else
# Only test class provided
CMD="$CMD -only-testing:CapturePlayTests/$1"
echo "Running all tests in class: $1"
fi
else
echo "Running all tests..."
fi
# Run the tests
echo ""
echo "Executing: $CMD"
echo ""
eval $CMD
echo ""
echo "✅ Tests completed! Check Xcode's Report Navigator (Cmd+9) for detailed results."