Skip to content

Commit d376590

Browse files
authored
[Mono.Android-Tests] Remove obsolete .shproj file. (#9758)
`Mono.Android-Tests` still uses a `.shproj` file from the time when we had both a Classic XA and .NET version. However, VS does not seem to support this anymore, and none of the included files appear in the IDE, making it hard to write new tests. Remove the `.shproj` file and update the `.csproj` file to directly point to needed files. Also do some other cleanups like removing tests that are no longer run and fixing directory structure. Verified that both the `main` version and this PR run 885 tests on CI.
1 parent 70bd636 commit d376590

File tree

99 files changed

+252
-726
lines changed

Some content is hidden

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

99 files changed

+252
-726
lines changed

.vscode/tasks.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@
126126
{
127127
"label": "prepare-sample-under-dotnet",
128128
"type": "shell",
129-
"windows": { "command": "dotnet-local.cmd build --no-restore tests/Mono.Android-Tests/Runtime-Microsoft.Android.Sdk/Mono.Android.NET-Tests.csproj -c ${input:configuration} -t:GenerateNuGetConfig -p:AndroidNETTestConfigOutputDir=${workspaceRoot}/samples", },
130-
"linux": { "command": "./dotnet-local.sh build --no-restore tests/Mono.Android-Tests/Runtime-Microsoft.Android.Sdk/Mono.Android.NET-Tests.csproj -c ${input:configuration} -t:GenerateNuGetConfig -p:AndroidNETTestConfigOutputDir=${workspaceRoot}/samples",},
131-
"osx": { "command": "./dotnet-local.sh build --no-restore tests/Mono.Android-Tests/Runtime-Microsoft.Android.Sdk/Mono.Android.NET-Tests.csproj -c ${input:configuration} -t:GenerateNuGetConfig -p:AndroidNETTestConfigOutputDir=${workspaceRoot}/samples",},
129+
"windows": { "command": "dotnet-local.cmd build --no-restore tests/Mono.Android-Tests/Mono.Android-Tests/Mono.Android.NET-Tests.csproj -c ${input:configuration} -t:GenerateNuGetConfig -p:AndroidNETTestConfigOutputDir=${workspaceRoot}/samples", },
130+
"linux": { "command": "./dotnet-local.sh build --no-restore tests/Mono.Android-Tests/Mono.Android-Tests/Mono.Android.NET-Tests.csproj -c ${input:configuration} -t:GenerateNuGetConfig -p:AndroidNETTestConfigOutputDir=${workspaceRoot}/samples",},
131+
"osx": { "command": "./dotnet-local.sh build --no-restore tests/Mono.Android-Tests/Mono.Android-Tests/Mono.Android.NET-Tests.csproj -c ${input:configuration} -t:GenerateNuGetConfig -p:AndroidNETTestConfigOutputDir=${workspaceRoot}/samples",},
132132
"group": {
133133
"kind": "build",
134134
"isDefault": true

Documentation/workflow/UnitTests.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -411,12 +411,12 @@ These tests are generally found in:
411411
These tests are run by using the `RunTestApp` target on the appropriate project
412412
file, which includes:
413413

414-
* `tests/Mono.Android-Tests/Runtime-Microsoft.Android.Sdk/Mono.Android.NET-Tests.csproj`
414+
* `tests/Mono.Android-Tests/Mono.Android-Tests/Mono.Android.NET-Tests.csproj`
415415

416416
For example:
417417

418418
```zsh
419-
./dotnet-local.sh build -t:RunTestApp tests/Mono.Android-Tests/Runtime-Microsoft.Android.Sdk/Mono.Android.NET-Tests.csproj
419+
./dotnet-local.sh build -t:RunTestApp tests/Mono.Android-Tests/Mono.Android-Tests/Mono.Android.NET-Tests.csproj
420420
```
421421

422422
After running the tests, a `TestResult*.xml` file will be created in the

build-tools/automation/azure-pipelines-nightly.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ stages:
144144
parameters:
145145
configuration: $(XA.Build.Configuration)
146146
testName: Mono.Android.NET_Tests-$(XA.Build.Configuration)-$(avdApiLevel)
147-
project: tests/Mono.Android-Tests/Runtime-Microsoft.Android.Sdk/Mono.Android.NET-Tests.csproj
147+
project: tests/Mono.Android-Tests/Mono.Android-Tests/Mono.Android.NET-Tests.csproj
148148
testResultsFiles: TestResult-Mono.Android.NET_Tests-$(XA.Build.Configuration)$(avdApiLevel).xml
149149
extraBuildArgs: -p:TestsFlavor=$(avdApiLevel) -p:TestAvdApiLevel=$(avdApiLevel) -p:TestAvdAbi=$(avdAbi) -p:TestAvdType=$(avdType)
150150
artifactSource: bin/Test$(XA.Build.Configuration)/$(DotNetTargetFramework)-android/Mono.Android.NET_Tests-Signed.aab

build-tools/automation/yaml-templates/stage-package-tests.yaml

+7-7
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ stages:
6666
buildConfiguration: $(XA.Build.Configuration)
6767
configuration: Debug
6868
testName: Mono.Android.NET_Tests-Debug
69-
project: tests/Mono.Android-Tests/Runtime-Microsoft.Android.Sdk/Mono.Android.NET-Tests.csproj
69+
project: tests/Mono.Android-Tests/Mono.Android-Tests/Mono.Android.NET-Tests.csproj
7070
testResultsFiles: TestResult-Mono.Android.NET_Tests-Debug.xml
7171
artifactSource: bin/TestDebug/$(DotNetTargetFramework)-android/Mono.Android.NET_Tests-Signed.apk
7272
artifactFolder: $(DotNetTargetFramework)-Debug
@@ -75,7 +75,7 @@ stages:
7575
parameters:
7676
configuration: $(XA.Build.Configuration)
7777
testName: Mono.Android.NET_Tests-$(XA.Build.Configuration)
78-
project: tests/Mono.Android-Tests/Runtime-Microsoft.Android.Sdk/Mono.Android.NET-Tests.csproj
78+
project: tests/Mono.Android-Tests/Mono.Android-Tests/Mono.Android.NET-Tests.csproj
7979
testResultsFiles: TestResult-Mono.Android.NET_Tests-$(XA.Build.Configuration).xml
8080
artifactSource: bin/Test$(XA.Build.Configuration)/$(DotNetTargetFramework)-android/Mono.Android.NET_Tests-Signed.aab
8181
artifactFolder: $(DotNetTargetFramework)-$(XA.Build.Configuration)
@@ -84,7 +84,7 @@ stages:
8484
parameters:
8585
configuration: $(XA.Build.Configuration)
8686
testName: Mono.Android.NET_Tests-NoAab
87-
project: tests/Mono.Android-Tests/Runtime-Microsoft.Android.Sdk/Mono.Android.NET-Tests.csproj
87+
project: tests/Mono.Android-Tests/Mono.Android-Tests/Mono.Android.NET-Tests.csproj
8888
testResultsFiles: TestResult-Mono.Android.NET_Tests-$(XA.Build.Configuration)NoAab.xml
8989
extraBuildArgs: -p:TestsFlavor=NoAab -p:AndroidPackageFormat=apk
9090
artifactSource: bin/Test$(XA.Build.Configuration)/$(DotNetTargetFramework)-android/Mono.Android.NET_Tests-Signed.apk
@@ -94,7 +94,7 @@ stages:
9494
parameters:
9595
configuration: $(XA.Build.Configuration)
9696
testName: Mono.Android.NET_Tests-Interpreter
97-
project: tests/Mono.Android-Tests/Runtime-Microsoft.Android.Sdk/Mono.Android.NET-Tests.csproj
97+
project: tests/Mono.Android-Tests/Mono.Android-Tests/Mono.Android.NET-Tests.csproj
9898
testResultsFiles: TestResult-Mono.Android.NET_Tests-$(XA.Build.Configuration)Interpreter.xml
9999
extraBuildArgs: -p:TestsFlavor=Interpreter -p:UseInterpreter=True
100100
artifactSource: bin/Test$(XA.Build.Configuration)/$(DotNetTargetFramework)-android/Mono.Android.NET_Tests-Signed.aab
@@ -172,7 +172,7 @@ stages:
172172
parameters:
173173
configuration: $(XA.Build.Configuration)
174174
testName: Mono.Android.NET_Tests-NoAot
175-
project: tests/Mono.Android-Tests/Runtime-Microsoft.Android.Sdk/Mono.Android.NET-Tests.csproj
175+
project: tests/Mono.Android-Tests/Mono.Android-Tests/Mono.Android.NET-Tests.csproj
176176
testResultsFiles: TestResult-Mono.Android.NET_Tests-$(XA.Build.Configuration)NoAot.xml
177177
extraBuildArgs: -p:TestsFlavor=NoAot -p:RunAOTCompilation=false
178178
artifactSource: bin/Test$(XA.Build.Configuration)/$(DotNetTargetFramework)-android/Mono.Android.NET_Tests-Signed.aab
@@ -182,7 +182,7 @@ stages:
182182
parameters:
183183
configuration: $(XA.Build.Configuration)
184184
testName: Mono.Android.NET_Tests-TrimModePartial
185-
project: tests/Mono.Android-Tests/Runtime-Microsoft.Android.Sdk/Mono.Android.NET-Tests.csproj
185+
project: tests/Mono.Android-Tests/Mono.Android-Tests/Mono.Android.NET-Tests.csproj
186186
testResultsFiles: TestResult-Mono.Android.NET_Tests-$(XA.Build.Configuration)TrimModePartial.xml
187187
extraBuildArgs: -p:TestsFlavor=TrimModePartial -p:TrimMode=partial
188188
artifactSource: bin/Test$(XA.Build.Configuration)/$(DotNetTargetFramework)-android/Mono.Android.NET_Tests-Signed.aab
@@ -192,7 +192,7 @@ stages:
192192
parameters:
193193
configuration: $(XA.Build.Configuration)
194194
testName: Mono.Android.NET_Tests-AotLlvm
195-
project: tests/Mono.Android-Tests/Runtime-Microsoft.Android.Sdk/Mono.Android.NET-Tests.csproj
195+
project: tests/Mono.Android-Tests/Mono.Android-Tests/Mono.Android.NET-Tests.csproj
196196
testResultsFiles: TestResult-Mono.Android.NET_Tests-$(XA.Build.Configuration)AotLlvm.xml
197197
extraBuildArgs: -p:TestsFlavor=AotLlvm -p:EnableLLVM=true -p:AndroidEnableProfiledAot=false
198198
artifactSource: bin/Test$(XA.Build.Configuration)/$(DotNetTargetFramework)-android/Mono.Android.NET_Tests-Signed.aab

tests/Mono.Android-Tests/Android.OS/HandlerTest.cs

-32
This file was deleted.

tests/Mono.Android-Tests/Localization/LocalizationTests.cs

-29
This file was deleted.

tests/Mono.Android-Tests/Mono.Android-Test.Library/Mono.Android-Test.Library.NET.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
</PropertyGroup>
1313

1414
<ItemGroup>
15-
<AndroidAsset Include="..\LinkedAssets\linked_text2.txt">
15+
<AndroidAsset Include="..\Mono.Android-Tests\LinkedAssets\linked_text2.txt">
1616
<Link>Assets\linked_text2.txt</Link>
1717
</AndroidAsset>
18-
<AndroidAsset Include="..\LinkedAssets\folder.png">
18+
<AndroidAsset Include="..\Mono.Android-Tests\LinkedAssets\folder.png">
1919
<Link>Assets\LibAssetSubFolder\folder.png</Link>
2020
</AndroidAsset>
2121
</ItemGroup>

tests/Mono.Android-Tests/Mono.Android-Test.Library/Mono.Android-Test.Library.csproj

-82
This file was deleted.

0 commit comments

Comments
 (0)