Skip to content

Commit 385699a

Browse files
jonpryorradekdoulik
authored andcommitted
[tests] Add Configuration info to test names
Context: 0077d15 Context: d1d9820 A "funny" thing happened when commit e9daf5e didn't build on Jenkins: I realized that not all tests were run in all configurations. From commit d1d9820: > Why are some tests Debug-only and some aren't? The answer: time, primarily. Why run tests multiple times, when they can be potentially time-consuming? While tests can be slow, they're not always *that* slow -- except for `Xamarin.Android.Build.Tests` and the BCL tests -- and even there, program behavior can alter between Debug and Release configurations. See in particular commit 0077d15, in which the BCL tests are run only in the Debug configuration because tests *failed* when run in the Release configuration. The desire, then, is to run *all* tests in both Debug and Release configurations. Yes, it'll take longer! So what! (Within reason: `Xamarin.Android.Build.Tests` should only be run once!) However, this raises two problems: 1. Filename collisions 2. Jenkins unit test display Until now, all tests wrote files into a filename that didn't include the Configuration, e.g. `TestResult-Mono.Android_Tests.xml`. If we did run these tests twice, the second test invocation would overwrite the first test invocation. This isn't desirable. Then there's the display on Jenkins: if we did have e.g. `TestResult-Mono.Android_Tests-Debug.xml` and `TestResult-Mono.Android_Tests-Release.xml`, how will Jenkins display that information? I haven't tested, but I would assume that one of two things will occur, assuming reasonable Jenkins behavior: 1. Each test will be listed twice, e.g. ApplicationContextIsApp ApplicationContextIsApp 2. They'll be "merged" into a single entry. Neither of these behaviors is desirable: if Debug passes but Release fails, we need to be able to differentiate between them. Neither of these possible renderings allows us to tell which configuration fails. Solve both of these problems by introducing a new `<RenameTestCases/>` task. This task takes three values of importance: ```xml <RenameTestCases Configuration="CONFIGURATION" SourceFile="SOURCE" DestinationFolder="DESTINATION" /> ``` The `<RenameTestCases/>` task will read in `SOURCE`, and if `SOURCE` is an XML file which we determine is NUnit2-formatted XML (root element of `<test-case/>`), we will update every `//test-case/@name` value so that it ends with ` / CONFIGURATION`. The updated XML is then written to the `DESTINATION` directory, with a filename that contains `CONFIGURATION`, and `SOURCE` is deleted. Thus, if we have a Debug-configuration `TestResult-Mono.Android_Tests.xml` file with XML fragment: ```xml <test-case name="Mono.Android_Tests, Android.AppTests.ApplicationTest.ApplicationContextIsApp" ... /> ``` then `<RenameTestCases/>` will create the file `TestResult-Mono.Android_Tests-Debug.xml` file with XML fragment: ```xml <test-case name="Mono.Android_Tests, Android.AppTests.ApplicationTest.ApplicationContextIsApp / Debug" ... /> ``` This allows us to run tests in both Debug and Release configurations while not inadvertently overwriting the `TestResults*.xml` files that Jenkins reads, and ensuring that the Jenkins test result output is rendered in a meaningfully useful fashion. Aside: when updating `//test-case/@name`, the resulting value *cannot* end in `)`. If it does, then the `(root)` package name issue fixed in commit 23b2642 reappears for the `generator` unit tests. **Completely random aside about the state of `xbuild`**: A development version of `<RenameTestCases/>` was "saner", using `ITaskItem[]` and not string: ```csharp partial class RenameTestCases { public ITaskItem[] SourceFiles {get; set;} // vs. // public string SourceFile {get; set;} } ``` The problem is that the above, while entirely reasonable, did not work at all correctly with `xbuild`: ```xml <RenameTestCases SourceFiles="%(TestApk.ResultsPath)" /> ``` Under `xbuild`, MSBuild properties would not be expanded, e.g. `RenameTestCases.SourceFiles` would get a "bizarro" value of e.g. `$(OutputPath)Mono.Android_Tests-Signed.apk`, which is *useless* and would result in `FileNotFoundException`s. MSBuild proper, of course, worked as desired. TODO: Once this is merged, update the Jenkins Configuration page so that instead of: make run-all-tests V=1 || exit 1 it instead runs both Debug and Release configuration tests: make run-all-tests SKIP_NUNIT_TESTS=1 V=1 || exit 1 make run-all-tests CONFIGURATION=Release V=1 || exit 1 Note that `$(SKIP_NUNIT_TESTS)` is specified so that we only run the lengthy (1+hr!) `Xamarin.Android.Build.Tests` tests in the Release configuration, not the Debug + Release configurations.
1 parent f9d15dd commit 385699a

