Earl Ou has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/35595 )
Change subject: scons: avoid interactive access in non-tty
......................................................................
scons: avoid interactive access in non-tty
We saw some strange behavior when building scons without an interactive
TTY. This seems be caused by the control signal set from
curses.initscr() and endwin(). To avoid issues, we should avoid those
operation when running in non interactive situation.
Change-Id: I9cf8e48a786d47d567ba193f0b069f638e8db647
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35595
Reviewed-by: Gabe Black <[email protected]>
Maintainer: Gabe Black <[email protected]>
Tested-by: kokoro <[email protected]>
---
M site_scons/gem5_scons/__init__.py
1 file changed, 5 insertions(+), 0 deletions(-)
Approvals:
Gabe Black: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass
diff --git a/site_scons/gem5_scons/__init__.py
b/site_scons/gem5_scons/__init__.py
index 169e0fe..3323112 100644
--- a/site_scons/gem5_scons/__init__.py
+++ b/site_scons/gem5_scons/__init__.py
@@ -41,6 +41,7 @@
from __future__ import print_function
import os
+import sys
import textwrap
from gem5_scons.util import get_termcap
@@ -131,6 +132,10 @@
# The width warning and error messages should be wrapped at.
text_width = None
+# If stdout is not attached to a terminal, default to 80 columns.
+if not sys.stdout.isatty():
+ text_width = 80
+
# This should work in python 3.3 and above.
if text_width is None:
try:
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/35595
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I9cf8e48a786d47d567ba193f0b069f638e8db647
Gerrit-Change-Number: 35595
Gerrit-PatchSet: 4
Gerrit-Owner: Earl Ou <[email protected]>
Gerrit-Reviewer: Earl Ou <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Jui-min Lee <[email protected]>
Gerrit-Reviewer: Yu-hsin Wang <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s