Merge pull request #1159 from gedankenexperimenter/simulator-output

Improve output of simulator tests
pull/1160/head
Jesse Vincent 3 years ago committed by GitHub
commit 94a7131b1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -361,7 +361,7 @@ sub generate_script {
# We should do this better, inside the core. But until we do
# I'd rather stick the macro in the code generator so nobody
# gets to use it from regular tests, boxing us in
cxx('#define GTEST_COUT std::cerr << "[ INFO ] "');
cxx('#define GTEST_COUT std::cout << "[ INFO ] "');
generate_start_new_test('KtestSourceFilename');
cxx(

@ -3240,6 +3240,10 @@ bool ShouldUseColor(bool stdout_is_tty) {
// console there does support colors.
return stdout_is_tty;
#else
// In case we're running from `make --output-sync`, we need to check
// MAKE_TERMOUT to determine if the output is going to a terminal.
const char* const make_termout = posix::GetEnv("MAKE_TERMOUT");
if (make_termout != nullptr) stdout_is_tty = true;
// On non-Windows platforms, we rely on the TERM variable.
const char* const term = posix::GetEnv("TERM");
const bool term_supports_color =

Loading…
Cancel
Save