File tree

12 files changed

+171
-21
lines changed

12 files changed

+171
-21
lines changed

Makefile

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,11 @@ include tests/api-compatibility/api-compatibility.mk
118118

119119
run-all-tests: run-nunit-tests run-ji-tests run-apk-tests run-api-compatibility-tests
120120

121+
rename-test-cases:
122+
$(MSBUILD) $(MSBUILD_FLAGS) build-tools/scripts/TestApks.targets \
123+
/t:RenameTestCases /p:RenameTestCasesGlob="$(if $(RENAME_GLOB),$(RENAME_GLOB),`pwd`/TestResult-\*.xml)" \
124+
$(if $(KEEP_TEST_SOURCES),/p:DeleteTestCaseSourceFiles=False)
125+
121126
clean:
122127
$(MSBUILD) $(MSBUILD_FLAGS) /t:Clean Xamarin.Android.sln
123128
tools/scripts/xabuild $(MSBUILD_FLAGS) /t:Clean Xamarin.Android-Tests.sln
@@ -140,14 +145,18 @@ define RUN_NUNIT_TEST
140145
if [ -f "bin/Test$(CONFIGURATION)/TestOutput-$(basename $(notdir $(1))).txt" ] ; then \
141146
cat bin/Test$(CONFIGURATION)/TestOutput-$(basename $(notdir $(1))).txt ; \
142147
fi
148+
$(MAKE) rename-test-cases RENAME_GLOB="`pwd`/TestResult-$(basename $(notdir $(1))).xml"
143149
endef
144150

145151
run-nunit-tests: $(NUNIT_TESTS)
152+
ifneq ($(SKIP_NUNIT_TESTS),)
146153
$(foreach t,$(NUNIT_TESTS), $(call RUN_NUNIT_TEST,$(t),1))
154+
endif # $(SKIP_NUNIT_TESTS) == ''
147155

148156
run-ji-tests:
149157
$(MAKE) -C "$(call GetPath,JavaInterop)" CONFIGURATION=$(CONFIGURATION) all
150158
ANDROID_SDK_PATH="$(call GetPath,AndroidSdk)" $(MAKE) -C "$(call GetPath,JavaInterop)" CONFIGURATION=$(CONFIGURATION) run-all-tests || true
159+
$(MAKE) rename-test-cases RENAME_GLOB='"$(call GetPath,JavaInterop)"/TestResult-*Tests.xml'
151160
cp "$(call GetPath,JavaInterop)"/TestResult-*.xml .
152161

153162
# .apk files to test on-device need to:
@@ -157,11 +166,11 @@ TEST_APK_PROJECTS = \
157166
src/Mono.Android/Test/Mono.Android-Tests.csproj \
158167
tests/CodeGen-Binding/Xamarin.Android.JcwGen-Tests/Xamarin.Android.JcwGen-Tests.csproj \
159168
tests/locales/Xamarin.Android.Locale-Tests/Xamarin.Android.Locale-Tests.csproj \
160-
tests/Xamarin.Android.Bcl-Tests/Xamarin.Android.Bcl-Tests.csproj
169+
tests/Xamarin.Android.Bcl-Tests/Xamarin.Android.Bcl-Tests.csproj \
170+
tests/Xamarin.Forms-Performance-Integration/Droid/Xamarin.Forms.Performance.Integration.Droid.csproj
161171

