Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Collectors]Output multiple formats #533

Merged

Conversation

daveMueller
Copy link
Collaborator

closes #490

@daveMueller daveMueller changed the title 490 Output multiple formats Output multiple formats Sep 5, 2019
@MarcoRossignoli MarcoRossignoli added the enhancement General enhancement request label Sep 6, 2019
@MarcoRossignoli
Copy link
Collaborator

cc: @vagisha-nidhi for help on review.

@MarcoRossignoli
Copy link
Collaborator

MarcoRossignoli commented Sep 6, 2019

@daveMueller can you also do some real test and share the output, we need also some integration testing, at the moment manual because we don't have in place a way to simulate all 3 drivers(msbuild, collector, console) and verify conditions, we should implement one day to keep also in sync the features between drivers cc: @tonerdo @petli

To use local build follow this guide https://github.com/tonerdo/coverlet/blob/master/Documentation/Troubleshooting.md#use-local-build let me know if you're in throuble.

@MarcoRossignoli
Copy link
Collaborator

Oh one more thing...you should also update documentation adding a simple comma/format to be clear that is supported https://github.com/tonerdo/coverlet/blob/master/Documentation/VSTestIntegration.md#advanced-options-supported-via-runsettings but not fundamental, thank's for your effort here.

@MarcoRossignoli MarcoRossignoli changed the title Output multiple formats [Collectors]Output multiple formats Sep 6, 2019
@daveMueller
Copy link
Collaborator Author

@daveMueller can you also do some real test and share the output, we need also some integration testing, at the moment manual because we don't have in place a way to simulate all 3 drivers(msbuild, collector, console) and verify conditions, we should implement one day to keep also in sync the features between drivers cc: @tonerdo @petli

To use local build follow this guide https://github.com/tonerdo/coverlet/blob/master/Documentation/Troubleshooting.md#use-local-build let me know if you're in throuble.

Sorry somehow I can't get my local build running. After the test execution nothing else happens. Any idea how I could troubleshoot this?
image

@daveMueller
Copy link
Collaborator Author

Oh one more thing...you should also update documentation adding a simple comma/format to be clear that is supported https://github.com/tonerdo/coverlet/blob/master/Documentation/VSTestIntegration.md#advanced-options-supported-via-runsettings but not fundamental, thank's for your effort here.

Yes I will update the documentation after the code is 'clean'.

@daveMueller
Copy link
Collaborator Author

daveMueller commented Sep 7, 2019

@MarcoRossignoli I can't figure out why the linux (release) build failed. Can you help out here?

@MarcoRossignoli
Copy link
Collaborator

@daveMueller I'll take a look in the afternoon or tomorrow!

@MarcoRossignoli
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@MarcoRossignoli
Copy link
Collaborator

@MarcoRossignoli I can't figure out why the linux (release) build failed. Can you help out here?

Seem a tmp issue on azp

@MarcoRossignoli
Copy link
Collaborator

Sorry somehow I can't get my local build running. After the test execution nothing else happens. Any idea how I could troubleshoot this?

@daveMueller my fault we need to take another approach to debug/run local collectors code I've updated the guide, let me know if you're able to test!

https://github.com/tonerdo/coverlet/blob/master/Documentation/Troubleshooting.md#use-local-collectors-build

@daveMueller
Copy link
Collaborator Author

Oh one more thing...you should also update documentation adding a simple comma/format to be clear that is supported https://github.com/tonerdo/coverlet/blob/master/Documentation/VSTestIntegration.md#advanced-options-supported-via-runsettings but not fundamental, thank's for your effort here.

Now I've also update the documentation.

@daveMueller
Copy link
Collaborator Author

@daveMueller can you also do some real test and share the output, ...

It seems there is still something going wrong. I made some tests on windows and linux. First everything seemed to work fine. Then I tried a 3th format on linux and suddenly the DirectoryNotFoundException again. On Windows this never happened also with all formats specified.
On the linux system everthing works fine with one or two formats specified. Starting with a 3th format it throws.
I didn't have much time to look at it yet but probably you have an idea?

image

@MarcoRossignoli MarcoRossignoli added feature-request New feature request and removed enhancement General enhancement request labels Sep 12, 2019
@MarcoRossignoli
Copy link
Collaborator

@daveMueller I added some code to try to solve Attachment issue...can you retry on linux?

@MarcoRossignoli
Copy link
Collaborator

I'd like a review by some of vstest team if possible

cc: @PBoraMSFT @vagisha-nidhi @cltshivash

@@ -19,31 +20,31 @@ internal class AttachmentManager : IDisposable
private readonly DataCollectionContext _dataCollectionContext;
private readonly IFileHelper _fileHelper;
private readonly IDirectoryHelper _directoryHelper;
private readonly string _reportFileName;
private readonly ICountDownEvent _countDownEvent;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious. Why is this being used? Waiting for all reports to get generated?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because with multifile we get error on directory cleanup on Linux also if we create one AttachmentManager per file, like tmp directory returned was the same. Now we use only one AttachmentManager and wait on dispose for all sends(max wait 30 sec to avoid hang) this should resolve your old issue with sync between async send and dispose, what do you think?

@vagisha-nidhi
Copy link
Contributor

@MarcoRossignoli @daveMueller This looks like a great change!

Copy link
Collaborator

@MarcoRossignoli MarcoRossignoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thank's a lot @daveMueller for the great effort here!
I did some test on ubuntu and win and seem to work well!

@MarcoRossignoli MarcoRossignoli merged commit 06ef9ad into coverlet-coverage:master Sep 14, 2019
@daveMueller daveMueller deleted the 490_OutputMultipleFormats branch September 14, 2019 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Output multiple formats when executed via vstest (coverletArgs.runsettings)
3 participants