
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 sjg@chromium.org ---
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')