162-
TEST_APK_PROJECTS_RELEASE = \
172+
TEST_APK_PROJECTS_AOT = \
163173
src/Mono.Android/Test/Mono.Android-Tests.csproj \
164-
tests/Xamarin.Forms-Performance-Integration/Droid/Xamarin.Forms.Performance.Integration.Droid.csproj
165174

166175
# Syntax: $(call BUILD_TEST_APK,path/to/project.csproj,additional_msbuild_flags)
167176
define BUILD_TEST_APK
@@ -177,7 +186,6 @@ endef
177186

178187
run-apk-tests:
179188
$(call RUN_APK_TESTS, $(TEST_APK_PROJECTS), )
180-
ifneq ($(wildcard bin/Release),)
181-
$(call RUN_APK_TESTS, $(TEST_APK_PROJECTS_RELEASE), /p:Configuration=Release)
182-
$(call RUN_APK_TESTS, $(TEST_APK_PROJECTS_RELEASE), /p:Configuration=Release /p:AotAssemblies=true)
189+
ifeq ($(CONFIGURATION),Release)
190+
$(call RUN_APK_TESTS, $(TEST_APK_PROJECTS_AOT), /p:AotAssemblies=true)
183191
endif

build-tools/scripts/TestApks.targets

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<UsingTask AssemblyFile="$(MSBuildThisFileDirectory)..\..\bin\Build$(Configuration)\Xamarin.Android.Tools.BootstrapTasks.dll" TaskName="Xamarin.Android.Tools.BootstrapTasks.Adb" />
44
<UsingTask AssemblyFile="$(MSBuildThisFileDirectory)..\..\bin\Build$(Configuration)\Xamarin.Android.Tools.BootstrapTasks.dll" TaskName="Xamarin.Android.Tools.BootstrapTasks.CheckAdbTarget" />
55
<UsingTask AssemblyFile="$(MSBuildThisFileDirectory)..\..\bin\Build$(Configuration)\Xamarin.Android.Tools.BootstrapTasks.dll" TaskName="Xamarin.Android.Tools.BootstrapTasks.CreateAndroidEmulator" />
6+
<UsingTask AssemblyFile="$(MSBuildThisFileDirectory)..\..\bin\Build$(Configuration)\Xamarin.Android.Tools.BootstrapTasks.dll" TaskName="Xamarin.Android.Tools.BootstrapTasks.RenameTestCases" />
67
<UsingTask AssemblyFile="$(MSBuildThisFileDirectory)..\..\bin\Build$(Configuration)\Xamarin.Android.Tools.BootstrapTasks.dll" TaskName="Xamarin.Android.Tools.BootstrapTasks.RunInstrumentationTests" />
78
<UsingTask AssemblyFile="$(MSBuildThisFileDirectory)..\..\bin\Build$(Configuration)\Xamarin.Android.Tools.BootstrapTasks.dll" TaskName="Xamarin.Android.Tools.BootstrapTasks.RunUITests" />
89
<UsingTask AssemblyFile="$(MSBuildThisFileDirectory)..\..\bin\Build$(Configuration)\Xamarin.Android.Tools.BootstrapTasks.dll" TaskName="Xamarin.Android.Tools.BootstrapTasks.StartAndroidEmulator" />
@@ -183,4 +184,42 @@
183184
AddResults="true"
184185
Activity="%(TestApk.Activity)" />
185186
</Target>
187+
<Target Name="RenameTestCases">
188+
<Error
189+
Condition=" '$(RenameTestCasesGlob)' == '' "
190+
Text="Please set `%24(RenameTestCasesGlob)`."
191+
/>
192+
<Error
193+
Condition=" '$(Configuration)' == '' "
194+
Text="Please set `%24(Configuration)`."
195+
/>
196+
<PropertyGroup>
197+
<_DeleteSource Condition=" '$(DeleteTestCaseSourceFiles)' != '' ">$(DeleteTestCaseSourceFiles)</_DeleteSource>
198+
<_DeleteSource Condition=" '$(_DeleteSource)' == '' ">True</_DeleteSource>
199+
</PropertyGroup>
200+
<ItemGroup>
201+
<_RenameSource1 Include="$(RenameTestCasesGlob)" />
202+
</ItemGroup>
203+
<ItemGroup>
204+
<_RenameSource Include="%(_RenameSource1.Identity)">
205+
<DestinationFolder>@(_RenameSource1->'%(RootDir)%(Directory)')</DestinationFolder>
206+
</_RenameSource>
207+
</ItemGroup>
208+
<RenameTestCases
209+
Configuration="$(Configuration)"
210+
DeleteSourceFiles="$(_DeleteSource)"
211+
SourceFile="%(_RenameSource.Identity)"
212+
DestinationFolder="%(_RenameSource.DestinationFolder)"
213+
/>
214+
</Target>
215+
<Target Name="RenameApkTestCases"
216+
Condition=" '@(TestApk)' != '' ">
217+
<RenameTestCases
218+
Condition=" '%(TestApk.ResultsPath)' != '' "
219+
Configuration="$(Configuration)$(_AotName)"
220+
DeleteSourceFiles="True"
221+
DestinationFolder="$(MSBuildThisFileDirectory)..\.."
222+
SourceFile="%(TestApk.ResultsPath)"
223+
/>
224+
</Target>
186225
</Project>

