-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
tests: Avoid dialog boxes, prevent stdout from being lost #906
Conversation
@@ -3,4 +3,4 @@ | |||
|
|||
RUNALL_INCLUDE ..\universal_prefix.lst | |||
RUNALL_CROSSLIST | |||
PM_CL="/D_ENFORCE_FACET_SPECIALIZATIONS=1 /D_CRT_SECURE_NO_WARNINGS" | |||
PM_CL="/FIforce_include.hpp /D_ENFORCE_FACET_SPECIALIZATIONS=1 /D_CRT_SECURE_NO_WARNINGS" |
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.
We should note that the importer will need to verify that std/include
is made available to tr1
when running in the internal test harness.
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.
Excellent catch, I forgot that Microsoft-internal src/qa/distrib.yaml
would need to be changed. Thanks!
Test iso646.h, which is still part of the repo. Don't test CRT headers, which aren't part of the repo.
This makes Dev11_0000000_include_each_header_alone cleaner.
Thanks so much for dealing with this! |
) Fixes microsoftGH-781 (dialogs) and fixes microsoftGH-789 (stdout).
) Fixes microsoftGH-781 (dialogs) and fixes microsoftGH-789 (stdout).
) Fixes microsoftGH-781 (dialogs) and fixes microsoftGH-789 (stdout).
) Fixes microsoftGH-781 (dialogs) and fixes microsoftGH-789 (stdout).
added test_bidi to range_algo_support removed fill code Cleanup ranges test machinery (microsoft#899) tests: Avoid dialog boxes, prevent stdout from being lost (microsoft#906) Fixes microsoftGH-781 (dialogs) and fixes microsoftGH-789 (stdout). updating tests with bidi_range wrapper fixing tests initial reverse algo removed fill code updating tests with bidi_range wrapper
added test_bidi to range_algo_support removed fill code Cleanup ranges test machinery (microsoft#899) tests: Avoid dialog boxes, prevent stdout from being lost (microsoft#906) Fixes microsoftGH-781 (dialogs) and fixes microsoftGH-789 (stdout). updating tests with bidi_range wrapper fixing tests initial reverse algo removed fill code updating tests with bidi_range wrapper Fix bad merge in range_algo_support
stdout
).tests/std/include/force_include.hpp
, derived from libcxx'smsvc_stdlib_force_include.h
(which I contributed)./FI
totests/std/tests/prefix.lst
.tests/tr1/lit.site.cfg.in
so it can accesstests/std/include
. (This is lazy/expedient. In the future, we might want to have a common test directory, or we might want to upstream this enhancedTestEnvironmentPreparer
to libcxx for direct consumption.)/FI
totests/tr1/prefix.lst
._CrtSetReportMode
and_CrtSetReportFile
sendassert
messages tostderr
instead of displaying dialog boxes in debug mode./MT
and/MD
),assert
simply callsabort
which displays a crash dialog box from Windows Error Reporting._set_abort_behavior
prevents that. (Note 1)stdout
(likeprintf
,puts
, andcout
) might not be captured when weassert
/abort
because of buffering.setvbuf
disables buffering, preventing this. (Note 2)stderr
.stderr
instead of relying on thesetvbuf
fix here.wcout
towcerr
inP0218R1_filesystem
.include_each_header_alone_matrix.lst
.iso646.h
, which is still part of the repo.errno
, which was stomping over our attempt to testerrno.h
by forming the header name through macro replacement.)NO_TEST_ENVIRONMENT_PREPARER
escape hatch.Dev11_0000000_include_each_header_alone
cleaner.I've manually tested each of these changes. Temporarily reverting #800 allowed me to verify that
P0218R1_filesystem
failure is sent tostderr
, and that it doesn't emit assertion dialog boxes in debug mode or crash dialog boxes in release mode. Temporarily partially reverting #724 allowed me to verify that the randomized tests are printing tostderr
. (As these changes were systematic, I didn't exercise the other randomized tests.) Finally, I took an ordinary test and added each ofcout
,puts
, andprintf
to the end, followed by a failedassert
, and verified that the test logs were capturingstdout
properly.Note 1: This wasn't a problem for
libcxx
because we always build it with/MTd
:STL/tests/libcxx/usual_matrix.lst
Line 6 in 0cdf5fb
Note 2: This wasn't a problem for
libcxx
because it generally doesn't print things tostdout
. We primarily experience compiler errors and failed assertions.