Commit 18e51d1
authored
[tests] Enable more tests to run on all 3 runtimes, part 5 (#10592)
This expands test coverage across the MSBuild task tests to support
and validate multiple Android runtimes (such as MonoVM, CoreCLR, and
NativeAOT).
**Multi-runtime test support and parameterization:**
- Updated test methods in `AidlTest.cs`,
`AndroidDependenciesTests.cs`, and `AndroidGradleProjectTests.cs` to
accept an `AndroidRuntime` parameter using the `[Values]` attribute,
enabling tests to run across all supported runtimes. Tests now call
`proj.SetRuntime(runtime)` and set the `IsRelease` property based on
the runtime. Unsupported configurations are skipped using
`IgnoreUnsupportedConfiguration`.
**Test data refactoring for runtime coverage:**
- Refactored test case sources (e.g., `Get_AGPMetadataTestSources`,
`Get_GetDependencyNdkRequiredConditionsData`) to generate test data
for each runtime, ensuring comprehensive coverage and reducing code
duplication.
**Test output and assertion improvements:**
- Adjusted file assertions to account for runtime-specific
configuration, such as lowercasing configuration names to avoid
failures on case-sensitive filesystems.
**Graceful handling of unsupported scenarios:**
- Incorporated logic to skip or ignore tests for runtimes that do not
support certain features (e.g., AOT or profiled AOT), improving
reliability and clarity of test results.1 parent 3b378e3 commit 18e51d1
File tree
5 files changed
+602
-157
lines changed- src/Xamarin.Android.Build.Tasks/Tests
- Xamarin.Android.Build.Tests
- Xamarin.ProjectTools/Android
5 files changed
+602
-157
lines changedLines changed: 24 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | | - | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| 21 | + | |
20 | 22 | | |
21 | | - | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
27 | | - | |
| 29 | + | |
28 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
29 | 35 | | |
30 | 36 | | |
31 | 37 | | |
| |||
36 | 42 | | |
37 | 43 | | |
38 | 44 | | |
39 | | - | |
| 45 | + | |
40 | 46 | | |
41 | 47 | | |
42 | 48 | | |
43 | | - | |
| 49 | + | |
44 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
45 | 55 | | |
46 | 56 | | |
47 | 57 | | |
| |||
50 | 60 | | |
51 | 61 | | |
52 | 62 | | |
53 | | - | |
| 63 | + | |
54 | 64 | | |
55 | 65 | | |
56 | 66 | | |
57 | | - | |
| 67 | + | |
58 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
59 | 73 | | |
60 | 74 | | |
61 | 75 | | |
| |||
71 | 85 | | |
72 | 86 | | |
73 | 87 | | |
74 | | - | |
| 88 | + | |
75 | 89 | | |
76 | 90 | | |
77 | 91 | | |
78 | | - | |
| 92 | + | |
79 | 93 | | |
80 | 94 | | |
81 | 95 | | |
82 | 96 | | |
83 | 97 | | |
84 | 98 | | |
85 | | - | |
| 99 | + | |
86 | 100 | | |
87 | 101 | | |
88 | 102 | | |
Lines changed: 69 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
24 | 29 | | |
25 | 30 | | |
26 | 31 | | |
| |||
39 | 44 | | |
40 | 45 | | |
41 | 46 | | |
42 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
43 | 51 | | |
44 | 52 | | |
45 | 53 | | |
| |||
117 | 125 | | |
118 | 126 | | |
119 | 127 | | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
120 | 150 | | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
| 151 | + | |
| 152 | + | |
125 | 153 | | |
126 | | - | |
127 | | - | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
128 | 174 | | |
129 | 175 | | |
130 | 176 | | |
| |||
143 | 189 | | |
144 | 190 | | |
145 | 191 | | |
146 | | - | |
| 192 | + | |
147 | 193 | | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
148 | 199 | | |
149 | 200 | | |
150 | 201 | | |
151 | 202 | | |
152 | 203 | | |
153 | 204 | | |
154 | 205 | | |
155 | | - | |
| 206 | + | |
156 | 207 | | |
157 | 208 | | |
| 209 | + | |
158 | 210 | | |
159 | 211 | | |
160 | 212 | | |
| |||
177 | 229 | | |
178 | 230 | | |
179 | 231 | | |
180 | | - | |
| 232 | + | |
181 | 233 | | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
182 | 239 | | |
183 | 240 | | |
184 | 241 | | |
| |||
189 | 246 | | |
190 | 247 | | |
191 | 248 | | |
192 | | - | |
| 249 | + | |
193 | 250 | | |
194 | 251 | | |
195 | 252 | | |
| |||
0 commit comments