src/Mono.Android/Test/Mono.Android-Tests.projitems

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<UsingTask AssemblyFile="$(MSBuildThisFileDirectory)..\..\..\bin\Build$(Configuration)\xa-prep-tasks.dll" TaskName="Xamarin.Android.BuildTools.PrepTasks.ProcessPlotInput" />
44
<PropertyGroup>
5-
<_MonoAndroidTestResultsPath>$(MSBuildThisFileDirectory)..\..\..\TestResult-Mono.Android_Tests.xml</_MonoAndroidTestResultsPath>
5+
<_MonoAndroidTestResultsPath>$(OutputPath)TestResult-Mono.Android_Tests.xml</_MonoAndroidTestResultsPath>
66
<_MonoAndroidTestPackage>Mono.Android_Tests</_MonoAndroidTestPackage>
77
<_MonoAndroidTestApkFile>$(OutputPath)Mono.Android_Tests-Signed.apk</_MonoAndroidTestApkFile>
88
<_MonoAndroidTestApkSizesInput>apk-sizes-$(_MonoAndroidTestPackage)-$(Configuration)$(_AotName).txt</_MonoAndroidTestApkSizesInput>
@@ -16,10 +16,21 @@
1616
</TestApk>
1717
</ItemGroup>
1818
<Target Name="_RecordApkSizes" AfterTargets="DeployTestApks">
19-
<Delete Files="$(MSBuildThisFileDirectory)..\..\..\TestResult-Mono.Android_Tests-values.csv;$(MSBuildThisFileDirectory)..\..\..\TestResult-Mono.Android_Tests-times.csv" Condition=" '$(Configuration)' == 'Debug' " />
20-
<Exec Condition=" '$(HostOS)' == 'Darwin' " Command="stat -f &quot;stat: %z %N&quot; &quot;$(_MonoAndroidTestApkFile)&quot; > $(_MonoAndroidTestApkSizesInput)" />
21-
<Exec Condition=" '$(HostOS)' == 'Linux' " Command="stat -c &quot;stat: %s %N&quot; &quot;$(_MonoAndroidTestApkFile)&quot; > $(_MonoAndroidTestApkSizesInput)" />
22-
<Exec Command="unzip -l &quot;$(_MonoAndroidTestApkFile)&quot; >> $(_MonoAndroidTestApkSizesInput)" />
23-
<ProcessPlotInput InputFilename="$(_MonoAndroidTestApkSizesInput)" ApplicationPackageName="$(_MonoAndroidTestPackage)" ResultsFilename="$(MSBuildThisFileDirectory)..\..\..\TestResult-Mono.Android_Tests.xml" DefinitionsFilename="$(MSBuildThisFileDirectory)apk-sizes-definitions-$(Configuration)$(_AotName).txt" AddResults="true" />
19+
<Exec
20+
Condition=" '$(HostOS)' == 'Darwin' "
21+
Command="stat -f &quot;stat: %z %N&quot; &quot;$(_MonoAndroidTestApkFile)&quot; > &quot;$(OutputPath)$(_MonoAndroidTestApkSizesInput)&quot;"
22+
/>
23+
<Exec
24+
Condition=" '$(HostOS)' == 'Linux' "
25+
Command="stat -c &quot;stat: %s %N&quot; &quot;$(_MonoAndroidTestApkFile)&quot; > &quot;$(OutputPath)$(_MonoAndroidTestApkSizesInput)&quot;"
26+
/>
27+
<Exec Command="unzip -l &quot;$(_MonoAndroidTestApkFile)&quot; >> &quot;$(OutputPath)$(_MonoAndroidTestApkSizesInput)&quot;" />
28+
<ProcessPlotInput
29+
InputFilename="$(OutputPath)$(_MonoAndroidTestApkSizesInput)"
30+
ApplicationPackageName="$(_MonoAndroidTestPackage)"
31+
ResultsFilename="$(_MonoAndroidTestResultsPath)"
32+
DefinitionsFilename="$(MSBuildThisFileDirectory)apk-sizes-definitions-$(Configuration)$(_AotName).txt"
33+
AddResults="True"
34+
/>
2435
</Target>
2536
</Project>

