Skip to content

Running android tests fails with xharness output "Unknown arguments: Debug" #62161

@vcsjones

Description

@vcsjones

Using the current instructions I have recently been unable to run Android tests locally.

Here is what I am running:

./dotnet.sh build /t:Test src/libraries/System.Security.Cryptography/tests /p:TargetOS=Android /p:TargetArchitecture=x86

Doing so gives me:

XHarness command issued: android test --instrumentation=net.dot.MonoRunner --package-name=net.dot.System.Security.Cryptography.Tests --app=/code/personal/dotnet/runtime-main/artifacts/bin/System.Security.Cryptography.Tests/net7.0-Android-Debug/android-x86/AppBundle/bin/System.Security.Cryptography.Tests.apk --output-directory=/code/personal/dotnet/runtime-main/artifacts/bin/System.Security.Cryptography.Tests/net7.0-Android-Debug/android-x86/AppBundle/xharness-output --timeout=1800 Debug
fail: Unknown arguments: Debug
XHarness exit code: 3 (INVALID_ARGUMENTS)

If I get rid of the $ADDITIONAL_ARGS here:

--timeout=1800 \
$ADDITIONAL_ARGS

Then I can actually run the tests.

This used to work without me needing to modify AndroidRunnerTemplate.sh. Am I doing something wrong, or do the instructions need to be updated?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions