-
Notifications
You must be signed in to change notification settings - Fork 934
Miscellaneous fixes #695
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
Merged
Merged
Miscellaneous fixes #695
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
0e87f88
Add NHibernate.TestDatabaseSetup to Everything solution.
ngbrown a454727
Normalize spaces and tabs in build files.
ngbrown 1c2973c
Fix tests related to WeakReference and upcoming .NET Core changes.
ngbrown 204aab2
Environment.NewLine isn't a good way to split log entries.
ngbrown 181602a
Use Path.Combine better for "Tools/PEVerify".
ngbrown c97850e
Create SqlServer Compact db respecting path in connection string.
ngbrown 55dc320
Update wording in ShowBuildMenu and allow NUnit tests to be ran with …
ngbrown File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PLATFORM
environment variable looks harmful, it causes build failures due to MsBuild using it if defined, as in here.It seems anyway that its default is to be not defined, it is just unfortunately set by this
ShowBuildMenu
when setting up test configuration, causing then build failures (especially on async file generation).So I wonder if this change works as expected. I think in most cases we are still running nunit as a 32 bits process, even on x64 boxes. Maybe should be changed to use a logic like here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NUnit does run in x64 with this change...
The
PLATFORM
environment variable may be interacting with the async generation elsewhere, but it's not 'harmful' on this line in theShowBuildMenu.bat
. This pull request didn't set thePLATFORM
, just tested its value.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe on your machine, not on mine. This
PLATFORM
environment variable is not a standard thing. Most boxes do not have it. So your change may mostly works on your machine, not elsewhere. That is why I have linked an alternate way using environment variables documented for this usage. (No official doc, but at least many references, like here and other places.)Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The point of this wasn't for general use x64 unit testing, it was only for enabling the testing of the x64 configurations in the build menu (of which there are ones for Firebird, SQLite, and SQL Server Compact). I agree that even at this task it's imperfect as the configurations needs to be created and then the tests ran in the same session of
ShowBuildMenu.bat
.It's not about my machine or your machine, as none of my machines ever have
PLATFORM
set at a machine or user profile level. It was intended to be entirely within theShowBuildMenu.bat
.PLATFORM
has been set in theShowBuildMenu.bat
since 2011:nhibernate-core/ShowBuildMenu.bat
Line 98 in dfb877f
Maybe a better solution would have two separate
Run tests using active configuration
one for each of x64 and x86.An even better solution would use NuGet packages of the ADO.NET drivers where both sets of native binaries are included in the build process and don't have to be selected at the configuration level, but based on the word size of the currently running process.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well it is worst than imperfect, since it is a "work only once" solution. Usually we do not re-create configurations for each test run, we just activate the one we want. And activation is not setting this variable.
By the way it cannot work when creating a SQL Server Compact test configuration either: this one put
AnyCpu
in this variable whatever its bitness.So yes I agree that two options is the way to go. But that will require a letter shift, like moving B&C to A&B.
About NuGet, see #1401.
Firebird and SQLite data providers are CPU agnostic nowadays anyway. SQL Server CE is still an issue and this one will likely be solved only by dropping it. Oracle stays a special case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was reacting to the comment that this pull request was somehow 'harmful', not that it only barely helps/works.
I think that adding to your #1401 pull request separate menu options to run tests in both x86 and x64 is a good idea.