question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Builds fails (due to tests)

See original GitHub issue

I’m running the build on 64-bit Raspberry Pi OS. It is failing due to not being able to find .NET Core 3.1.

I run build.sh. Here is a relevant bit of the console log from that.

rich@raspberrypi:~/iot $ ./build.sh
  Determining projects to restore...
  All projects are up-to-date for restore.
Attempting to install dotnet from public_location.
dotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:
dotnet-install: - The SDK needs to be installed without user interaction and without admin rights.
dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs.
dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.

dotnet-install: .NET Core Runtime with version '3.1.21' is already installed.

And then later:

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
Testhost process exited with error: It was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '3.1.0' (arm64) was not found.
  - The following frameworks were found:
      6.0.0 at [/home/rich/iot/.dotnet/shared/Microsoft.NETCore.App]
      6.0.2 at [/home/rich/iot/.dotnet/shared/Microsoft.NETCore.App]
You can resolve the problem by installing the specified framework and/or SDK.
The specified framework can be found at:
  - https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=3.1.0&arch=arm64&rid=debian.11-arm64
. Please check the diagnostic logs for more information.

Test Run Aborted.
  ServoMotor.Tests -> /home/rich/iot/src/devices/ServoMotor/tests/bin/Debug/netcoreapp3.1/ServoMotor.Tests.dll
  Ssd13xx.Tests -> /home/rich/iot/src/devices/Ssd13xx/tests/bin/Debug/netcoreapp3.1/Ssd13xx.Tests.dll
/home/rich/iot/build.proj(65,5): error : Unit tests failed. Please check the detailed log to find out which ones failed.

And dotnet --info:

rich@raspberrypi:~/iot $ dotnet --info
.NET SDK (reflecting any global.json):
 Version:   6.0.100
 Commit:    9e8b04bbff

Runtime Environment:
 OS Name:     debian
 OS Version:  11
 OS Platform: Linux
 RID:         debian.11-arm64
 Base Path:   /home/rich/iot/.dotnet/sdk/6.0.100/

Host (useful for support):
  Version: 6.0.2
  Commit:  839cdfb0ec

.NET SDKs installed:
  6.0.100 [/home/rich/iot/.dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.0 [/home/rich/iot/.dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.0 [/home/rich/iot/.dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.2 [/home/rich/iot/.dotnet/shared/Microsoft.NETCore.App]

To install additional .NET runtimes or SDKs:
  https://aka.ms/dotnet-download

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
joperezrcommented, Feb 14, 2022

Thanks for logging @richlander I do see why this is happening. If you take a look at our current global.json file:

https://github.com/dotnet/iot/blob/d84c3e8b25b5c3e3363f096647487ab62ee0b26f/global.json#L4-L8

We are restoring netcoreapp3.1 in order to run those tests but only for x64 platforms as that is what most people are running. In order to fix this issue, we just need to add another entry there to ensure that arm64 also restores the 3.1 runtime.

0reactions
joperezrcommented, Sep 1, 2022

[Triage]: This should be fixed now. We haven’t seen any issues in CI due to this and we have changed the targets for our tests. Closing for now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Build failure on terminal for junit test case - maven
The standard maven-build will run all tests found in src/test/java and if one of them fails (like your example-test) the build will fail....
Read more >
Builds with all failed tests muted can still have failed status ...
Apart from modifying the build script, workaround is to set "Fail if build process exit code is not zero" to OFF, but that...
Read more >
Spring boot application build failed due to test failure
Hi, Build of my Spring boot application is failing and showing below in logs: [INFO] Results: [INFO] [INFO] Tests run: 0, Failures: 0, ......
Read more >
Build fails when running unit tests · Issue #148
Description When running build.cmd I get an error stating: "d:\repos2\fable-suave-scaffold\test\ServerTests\Tests.fs(3,6): error FS0039: The ...
Read more >
How to fail job and pipeline if there are failed tests in JUnit ...
Hi. My project (mobile application) has pipeline with stage for running UI tests (Appium) based on TestNG and maven.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found