src/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
<Reference Include="System.IO.Compression.FileSystem" />
3636
<Reference Include="System.Net.Http" />
3737
<Reference Include="System.Xml" />
38+
<Reference Include="System.Xml.Linq" />
3839
</ItemGroup>
3940
<ItemGroup>
4041
<Compile Include="Properties\AssemblyInfo.cs" />
@@ -47,6 +48,7 @@
4748
<Compile Include="Xamarin.Android.Tools.BootstrapTasks\GenerateMonoDroidIncludes.cs" />
4849
<Compile Include="Xamarin.Android.Tools.BootstrapTasks\GenerateProfile.cs" />
4950
<Compile Include="Xamarin.Android.Tools.BootstrapTasks\GetNugetPackageBasePath.cs" />
51+
<Compile Include="Xamarin.Android.Tools.BootstrapTasks\RenameTestCases.cs" />
5052
<Compile Include="Xamarin.Android.Tools.BootstrapTasks\StartAndroidEmulator.cs" />
5153
<Compile Include="Xamarin.Android.Tools.BootstrapTasks\UnzipDirectoryChildren.cs" />
5254
<Compile Include="Xamarin.Android.Tools.BootstrapTasks\Zip.cs" />
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.IO;
4+
using System.Linq;
5+
using System.Text;
6+
using System.Xml.Linq;
7+
8+
using Microsoft.Build.Framework;
9+
using Microsoft.Build.Utilities;
10+
11+
namespace Xamarin.Android.Tools.BootstrapTasks
12+
{
13+
public class RenameTestCases : Task
14+
{
15+
public bool DeleteSourceFiles { get; set; }
16+
public string Configuration { get; set; }
17+
[Required]
18+
public string SourceFile { get; set; }
19+
[Required]
20+
public string DestinationFolder { get; set; }
21+
22+
[Output]
23+
public ITaskItem[] CreatedFiles { get; set; }
24+
25+
public override bool Execute ()
26+
{
27+
Log.LogMessage (MessageImportance.Low, $"Task {nameof (RenameTestCases)}");
28+
Log.LogMessage (MessageImportance.Low, $" {nameof (Configuration)}: {Configuration}");
29+
Log.LogMessage (MessageImportance.Low, $" {nameof (DeleteSourceFiles)}: {DeleteSourceFiles}");
30+
Log.LogMessage (MessageImportance.Low, $" {nameof (DestinationFolder)}: {DestinationFolder}");
31+
Log.LogMessage (MessageImportance.Low, $" {nameof (SourceFile)}: {SourceFile}");
32+
33+
var createdFiles = new List<ITaskItem> ();
34+
var testNameSuffix = string.IsNullOrWhiteSpace (Configuration)
35+
? ""
36+
: $" / {Configuration}";
37+
try {
38+
var dest = FixupTestResultFile (SourceFile, testNameSuffix);
39+
var item = new TaskItem (dest);
40+
item.SetMetadata ("SourceFile", SourceFile);
41+
createdFiles.Add (item);
42+
}
43+
catch (Exception e) {
44+
Log.LogErrorFromException (e);
45+
}
46+
47+
CreatedFiles = createdFiles.ToArray ();
48+
49+
Log.LogMessage (MessageImportance.Low, $" [Output] {nameof (CreatedFiles)}:");
50+
foreach (var f in CreatedFiles) {
51+
Log.LogMessage (MessageImportance.Low, $" [Output] {f}:");
52+
}
53+
54+
return !Log.HasLoggedErrors;
55+
}
56+
57+
string FixupTestResultFile (string source, string testNameSuffix)
58+
{
59+
var doc = XDocument.Load (source);
60+
switch (doc.Root.Name.LocalName) {
61+
case "test-results":
62+
FixupNUnit2Results (doc, testNameSuffix);
63+
break;
64+
}
65+
var destFilename = Path.GetFileNameWithoutExtension (source) +
66+
(string.IsNullOrWhiteSpace (Configuration) ? "" : "-" + Configuration) +
67+
Path.GetExtension (source);
68+
var dest = Path.Combine (DestinationFolder, destFilename);
69+
70+
doc.Save (dest);
71+
if (DeleteSourceFiles && Path.GetFullPath (source) != Path.GetFullPath (dest)) {
72+
File.Delete (source);
73+
}
74+
return dest;
75+
}
76+
77+
void FixupNUnit2Results (XDocument doc, string testNameSuffix)
78+
{
79+
foreach (var e in doc.Descendants ("test-case")) {
80+
var name = (string) e.Attribute ("name");
81+
if (name.EndsWith (testNameSuffix, StringComparison.OrdinalIgnoreCase))
82+
continue;
83+
name += testNameSuffix;
84+
e.SetAttributeValue ("name", name);
85+
}
86+
}
87+
}
88+
}

