Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

Try avoiding emitting assembly to run setup process - rebased #170

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

mrward
Copy link
Member

@mrward mrward commented Feb 8, 2021

Fixed some problems with the original PR #149

The path was being created without the path separator for the
Mono.Addins.SetupProcess assembly. Also the file extension was
incorrectly set to .dll when running with Mono.
The project was hard coded to target .NET 4.7.2 instead of using
the TargetFramework.props file. This was preventing it being
referenced by the UnitTests project.
The tests do not run tests with the external SetupProcess currently
but having the UnitTests copy this allows this to be tested locally
by changing the AddinDatabase.GetSetupHandler method.
Fixed the setup process tool trying to use too many command line
arguments. The out directory is passed on stdin not as a command
line argument.
@mrward
Copy link
Member Author

mrward commented Feb 8, 2021

OK down to just two failing tests with the external setup process tool.

Running Mono.Addins.Test.UnitTests.UnitTests.TestScanDataFileGeneration.GenerateAndLoadScanDataFiles ...
Using assembly reflector: Mono.Addins.CecilReflector.Reflector
Result message:
  Expected: 1
  But was:  0

Running Mono.Addins.Test.UnitTests.UnitTests.TestScanDataFileGeneration.NormalScan ...
Result message:
  Expected: some item equal to "vsmac/main/external/mono-addins/Test/tmp/ScanDataFilesTest-12/App/SimpleAddin1.addin.xml"
  But was:  < "vsmac/main/external/mono-addins/Test/tmp/ScanDataFilesTest-12/App/SimpleApp.addins" >

@mrward
Copy link
Member Author

mrward commented Feb 8, 2021

Down to one failing test.

Running Mono.Addins.Test.UnitTests.UnitTests.TestScanDataFileGeneration.GenerateAndLoadScanDataFiles ...
Using assembly reflector: Mono.Addins.CecilReflector.Reflector
Result message:
  Expected: 1
  But was:  5

@mrward
Copy link
Member Author

mrward commented Feb 8, 2021

OK this is working now. The last commit was not needed. The last two failing tests were not supposed to be run 'isolated'. I changed the addindatabase to always return the SetupProcess which is not right. Now all tests are green if I only return SetupProcess when RequiresIsolation is true.

@mrward
Copy link
Member Author

mrward commented Feb 10, 2021

I have pulled these changes into the .netstandard 2.0 branch PR - #171

So not sure if this PR on its own is needed. There still needs to be some work done in the other branch for .NET Core/.NET 5. Have only been looking at getting the tests passing so far.

Base automatically changed from master to main March 9, 2021 14:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants