forked from atteneder/glTFastDemo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run-tests.sh
executable file
·129 lines (105 loc) · 5.96 KB
/
run-tests.sh
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#!/bin/sh
set -e
PWD=$(pwd)
UNITY_2019=/Applications/Unity/Hub/Editor/2019.4.36f1
UNITY_2020=/Applications/Unity/Hub/Editor/2020.3.29f1
UNITY_2021=/Applications/Unity/Hub/Editor/2021.2.12f1
UNITY_2019_EXE="$UNITY_2019/Unity.app/Contents/MacOS/Unity"
UNITY_2020_EXE="$UNITY_2020/Unity.app/Contents/MacOS/Unity"
UNITY_2021_EXE="$UNITY_2021/Unity.app/Contents/MacOS/Unity"
if [ ! -f "$UNITY_2019_EXE" ]; then
echo "Unity not found at $UNITY_2019_EXE"
exit -1
fi
if [ ! -f "$UNITY_2020_EXE" ]; then
echo "Unity not found at $UNITY_2020_EXE"
exit -1
fi
if [ ! -f "$UNITY_2021_EXE" ]; then
echo "Unity not found at $UNITY_2021_EXE"
exit -1
fi
#
# Run Unit Tests
#
PLAYMODE_PLATFORM=StandaloneOSX
PROJECT="/Users/aa/u/glTFastDemo/projects/glTF-demo-2019.4"
echo "2019 LTS BiRP EditMode"
time $UNITY_2019_EXE -runTests -batchmode -projectPath ./projects/glTF-demo-2019.4 -testResults "$PWD/test-results/glTF-demo-2019.4-editor.xml" -testPlatform EditMode
#UnifiedTestRunner --suite=editor --testproject="$PROJECT" --editor-location="$UNITY_2019"
echo "2019 LTS BiRP PlayMode $PLAYMODE_PLATFORM"
time $UNITY_2019_EXE -runTests -batchmode -projectPath ./projects/glTF-demo-2019.4 -testResults "$PWD/test-results/glTF-demo-2019.4-runtime.xml" -testPlatform "$PLAYMODE_PLATFORM" -testCategory "!Performance"
#UnifiedTestRunner --suite=playmode --testlist="testlist.txt" --testproject="$PROJECT" --editor-location="$UNITY_2019" --platform="$PLAYMODE_PLATFORM" --a="$PWD/test-results/glTF-demo-2019.4-runtime"
echo "2019 LTS URP EditMode"
time $UNITY_2019_EXE -runTests -batchmode -projectPath ./projects/glTF-demo-2019.4-urp -testResults "$PWD/test-results/glTF-demo-2019.4-urp-editor.xml" -testPlatform EditMode
echo "2019 LTS URP PlayMode $PLAYMODE_PLATFORM"
time $UNITY_2019_EXE -runTests -batchmode -projectPath ./projects/glTF-demo-2019.4-urp -testResults "$PWD/test-results/glTF-demo-2019.4-urp-runtime.xml" -testPlatform "$PLAYMODE_PLATFORM" -testCategory "!Performance"
echo "2021.2 BiRP EditMode"
time $UNITY_2021_EXE -runTests -batchmode -projectPath ./projects/glTF-demo-2021.2 -testResults "$PWD/test-results/glTF-demo-2021.2-editor.xml" -testPlatform EditMode
echo "2021.2 BiRP PlayMode $PLAYMODE_PLATFORM"
time $UNITY_2021_EXE -runTests -batchmode -projectPath ./projects/glTF-demo-2021.2 -testResults "$PWD/test-results/glTF-demo-2021.2-runtime.xml" -testPlatform "$PLAYMODE_PLATFORM" -testCategory "!Performance"
echo "2021.2 HDRP EditMode"
time $UNITY_2021_EXE -runTests -batchmode -projectPath ./projects/glTF-demo-2021.2-hdrp -testResults "$PWD/test-results/glTF-demo-2021.2-hdrp-editor.xml" -testPlatform EditMode
echo "2021.2 HDRP PlayMode $PLAYMODE_PLATFORM"
time $UNITY_2021_EXE -runTests -batchmode -projectPath ./projects/glTF-demo-2021.2-hdrp -testResults "$PWD/test-results/glTF-demo-2021.2-hdrp-runtime.xml" -testPlatform "$PLAYMODE_PLATFORM" -testCategory "!Performance"
echo "2021.2 URP EditMode"
time $UNITY_2021_EXE -runTests -batchmode -projectPath ./projects/glTF-demo-2021.2-urp -testResults "$PWD/test-results/glTF-demo-2021.2-urp-editor.xml" -testPlatform EditMode
echo "2021.2 URP PlayMode $PLAYMODE_PLATFORM"
time $UNITY_2021_EXE -runTests -batchmode -projectPath ./projects/glTF-demo-2021.2-urp -testResults "$PWD/test-results/glTF-demo-2021.2-urp-runtime.xml" -testPlatform "$PLAYMODE_PLATFORM" -testCategory "!Performance"
echo "DOTS EditMode"
time $UNITY_2020_EXE -runTests -batchmode -projectPath ./projects/glTF-demo-dots -testResults "$PWD/test-results/glTF-demo-dots-editor.xml" -testPlatform EditMode
echo "DOTS PlayMode $PLAYMODE_PLATFORM"
time $UNITY_2020_EXE -runTests -batchmode -projectPath ./projects/glTF-demo-dots -testResults "$PWD/test-results/glTF-demo-dots-runtime.xml" -testPlatform "$PLAYMODE_PLATFORM" -testCategory "!Performance;!Export"
#
# Code Coverage
#
echo "Code Coverage EditMode"
time $UNITY_2021_EXE \
-projectPath ./projects/glTF-demo-2021.2 \
-batchmode \
-debugCodeOptimization \
-burst-disable-compilation \
-enableCodeCoverage \
-testPlatform EditMode \
-testResults "$PWD/test-results/glTF-demo-code-coverage-editmode.xml" \
-coverageResultsPath "$PWD/test-results/CodeCoverage" \
-coverageHistoryPath "$PWD/test-results/CodeCoverage" \
-coverageOptions "generateAdditionalMetrics;assemblyFilters:+glTFast,+glTFast.*,+glTFastSchema,+glTFastFakeSchema,+glTFastEditor" \
-testCategory "!Performance" \
-runTests
echo "Code Coverage PlayMode"
time $UNITY_2021_EXE \
-projectPath ./projects/glTF-demo-2021.2 \
-batchmode \
-debugCodeOptimization \
-burst-disable-compilation \
-enableCodeCoverage \
-testPlatform PlayMode \
-testResults "$PWD/test-results/glTF-demo-code-coverage-playmode.xml" \
-coverageResultsPath "$PWD/test-results/CodeCoverage" \
-coverageHistoryPath "$PWD/test-results/CodeCoverage" \
-coverageOptions "generateAdditionalMetrics;assemblyFilters:+glTFast,+glTFast.*,+glTFastSchema,+glTFastFakeSchema,+glTFastEditor" \
-testCategory "!Performance" \
-runTests
echo "Code Coverage HTML Report"
$UNITY_2021_EXE \
-projectPath ./projects/glTF-demo-2021.2 \
-batchmode \
-debugCodeOptimization \
-burst-disable-compilation \
-enableCodeCoverage \
-testPlatform PlayMode \
-testResults "$PWD/test-results/glTF-demo-coverage.xml" \
-coverageResultsPath "$PWD/test-results/CodeCoverage" \
-coverageHistoryPath "$PWD/test-results/CodeCoverage" \
-coverageOptions "generateHtmlReport;generateHtmlReportHistory;generateBadgeReport;assemblyFilters:+glTFast,+glTFast.*,+glTFastSchema,+glTFastFakeSchema,+glTFastEditor" \
-testCategory "!Performance" \
-runTests
cp "test-results/CodeCoverage/Report/badge_linecoverage.svg" "packages/glTFast/Documentation~/Images/badge_linecoverage.svg"
#
# Create builds
#
echo "glTF-demo-minsize WebGL Build"
time $UNITY_2021_EXE -batchmode -quit -projectPath ./projects/glTF-demo-minsize -executeMethod GltfDemo.Editor.BuildScripts.BuildWebPlayer -buildPath "$PWD/builds/WebGL"
echo "glTF-demo-min-feature macOS Build"
time $UNITY_2019_EXE -batchmode -quit -projectPath ./projects/glTF-demo-min-feature -buildOSXUniversalPlayer "$PWD/builds/macOS.app"