From: Simon Glass <sjg@chromium.org>
The pager can interfere with tests and there is a lab test which uses
the build-efi script. Add an option to disable the pager so that the
labgrid test can request that.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
scripts/build-efi | 3 ++-
scripts/build-qemu | 2 ++
scripts/build_helper.py | 2 ++
3 files changed, 6 insertions(+), 1 deletion(-)
@@ -155,7 +155,8 @@ class BuildEfi:
def do_build(self, build):
"""Build U-Boot for the selected board"""
- res = command.run_one('buildman', '-w', '-o', self.build_dir,
+ extra = ['-a', '~CONSOLE_PAGER'] if self.args.no_pager else []
+ res = command.run_one('buildman', '-w', '-o', self.build_dir, *extra,
'--board', build, '-I', raise_on_error=False)
if res.return_code and res.return_code != 101: # Allow warnings
raise ValueError(
@@ -200,6 +200,8 @@ class BuildQemu:
self.build_dir.mkdir(parents=True, exist_ok=True)
cmd = ['buildman', '-w', '-o', str(self.build_dir), '--board',
self.board, '-I']
+ if self.args.no_pager:
+ cmd += ['-a', '~CONSOLE_PAGER']
self.execute_command(
cmd,
@@ -301,6 +301,8 @@ def add_common_args(parser):
help='Use KVM (Kernel-based Virtual Machine) for acceleration')
parser.add_argument('-K', '--kernel',
help='Kernel to run using -kernel')
+ parser.add_argument('-n', '--no-pager', action='store_true',
+ help="Disable the pager (for testing)")
parser.add_argument('-o', '--os', metavar='NAME', choices=['ubuntu'],
help='Run a specified Operating System')
parser.add_argument('-r', '--run', action='store_true',