Skip to content

Commit f90f006

Browse files
jonathanpeppersjonpryor
authored andcommitted
[tests] fix for ANDROID_SDK_PATH (#211)
Context: https://github.com/xamarin/xamarin-android/blob/f56ca4ab05471bcea8225f348c6cbd793ccbe9cb/build-tools/scripts/RunTests.targets#L50 Context: https://devdiv.visualstudio.com/DevDiv/Default/_build/index?buildId=1138588&_a=summary&tab=ms.vss-test-web.test-result-details On Windows, the Java.Interop tests are not getting the `$ANDROID_SDK_PATH` environment variable set. This is somehow working on macOS, but I think it might be simpler in this case to pass in the `$(AndroidSdkDirectory)` property from `RunTests.targets` in xamarin-android. This approach worked when testing locally. I will need to bump Java.Interop and make one further change in xamarin-android to pass in `$(AndroidSdkDirectory)`. This will get a few skipped tests in Java.Interop running and passing on Windows.
1 parent c5e04d1 commit f90f006

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

build-tools/scripts/RunNUnitTests.targets

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
DestinationFolder="$(_TopDir)\bin\Test$(Configuration)"
2424
SkipUnchangedFiles="True"
2525
/>
26-
<SetEnvironmentVariable Name="MONO_TRACE_LISTENER" Value="Console.Out" />
26+
<SetEnvironmentVariable Name="ANDROID_SDK_PATH" Value="$(AndroidSdkDirectory)" Condition=" '$(AndroidSdkDirectory)' != '' " />
27+
<SetEnvironmentVariable Name="MONO_TRACE_LISTENER" Value="Console.Out" />
2728
<SetEnvironmentVariable Name="JAVA_INTEROP_GREF_LOG" Value="g-%(_TestAssembly.Filename).txt" />
2829
<SetEnvironmentVariable Name="JAVA_INTEROP_LREF_LOG" Value="l-%(_TestAssembly.Filename).txt" />
2930
<Exec

0 commit comments

Comments
 (0)