-
Notifications
You must be signed in to change notification settings - Fork 81
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
Run built-in unit tests in Windows builds (dmd-only) #315
Merged
jondegenhardt
merged 33 commits into
eBay:master
from
jondegenhardt:windows-test-build-oct2020
Oct 3, 2020
Merged
Run built-in unit tests in Windows builds (dmd-only) #315
jondegenhardt
merged 33 commits into
eBay:master
from
jondegenhardt:windows-test-build-oct2020
Oct 3, 2020
Conversation
This file contains 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
…avoid open file issues.
…s when unit test finishes.
…s when unit test finishes.
…eric formatting issues. (Precision width.)
…eric formatting issues. (Precision width.)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR adds built-in unit tests to the Window CI test suite. It follows-on PR #313, which successfully got a
dub
compile and build to run. At present the built-in unit tests are run on DMD only. LDC produces a small number of deltas due to differences informat
output (more detail below).Using
make unittest
has the effect of running all the built-in unit tests (in the source code files). However, it does not run the command line test suite (make test
). The built-in unit tests are a substantial indication of progress though.This PR makes a number of small code changes to accommodate Windows. The main changes where:
rmdirRecurse
is used to delete all the temporary files created during the unit test. On Windows, out-of-scope references are apparently not getting cleaned up quick enough, generating a failure. There may be other cases as well.std.format.format
function produces result that are inconsistence the Linux/MacOS builds. In particular, thef
format with a precision value is truncating rather than rounding on Windows platforms. This is a bug. To make the unittest suite pass a set of unit tests forformatNumber
innumerics.d
were disabled on Windows builds. The DMD and LDC compilers produce different deltas, but both produce incorrect values. This is causing some unittest failures intsv-sample
unittests under LDC that don't occur with DMD.An attempt was to run command line tests with
make test
. This will take more work, because the error tests produce Windows newline results on Windows, but the gold set was generated On Unix. It will take more time to identify a reasonable way to rectify these cases without also compromising the non-error tests. (Error messages, help messages, etc., should generate Windows newlines, on Windows, even if regular TSV results output generates Unix newlines.Overall these changes go a long way towards having a solid Windows test platform.