Skip to content

Commit d513b23

Browse files
Replace MauiTestUtils with DeviceRunners nuget package (#3628)
1 parent 23ad0b4 commit d513b23

File tree

90 files changed

+200
-4792
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+200
-4792
lines changed

.generated.NoMobile.sln

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{6987A1CC-6
103103
EndProject
104104
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AndroidTestApp", "test\AndroidTestApp\AndroidTestApp.csproj", "{99E2D1A4-1853-49F9-96B6-59C70FA3DE3A}"
105105
EndProject
106-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MauiTestUtils", "MauiTestUtils", "{A11512A4-26BD-4936-B7A6-6FCE2E78FA80}"
107-
EndProject
108-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestUtils.DeviceTests.Runners.SourceGen", "test\MauiTestUtils\DeviceTests.Runners.SourceGen\TestUtils.DeviceTests.Runners.SourceGen.csproj", "{7C1A1318-137E-4E1E-ADB3-C0CE2B10F779}"
109-
EndProject
110-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestUtils.DeviceTests.Runners", "test\MauiTestUtils\DeviceTests.Runners\TestUtils.DeviceTests.Runners.csproj", "{1C6F1CB1-2339-4E8B-9941-80998B940DCC}"
111-
EndProject
112-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestUtils.DeviceTests", "test\MauiTestUtils\DeviceTests\TestUtils.DeviceTests.csproj", "{E92F0A4E-2653-4341-8732-2AC9CF766739}"
113-
EndProject
114106
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sentry.Android.AssemblyReader.Tests", "test\Sentry.Android.AssemblyReader.Tests\Sentry.Android.AssemblyReader.Tests.csproj", "{3C543CED-F801-4843-BA48-76142843E1B9}"
115107
EndProject
116108
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sentry.AspNet.Tests", "test\Sentry.AspNet.Tests\Sentry.AspNet.Tests.csproj", "{7ABAA536-7BEC-46D7-9C61-82440DDC9AA8}"
@@ -178,6 +170,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "root", "root", "{233D34AB-9
178170
README.md = README.md
179171
CHANGELOG.md = CHANGELOG.md
180172
CONTRIBUTING.md = CONTRIBUTING.md
173+
Directory.Build.props = Directory.Build.props
174+
Directory.Build.targets = Directory.Build.targets
175+
global.json = global.json
176+
nuget.config = nuget.config
181177
EndProjectSection
182178
EndProject
183179
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sentry.AspNetCore.Blazor.WebAssembly", "src\Sentry.AspNetCore.Blazor.WebAssembly\Sentry.AspNetCore.Blazor.WebAssembly.csproj", "{8298202C-9983-4D0A-851D-805539EE481A}"
@@ -372,18 +368,6 @@ Global
372368
{99E2D1A4-1853-49F9-96B6-59C70FA3DE3A}.Debug|Any CPU.Build.0 = Debug|Any CPU
373369
{99E2D1A4-1853-49F9-96B6-59C70FA3DE3A}.Release|Any CPU.ActiveCfg = Release|Any CPU
374370
{99E2D1A4-1853-49F9-96B6-59C70FA3DE3A}.Release|Any CPU.Build.0 = Release|Any CPU
375-
{7C1A1318-137E-4E1E-ADB3-C0CE2B10F779}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
376-
{7C1A1318-137E-4E1E-ADB3-C0CE2B10F779}.Debug|Any CPU.Build.0 = Debug|Any CPU
377-
{7C1A1318-137E-4E1E-ADB3-C0CE2B10F779}.Release|Any CPU.ActiveCfg = Release|Any CPU
378-
{7C1A1318-137E-4E1E-ADB3-C0CE2B10F779}.Release|Any CPU.Build.0 = Release|Any CPU
379-
{1C6F1CB1-2339-4E8B-9941-80998B940DCC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
380-
{1C6F1CB1-2339-4E8B-9941-80998B940DCC}.Debug|Any CPU.Build.0 = Debug|Any CPU
381-
{1C6F1CB1-2339-4E8B-9941-80998B940DCC}.Release|Any CPU.ActiveCfg = Release|Any CPU
382-
{1C6F1CB1-2339-4E8B-9941-80998B940DCC}.Release|Any CPU.Build.0 = Release|Any CPU
383-
{E92F0A4E-2653-4341-8732-2AC9CF766739}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
384-
{E92F0A4E-2653-4341-8732-2AC9CF766739}.Debug|Any CPU.Build.0 = Debug|Any CPU
385-
{E92F0A4E-2653-4341-8732-2AC9CF766739}.Release|Any CPU.ActiveCfg = Release|Any CPU
386-
{E92F0A4E-2653-4341-8732-2AC9CF766739}.Release|Any CPU.Build.0 = Release|Any CPU
387371
{3C543CED-F801-4843-BA48-76142843E1B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
388372
{3C543CED-F801-4843-BA48-76142843E1B9}.Debug|Any CPU.Build.0 = Debug|Any CPU
389373
{3C543CED-F801-4843-BA48-76142843E1B9}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -559,10 +543,6 @@ Global
559543
{854EBD1B-73EE-4B93-89DF-E70436FF14CB} = {230B9384-90FD-4551-A5DE-1A5C197F25B6}
560544
{5F253D7F-BF27-46F5-9382-73A66EC247BF} = {230B9384-90FD-4551-A5DE-1A5C197F25B6}
561545
{99E2D1A4-1853-49F9-96B6-59C70FA3DE3A} = {6987A1CC-608E-4868-A02C-09D30C8B7B2D}
562-
{A11512A4-26BD-4936-B7A6-6FCE2E78FA80} = {6987A1CC-608E-4868-A02C-09D30C8B7B2D}
563-
{7C1A1318-137E-4E1E-ADB3-C0CE2B10F779} = {A11512A4-26BD-4936-B7A6-6FCE2E78FA80}
564-
{1C6F1CB1-2339-4E8B-9941-80998B940DCC} = {A11512A4-26BD-4936-B7A6-6FCE2E78FA80}
565-
{E92F0A4E-2653-4341-8732-2AC9CF766739} = {A11512A4-26BD-4936-B7A6-6FCE2E78FA80}
566546
{3C543CED-F801-4843-BA48-76142843E1B9} = {6987A1CC-608E-4868-A02C-09D30C8B7B2D}
567547
{7ABAA536-7BEC-46D7-9C61-82440DDC9AA8} = {6987A1CC-608E-4868-A02C-09D30C8B7B2D}
568548
{D7D1EA68-ACE3-4DF3-A33C-EBB5B74701F5} = {6987A1CC-608E-4868-A02C-09D30C8B7B2D}

.github/workflows/device-tests-android.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ jobs:
5151
strategy:
5252
fail-fast: false
5353
matrix:
54-
# These are all a bit flaky. We used to run versions 27-31... now we just run 27 and 31
55-
api-level: [27, 31]
54+
# We run against both an older and a newer API
55+
api-level: [27, 33]
5656
env:
5757
DOTNET_CLI_TELEMETRY_OPTOUT: 1
5858
DOTNET_NOLOGO: 1
@@ -80,8 +80,8 @@ jobs:
8080

8181

8282
- name: Run Tests
83-
timeout-minutes: 30
84-
uses: reactivecircus/android-emulator-runner@f0d1ed2dcad93c7479e8b2f2226c83af54494915 # pin@v3
83+
timeout-minutes: 40
84+
uses: reactivecircus/android-emulator-runner@f0d1ed2dcad93c7479e8b2f2226c83af54494915 # Tag: v2.32.0
8585
with:
8686
api-level: ${{ matrix.api-level }}
8787
# We don't need the Google APIs, but the default images are not available for 32+

Sentry-CI-Build-macOS.slnf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
"test\\Sentry.Google.Cloud.Functions.Tests\\Sentry.Google.Cloud.Functions.Tests.csproj",
6868
"test\\Sentry.Hangfire.Tests\\Sentry.Hangfire.Tests.csproj",
6969
"test\\Sentry.Log4Net.Tests\\Sentry.Log4Net.Tests.csproj",
70+
"test\\Sentry.Maui.Device.TestApp\\Sentry.Maui.Device.TestApp.csproj",
7071
"test\\Sentry.Maui.Tests\\Sentry.Maui.Tests.csproj",
7172
"test\\Sentry.NLog.Tests\\Sentry.NLog.Tests.csproj",
7273
"test\\Sentry.OpenTelemetry.Tests\\Sentry.OpenTelemetry.Tests.csproj",

Sentry.sln

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{6987A1CC-6
103103
EndProject
104104
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AndroidTestApp", "test\AndroidTestApp\AndroidTestApp.csproj", "{99E2D1A4-1853-49F9-96B6-59C70FA3DE3A}"
105105
EndProject
106-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MauiTestUtils", "MauiTestUtils", "{A11512A4-26BD-4936-B7A6-6FCE2E78FA80}"
107-
EndProject
108-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestUtils.DeviceTests.Runners.SourceGen", "test\MauiTestUtils\DeviceTests.Runners.SourceGen\TestUtils.DeviceTests.Runners.SourceGen.csproj", "{7C1A1318-137E-4E1E-ADB3-C0CE2B10F779}"
109-
EndProject
110-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestUtils.DeviceTests.Runners", "test\MauiTestUtils\DeviceTests.Runners\TestUtils.DeviceTests.Runners.csproj", "{1C6F1CB1-2339-4E8B-9941-80998B940DCC}"
111-
EndProject
112-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestUtils.DeviceTests", "test\MauiTestUtils\DeviceTests\TestUtils.DeviceTests.csproj", "{E92F0A4E-2653-4341-8732-2AC9CF766739}"
113-
EndProject
114106
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sentry.Android.AssemblyReader.Tests", "test\Sentry.Android.AssemblyReader.Tests\Sentry.Android.AssemblyReader.Tests.csproj", "{3C543CED-F801-4843-BA48-76142843E1B9}"
115107
EndProject
116108
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sentry.AspNet.Tests", "test\Sentry.AspNet.Tests\Sentry.AspNet.Tests.csproj", "{7ABAA536-7BEC-46D7-9C61-82440DDC9AA8}"
@@ -178,6 +170,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "root", "root", "{233D34AB-9
178170
README.md = README.md
179171
CHANGELOG.md = CHANGELOG.md
180172
CONTRIBUTING.md = CONTRIBUTING.md
173+
Directory.Build.props = Directory.Build.props
174+
Directory.Build.targets = Directory.Build.targets
175+
global.json = global.json
176+
nuget.config = nuget.config
181177
EndProjectSection
182178
EndProject
183179
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sentry.AspNetCore.Blazor.WebAssembly", "src\Sentry.AspNetCore.Blazor.WebAssembly\Sentry.AspNetCore.Blazor.WebAssembly.csproj", "{8298202C-9983-4D0A-851D-805539EE481A}"
@@ -372,18 +368,6 @@ Global
372368
{99E2D1A4-1853-49F9-96B6-59C70FA3DE3A}.Debug|Any CPU.Build.0 = Debug|Any CPU
373369
{99E2D1A4-1853-49F9-96B6-59C70FA3DE3A}.Release|Any CPU.ActiveCfg = Release|Any CPU
374370
{99E2D1A4-1853-49F9-96B6-59C70FA3DE3A}.Release|Any CPU.Build.0 = Release|Any CPU
375-
{7C1A1318-137E-4E1E-ADB3-C0CE2B10F779}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
376-
{7C1A1318-137E-4E1E-ADB3-C0CE2B10F779}.Debug|Any CPU.Build.0 = Debug|Any CPU
377-
{7C1A1318-137E-4E1E-ADB3-C0CE2B10F779}.Release|Any CPU.ActiveCfg = Release|Any CPU
378-
{7C1A1318-137E-4E1E-ADB3-C0CE2B10F779}.Release|Any CPU.Build.0 = Release|Any CPU
379-
{1C6F1CB1-2339-4E8B-9941-80998B940DCC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
380-
{1C6F1CB1-2339-4E8B-9941-80998B940DCC}.Debug|Any CPU.Build.0 = Debug|Any CPU
381-
{1C6F1CB1-2339-4E8B-9941-80998B940DCC}.Release|Any CPU.ActiveCfg = Release|Any CPU
382-
{1C6F1CB1-2339-4E8B-9941-80998B940DCC}.Release|Any CPU.Build.0 = Release|Any CPU
383-
{E92F0A4E-2653-4341-8732-2AC9CF766739}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
384-
{E92F0A4E-2653-4341-8732-2AC9CF766739}.Debug|Any CPU.Build.0 = Debug|Any CPU
385-
{E92F0A4E-2653-4341-8732-2AC9CF766739}.Release|Any CPU.ActiveCfg = Release|Any CPU
386-
{E92F0A4E-2653-4341-8732-2AC9CF766739}.Release|Any CPU.Build.0 = Release|Any CPU
387371
{3C543CED-F801-4843-BA48-76142843E1B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
388372
{3C543CED-F801-4843-BA48-76142843E1B9}.Debug|Any CPU.Build.0 = Debug|Any CPU
389373
{3C543CED-F801-4843-BA48-76142843E1B9}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -559,10 +543,6 @@ Global
559543
{854EBD1B-73EE-4B93-89DF-E70436FF14CB} = {230B9384-90FD-4551-A5DE-1A5C197F25B6}
560544
{5F253D7F-BF27-46F5-9382-73A66EC247BF} = {230B9384-90FD-4551-A5DE-1A5C197F25B6}
561545
{99E2D1A4-1853-49F9-96B6-59C70FA3DE3A} = {6987A1CC-608E-4868-A02C-09D30C8B7B2D}
562-
{A11512A4-26BD-4936-B7A6-6FCE2E78FA80} = {6987A1CC-608E-4868-A02C-09D30C8B7B2D}
563-
{7C1A1318-137E-4E1E-ADB3-C0CE2B10F779} = {A11512A4-26BD-4936-B7A6-6FCE2E78FA80}
564-
{1C6F1CB1-2339-4E8B-9941-80998B940DCC} = {A11512A4-26BD-4936-B7A6-6FCE2E78FA80}
565-
{E92F0A4E-2653-4341-8732-2AC9CF766739} = {A11512A4-26BD-4936-B7A6-6FCE2E78FA80}
566546
{3C543CED-F801-4843-BA48-76142843E1B9} = {6987A1CC-608E-4868-A02C-09D30C8B7B2D}
567547
{7ABAA536-7BEC-46D7-9C61-82440DDC9AA8} = {6987A1CC-608E-4868-A02C-09D30C8B7B2D}
568548
{D7D1EA68-ACE3-4DF3-A33C-EBB5B74701F5} = {6987A1CC-608E-4868-A02C-09D30C8B7B2D}

SentryMobile.slnf

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
"src\\Sentry.Extensions.Logging\\Sentry.Extensions.Logging.csproj",
1313
"src\\Sentry.Maui\\Sentry.Maui.csproj",
1414
"src\\Sentry\\Sentry.csproj",
15-
"test\\MauiTestUtils\\DeviceTests.Runners.SourceGen\\TestUtils.DeviceTests.Runners.SourceGen.csproj",
16-
"test\\MauiTestUtils\\DeviceTests.Runners\\TestUtils.DeviceTests.Runners.csproj",
17-
"test\\MauiTestUtils\\DeviceTests\\TestUtils.DeviceTests.csproj",
1815
"test\\Sentry.Android.AssemblyReader.Tests\\Sentry.Android.AssemblyReader.Tests.csproj",
1916
"test\\Sentry.Extensions.Logging.Tests\\Sentry.Extensions.Logging.Tests.csproj",
2017
"test\\Sentry.Maui.Device.TestApp\\Sentry.Maui.Device.TestApp.csproj",

nuget.config

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
<!-- Needed for: Microsoft.DotNet.XHarness.TestRunners.Xunit -->
99
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" protocolVersion="3" />
1010

11+
<!-- Needed for: DeviceRunners.XHarness - see https://github.com/mattleibow/DeviceRunners -->
12+
<add key="mattleibow" value="https://pkgs.dev.azure.com/mattleibow/OpenSource/_packaging/test-device-runners/nuget/v3/index.json" />
13+
1114
<!-- from perfview -->
1215
<add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" />
1316
<add key="perfview-build" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/perfview-build/nuget/v3/index.json" />
@@ -26,5 +29,8 @@
2629
<packageSource key="dotnet-eng">
2730
<package pattern="Microsoft.DotNet.XHarness.*" />
2831
</packageSource>
32+
<packageSource key="mattleibow">
33+
<package pattern="DeviceRunners.*" />
34+
</packageSource>
2935
</packageSourceMapping>
3036
</configuration>

scripts/device-test.ps1

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,28 @@ try
3030
$buildDir = $CI ? 'bin' : "test/Sentry.Maui.Device.TestApp/bin/Release/$tfm/android-$arch"
3131
$arguments = @(
3232
'--app', "$buildDir/io.sentry.dotnet.maui.device.testapp-Signed.apk",
33-
'--package-name', 'io.sentry.dotnet.maui.device.testapp'
33+
'--package-name', 'io.sentry.dotnet.maui.device.testapp',
34+
'--launch-timeout', '00:10:00',
35+
'--instrumentation', 'Sentry.Maui.Device.TestApp.SentryInstrumentation'
3436
)
37+
38+
if ($CI)
39+
{
40+
$arguments += '--arg'
41+
$arguments += 'IsGitHubActions=true'
42+
}
3543
}
3644
elseif ($Platform -eq 'ios')
3745
{
3846
$tfm += 'ios'
3947
$group = 'apple'
4048
$buildDir = $CI ? 'bin' : "test/Sentry.Maui.Device.TestApp/bin/Release/$tfm/iossimulator-$arch"
49+
$envValue = $CI ? 'true' : 'false'
4150
$arguments = @(
4251
'--app', "$buildDir/Sentry.Maui.Device.TestApp.app",
4352
'--target', 'ios-simulator-64',
44-
'--launch-timeout', '00:10:00'
53+
'--launch-timeout', '00:10:00',
54+
'--set-env', 'CI=$envValue'
4555
)
4656
}
4757

scripts/generate-solution-filters-config.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ filterConfigs:
5353
patterns:
5454
- "**/*AndroidTestApp.csproj"
5555
- "**/*DeviceTests*.csproj"
56-
- "**/*Maui.Device.TestApp.csproj"
5756
- "**/*SourceGen.csproj"
5857
- "**/Sentry.Samples.Android.csproj"
5958

@@ -159,7 +158,6 @@ filterConfigs:
159158
- "test/**/Sentry.Maui.Tests.csproj"
160159
- "test/**/Sentry.Testing.csproj"
161160
- "test/**/Sentry.Tests.csproj"
162-
- "test/MauiTestUtils/**/*.csproj"
163161

164162
- outputPath: SentryNoMobile.slnf
165163
solution: .generated.NoMobile.sln

test/MauiTestUtils/DeviceTests.Runners.SourceGen/AnalyzerReleases.Shipped.md

Whitespace-only changes.

test/MauiTestUtils/DeviceTests.Runners.SourceGen/AnalyzerReleases.Unshipped.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)