tests/CodeGen-Binding/Xamarin.Android.JcwGen-Tests/Xamarin.Android.JcwGen-Tests.projitems

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<TestApk Include="$(OutputPath)Xamarin.Android.JcwGen_Tests-Signed.apk">
55
<Package>Xamarin.Android.JcwGen_Tests</Package>
66
<InstrumentationType>xamarin.android.jcwgentests.TestInstrumentation</InstrumentationType>
7-
<ResultsPath>$(MSBuildThisFileDirectory)..\..\..\TestResult-Xamarin.Android.JcwGen_Tests.xml</ResultsPath>
7+
<ResultsPath>$(OutputPath)TestResult-Xamarin.Android.JcwGen_Tests.xml</ResultsPath>
88
<TimingDefinitionsFilename>$(MSBuildThisFileDirectory)..\..\..\build-tools\scripts\TimingDefinitions.txt</TimingDefinitionsFilename>
99
</TestApk>
1010
</ItemGroup>

tests/RunApkTests.targets

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
`$(TEST_APK_PROJECTS_RELEASE)` within the toplevel `Makefile`.
2020
-->
2121
<Import Project="..\src\Mono.Android\Test\Mono.Android-Tests.projitems" />
22-
<Import Project="..\tests\Xamarin.Android.Bcl-Tests\Xamarin.Android.Bcl-Tests.projitems" Condition=" '$(Configuration)' == 'Debug' " />
23-
<Import Project="..\tests\CodeGen-Binding\Xamarin.Android.JcwGen-Tests\Xamarin.Android.JcwGen-Tests.projitems" Condition=" '$(Configuration)' == 'Debug' " />
24-
<Import Project="..\tests\locales\Xamarin.Android.Locale-Tests\Xamarin.Android.Locale-Tests.projitems" Condition=" '$(Configuration)' == 'Debug' " />
22+
<Import Project="..\tests\Xamarin.Android.Bcl-Tests\Xamarin.Android.Bcl-Tests.projitems" Condition=" '$(AotAssemblies)' != 'True' " />
23+
<Import Project="..\tests\CodeGen-Binding\Xamarin.Android.JcwGen-Tests\Xamarin.Android.JcwGen-Tests.projitems" Condition=" '$(AotAssemblies)' != 'True' " />
24+
<Import Project="..\tests\locales\Xamarin.Android.Locale-Tests\Xamarin.Android.Locale-Tests.projitems" Condition=" '$(AotAssemblies)' != 'True' " />
2525
<Import Project="..\tests\Xamarin.Forms-Performance-Integration\Droid\Xamarin.Forms.Performance.Integration.Droid.projitems" Condition=" '$(Configuration)' == 'Release' And '$(AotAssemblies)' != 'true' " />
2626
<Import Project="..\build-tools\scripts\TestApks.targets" />
2727
<PropertyGroup>
@@ -30,7 +30,8 @@
3030
UndeployTestApks;
3131
DeployTestApks;
3232
RunTestApks;
33-
ReleaseAndroidTarget
33+
ReleaseAndroidTarget;
34+
RenameApkTestCases;
3435
</RunApkTestsDependsOn>
3536
</PropertyGroup>
3637
<Target Name="RunApkTests"

