dotnet / dotnet/macios

xharness throws an exception when there is no install log, instead we should log an error and continue

Open
#8,545 0 comments 0 reactions 0 assignees View on GitHub
xharness
Dominant language
C#
Stars
2.9k
Forks
576
Avg merge
2d 13h
Merged PRs (30d)
96

Description

xharness does not contain handling for the scenario where there is no install log. Instead, an exception is thrown. This obscures the actual cause of failures.

Commits have run into this issues on device tests only, Jenkins jobs have succeeded for some commits running into this failure.

https://github.com/xamarin/xamarin-macios/commit/61580b15af1d9944f3b8bd1ca014b0428f11cf8d

```
Failure:
Harness exception for 'framework-test': System.IO.FileNotFoundException: Could not find file "/Users/xamarinqa/myagent/_work/1/s/jenkins-results/tests/framework-test/824/install-20200506_235011.log"
File name: '/Users/xamarinqa/myagent/_work/1/s/jenkins-results/tests/framework-test/824/install-20200506_235011.log'
at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x00259] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:274
at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/FileStream.cs:91
at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
at Microsoft.DotNet.XHarness.iOS.Shared.Logging.LogFile.GetReader () [0x00001] in /Users/xamarinqa/myagent/_work/1/s/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/Logging/LogFile.cs:58
at Microsoft.DotNet.XHarness.iOS.Shared.Logging.AppInstallMonitorLog.GetReader () [0x00000] in /Users/xamarinqa/myagent/_work/1/s/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/Logging/AppInstallMonitorLog.cs:48
at Xharness.TestTasks.RunDevice.RunTestAsync () [0x0073c] in /Users/xamarinqa/myagent/_work/1/s/tests/xharness/TestTasks/RunDevice.cs:133
at Xharness.TestTasks.RunDevice.RunTestAsync () [0x010e0] in /Users/xamarinqa/myagent/_work/1/s/tests/xharness/TestTasks/RunDevice.cs:219
at Xharness.TestTasks.RunTest.ExecuteAsync () [0x001b9] in /Users/xamarinqa/myagent/_work/1/s/tests/xharness/TestTasks/RunTest.cs:107
at Microsoft.DotNet.XHarness.iOS.Shared.Tasks.TestTasks.RunInternalAsync () [0x00226] in /Users/xamarinqa/myagent/_work/1/s/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/Tasks/TestTask.cs:282
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.