Initial support for menuconfig target

This commit is contained in:
valeros
2020-03-03 00:58:07 +02:00
parent a271143c52
commit 314fe7d309

View File

@@ -436,6 +436,15 @@ class PlatformRunMixin(object):
for key, value in variables.items():
args.append("%s=%s" % (key.upper(), self.encode_scons_arg(value)))
proc.copy_pythonpath_to_osenv()
if targets and "menuconfig" in targets:
return proc.exec_command(
args, stdout=sys.stdout, stderr=sys.stderr, stdin=sys.stdin
)
if click._compat.isatty(sys.stdout):
def _write_and_flush(stream, data):
try:
stream.write(data)
@@ -443,9 +452,7 @@ class PlatformRunMixin(object):
except IOError:
pass
proc.copy_pythonpath_to_osenv()
if click._compat.isatty(sys.stdout):
result = proc.exec_command(
return proc.exec_command(
args,
stdout=proc.BuildAsyncPipe(
line_callback=self._on_stdout_line,
@@ -456,13 +463,12 @@ class PlatformRunMixin(object):
data_callback=lambda data: _write_and_flush(sys.stderr, data),
),
)
else:
result = proc.exec_command(
return proc.exec_command(
args,
stdout=proc.LineBufferedAsyncPipe(line_callback=self._on_stdout_line),
stderr=proc.LineBufferedAsyncPipe(line_callback=self._on_stderr_line),
)
return result
def _on_stdout_line(self, line):
if "`buildprog' is up to date." in line: