From patchwork Sat Mar 7 03:07:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 243336 List-Id: U-Boot discussion From: sjg at chromium.org (Simon Glass) Date: Fri, 6 Mar 2020 20:07:33 -0700 Subject: [PATCH 19/20] test/py: Use buildman to build U-Boot In-Reply-To: <20200307030734.237401-1-sjg@chromium.org> References: <20200307030734.237401-1-sjg@chromium.org> Message-ID: <20200307030734.237401-15-sjg@chromium.org> It is a pain to have to set the ARCH and CROSS_COMPILE environment variables when using test.py's --build option. It is possible to get these using the -A and -a options from buildman. But it seems better to just use buildman to do the build. Remove the manual 'make' logic in test/py and use buildman instead. Signed-off-by: Simon Glass --- test/py/conftest.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/test/py/conftest.py b/test/py/conftest.py index 34ac4fb062..8079cd7305 100644 --- a/test/py/conftest.py +++ b/test/py/conftest.py @@ -141,17 +141,13 @@ def pytest_configure(config): if config.getoption('build'): if build_dir != source_dir: - o_opt = 'O=%s' % build_dir + dest_args = ['-o', build_dir, '-w'] else: - o_opt = '' - cmds = ( - ['make', o_opt, '-s', board_type + '_defconfig'], - ['make', o_opt, '-s', '-j8'], - ) - with log.section('make'): - runner = log.get_runner('make', sys.stdout) - for cmd in cmds: - runner.run(cmd, cwd=source_dir) + dest_args = ['-i'] + cmd = ['buildman', '--board', board_type] + dest_args + with log.section('buildman'): + runner = log.get_runner('buildman', sys.stdout) + runner.run(cmd, cwd=source_dir) runner.close() log.status_pass('OK')