tests/Xamarin.Android.Bcl-Tests/Xamarin.Android.Bcl-Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
</PropertyGroup>
3636
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
3737
<DebugSymbols>true</DebugSymbols>
38-
<DebugType>pdbonly</DebugType>
38+
<DebugType>Full</DebugType>
3939
<Optimize>true</Optimize>
4040
<OutputPath>..\..\bin\TestRelease</OutputPath>
4141
<ErrorReport>prompt</ErrorReport>

tests/Xamarin.Android.Bcl-Tests/Xamarin.Android.Bcl-Tests.projitems

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<TestApk Include="$(OutputPath)Xamarin.Android.Bcl_Tests-Signed.apk">
55
<Package>Xamarin.Android.Bcl_Tests</Package>
66
<InstrumentationType>xamarin.android.bcltests.TestInstrumentation</InstrumentationType>
7-
<ResultsPath>$(MSBuildThisFileDirectory)..\..\TestResult-Xamarin.Android.Bcl_Tests.xml</ResultsPath>
7+
<ResultsPath>$(OutputPath)TestResult-Xamarin.Android.Bcl_Tests.xml</ResultsPath>
88
<TimingDefinitionsFilename>$(MSBuildThisFileDirectory)..\..\build-tools\scripts\TimingDefinitions.txt</TimingDefinitionsFilename>
99
</TestApk>
1010
</ItemGroup>

tests/Xamarin.Android.Bcl-Tests/Xamarin.Android.Bcl-Tests.targets

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
HostOS="$(HostOS)"
6363
DestinationFolder="..\..\bin\$(Configuration)\bcl-tests"
6464
/>
65+
<Touch Files="@(_TestResource)" />
6566
</Target>
6667
<Target Name="_GenerateApp_cs"
6768
Inputs="@(MonoTestAssembly->'..\..\bin\$(Configuration)\bcl-tests\%(Identity)')"

0 commit comments

Comments
 (0)