Commit bb2c376
authored
[tests] Enable more tests to run on all 3 runtimes, part 6 (#10595)
This parameterizes tests to run across different Android runtimes and
refactoring the way build properties are handled for NativeAOT
scenarios.
**Test Parameterization and Runtime Handling**
* Refactored all test methods in `AssetPackTests.cs` and
`CodeBehindTests.cs` to use the `[Values]` attribute for both
`isRelease` and `AndroidRuntime runtime` parameters.
* Added logic to skip unsupported runtime/configuration combinations
using `IgnoreUnsupportedConfiguration`, preventing test failures on
invalid configurations.
**Build Properties and Warning Management**
* Refactored `GetBuildProperties` to dynamically construct the
`NoWarn` property, including additional IL and XA warnings when
running NativeAOT tests on CI, improving test reliability and output
clarity.
* Updated test logic to conditionally assert zero warnings for
non-NativeAOT runs, accommodating known issues with NativeAOT
builds.
**Test Infrastructure Improvements**
* Enhanced the `TestProjectInfo` class to track the selected runtime
and test root directory, supporting better test isolation and
reporting.
* Updated method signatures and invocations to consistently pass the
`runtime` parameter through all test helpers and runners.1 parent 9d9fde5 commit bb2c376
File tree
6 files changed
+198
-97
lines changed- src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests
- tests/CodeBehind
- BuildTests
- CommonSampleLibrary
6 files changed
+198
-97
lines changedLines changed: 22 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | | - | |
| 17 | + | |
17 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
| |||
26 | 30 | | |
27 | 31 | | |
28 | 32 | | |
| 33 | + | |
29 | 34 | | |
30 | 35 | | |
31 | 36 | | |
| |||
36 | 41 | | |
37 | 42 | | |
38 | 43 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
46 | 49 | | |
47 | 50 | | |
48 | 51 | | |
| |||
66 | 69 | | |
67 | 70 | | |
68 | 71 | | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
| 72 | + | |
75 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
| |||
117 | 118 | | |
118 | 119 | | |
119 | 120 | | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
| 121 | + | |
126 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
127 | 126 | | |
128 | 127 | | |
129 | 128 | | |
| |||
161 | 160 | | |
162 | 161 | | |
163 | 162 | | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
| 163 | + | |
170 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
171 | 168 | | |
172 | 169 | | |
173 | 170 | | |
| |||
0 commit comments