-
Notifications
You must be signed in to change notification settings - Fork 11
Conversation
Upgrade NUnit from version 2.6.4 to version 3.2.1 and make ReSharper run the tests with NUnit 3.
Upgrade LibGit2Sharp from version 0.22.0 to version 0.23.0-pre20150419160303 and LibGit2Sharp.NativeBinaries from version 1.0.129 to version 1.0.137.
Supress CS0414: The private field 'field' is assigned but its value is never used. Supress CS1701: Assuming assembly reference "Assembly Name GitTools#1" matches "Assembly Name GitTools#2", you may need to supply runtime policy.
Use Path.DirectorySeparatorChar instead of hard coded backslashes for improved Unix and Linux support.
If deleting a file ends up with a `FileNotFoundException` or deleting a directory ends up with a `DirectoryNotFoundException`, there's no reason for the operation to fail; the file or directory is gone and we shouldn't care why we can't delete it.
371ed87
to
20295a2
Compare
@JakeGinnivan The only thing left to fix now are two tests failing on Travis (Linux) with something like this:
On OS X they fail with something along these lines:
Seems like Do you have any idea how we can make these temporary path tests a little more robust? |
Was just curious to know the reason behind using the temp directory.. why not force a directory to be specified, or default to the current working dir? |
@dazinator I think using temporary paths for testing is reasonable. Hard coding a path would be difficult to get right across different build environments, don't you agree? What I'm unsure of, is why the path is asserted in the first place. I don't understand the semantics of the assertion, so I'm unable to figure out another way to do it. Only @JakeGinnivan can help out there, I think. |
@asbjornu - perhaps i'm mistaken but I would have thought using a path thats relative to the test projects output directory wouldn't be too difficult, and would avoid the use of the temp directory. I dont think the temp dir is bad per say, but Ive always preferred to keep assets under the checkout / working dir and not use global / system / shared directories when it can be avoided! |
@dazinator Good point. If you have time to spare, do you think you could contribute some time to fixing this in the few tests that are failing? You don't need to do a PR or anything; just fork the branch of this PR and push your stuff to your fork and I'll pull it into this PR after. That would be very much appreciated! ❤️ |
@asbjornu - The tests seem to fail because they are a little brittle. Basically in the failing test - this happens
Basically this tries to establish a folder name in the temp directory for the repo, based on the repo name. If the folder name is already taken it recursively appends a number - The test is not expecting this to happen. So it expects it to be placed in the temp dir, without this number being appended to the path, but because on the system that is running the tests, the temp dir is probably polluted, it ends up not using the expected folder, and creates a unique folder by appending this number to the path instead. So it's actually doing what it is meant to do, but the test is brittle and fails it. This probably lends wait to the hazard of using system / global / shared directories during tests and not keeping things isolated! I think it makes sense to switch away from using the temp dir as I have mentioned previously, but such a change would potentially impact GitVersion, so I have raised an issue over there to figure out what the consequence is if we swtiched: GitTools/GitVersion#822 Once that's clarified, i'd be happy to contribute :) |
Ignore tests that fail on Unix / Mono due to pathing problems, as explained in GitTools#29.
Ignore tests that fail on Unix / Mono due to pathing problems, as explained in GitTools#29.
@dazinator I've ignored the failing tests in #31, but you're more than welcome to submit a PR that un-ignores the tests and fixes the underlying problem! 👍 |
TODO
System.ArgumentNullException : Value cannot be null. Parameter name: source at System.Linq.Enumerable.ToArray[TSource] (IEnumerable
1 source)`EntryPointNotFoundException
due toSetErrorMode()
not being supported on Mono.Overview
This PR adds a Travis build to ensure Linux/Mono compatibility and upgrades
LibGit2Sharp
to version0.23.0-pre20150419160303
so we get the fixes in libgit2/libgit2sharp#1298.GitTools.Testing
This PR depends on GitTools/GitTools.Testing#2 needs to be merged and released on NuGet, so that dependency can be updated.
When all of the above is figured out and fixed, it would be nice to have this merged and pre-released on NuGet, so I can go on to update GitVersion as well.