Skip to content

Fix the Rest of the Windows Driver Tests #23116

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 1 commit into from
Mar 8, 2019

Conversation

gmittert
Copy link
Contributor

@gmittert gmittert commented Mar 6, 2019

This (along with #23040) makes driver tests now pass on Windows:

S:\bd\swift> C:\Python27\python.exe S:/b/llvm/bin/llvm-lit.py S:\bd\swift\test-windows-x86_64\ -sv --filter "Driver" -sv                                                                                                                                                                                                                              
...
-- Testing: 153 of 4520 tests, 12 threads --                                                                                                                                                                                                                                                                                                          
Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..                                                                                                                                                                                                                                                                                            
Testing Time: 211.16s                                                                                                                                                                                                                                                                                                                                 
  Expected Passes    : 116                                                                                                                                                                                                                                                                                                                            
  Expected Failures  : 5                                                                                                                                                                                                                                                                                                                              
  Unsupported Tests  : 32                                                                                                                                                                                                                                                                                                                             
                                                                                                                                                                                                                                                                                                                                                      
3 warning(s) in tests. 

@compnerd
Copy link
Member

compnerd commented Mar 6, 2019

@swift-ci please test

@compnerd
Copy link
Member

compnerd commented Mar 6, 2019

This looks great to me, the only thing that stands out is the use of -fansi-escape-codes which @jrose-apple might have issues with (since the driver may be run in a case where we don't want that - !isatty(stdout).

@swift-ci
Copy link
Contributor

swift-ci commented Mar 6, 2019

Build failed
Swift Test OS X Platform
Git Sha - 2e29aed6a4531cb36a1638f45a12f526ae24fec9

@gmittert
Copy link
Contributor Author

gmittert commented Mar 6, 2019

Fixed the pylint import order issue.

@gmittert
Copy link
Contributor Author

gmittert commented Mar 6, 2019

This looks great to me, the only thing that stands out is the use of -fansi-escape-codes which @jrose-apple might have issues with (since the driver may be run in a case where we don't want that - !isatty(stdout).

Passing -fansi-escape-codes doesn't do anything on non Windows platforms, on Unix, clang calls Process::UseANSIEscapeCodes which does nothing:

// llvm/lib/Support/Unix/Process.inc:402
void Process::UseANSIEscapeCodes(bool /*enable*/) {
  // No effect.
}

On Windows, it toggles using ANSI instead of SetConsoleMode. The actual choice to emit them is a different option.

@compnerd
Copy link
Member

compnerd commented Mar 7, 2019

Oh, yeah, we shouldn't use SetConsoleMode at all, especially now that the console has been rewritten to basically be ANSI escape code driven.

@compnerd
Copy link
Member

compnerd commented Mar 7, 2019

@swift-ci please test and merge

@gmittert
Copy link
Contributor Author

gmittert commented Mar 7, 2019

Fair to say that 13:17:58 TIMEOUT: test_dwarf (lang/swift/generic_extensions_typealias/TestGenericExtensionsTypealias.py) is unrelated?

@compnerd
Copy link
Member

compnerd commented Mar 8, 2019

@swift-ci please test macOS platform

@swift-ci
Copy link
Contributor

swift-ci commented Mar 8, 2019

Build failed
Swift Test OS X Platform
Git Sha - 2e29aed6a4531cb36a1638f45a12f526ae24fec9

@compnerd compnerd merged commit c3ea110 into swiftlang:master Mar 8, 2019
@gmittert gmittert deleted the 60to0mph branch March 8, 2019 23:45
@@ -716,6 +716,8 @@ addCommonInvocationArguments(std::vector<std::string> &invocationArgStrs,
invocationArgStrs.push_back(importerOpts.IndexStorePath);
}

invocationArgStrs.push_back("-fansi-escape-codes");
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be conditionalized on DiagnosticOptions::UseColor, no? Or will it just not use the escape codes if they never come up?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Exactly, if color is emitted, it'll use ansi escapes instead of SetConsoleMode, but it doesn't actually trigger the use of color.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants