diff options
author | Simon Glass <sjg@chromium.org> | 2025-02-09 09:07:17 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2025-03-15 11:47:04 +0000 |
commit | d08653d3699c1aafada3418c9f74b887bfb21a65 (patch) | |
tree | ba6b67765d7364bfbefe029ee14273ee899e767a /test/py/tests/test_source.py | |
parent | dd693ecb60384049dd8c3f6a36331c1a70b6558f (diff) |
test/py: Drop assigning ubman to cons
Now that we have a shorter name, we don't need this sort of thing. Just
use ubman instead.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/py/tests/test_source.py')
-rw-r--r-- | test/py/tests/test_source.py | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/test/py/tests/test_source.py b/test/py/tests/test_source.py index f0437aa15ca..970d8c79869 100644 --- a/test/py/tests/test_source.py +++ b/test/py/tests/test_source.py @@ -11,27 +11,26 @@ import utils @pytest.mark.buildconfigspec('fit') def test_source(ubman): # Compile our test script image - cons = ubman - mkimage = os.path.join(cons.config.build_dir, 'tools/mkimage') - its = os.path.join(cons.config.source_dir, 'test/py/tests/source.its') - fit = os.path.join(cons.config.build_dir, 'source.itb') - utils.run_and_log(cons, (mkimage, '-f', its, fit)) - cons.run_command(f'host load hostfs - $loadaddr {fit}') + mkimage = os.path.join(ubman.config.build_dir, 'tools/mkimage') + its = os.path.join(ubman.config.source_dir, 'test/py/tests/source.its') + fit = os.path.join(ubman.config.build_dir, 'source.itb') + utils.run_and_log(ubman, (mkimage, '-f', its, fit)) + ubman.run_command(f'host load hostfs - $loadaddr {fit}') - assert '2' in cons.run_command('source') - assert '1' in cons.run_command('source :') - assert '1' in cons.run_command('source :script-1') - assert '2' in cons.run_command('source :script-2') - assert 'Fail' in cons.run_command('source :not-a-script || echo Fail') - assert '2' in cons.run_command('source \\#') - assert '1' in cons.run_command('source \\#conf-1') - assert '2' in cons.run_command('source \\#conf-2') + assert '2' in ubman.run_command('source') + assert '1' in ubman.run_command('source :') + assert '1' in ubman.run_command('source :script-1') + assert '2' in ubman.run_command('source :script-2') + assert 'Fail' in ubman.run_command('source :not-a-script || echo Fail') + assert '2' in ubman.run_command('source \\#') + assert '1' in ubman.run_command('source \\#conf-1') + assert '2' in ubman.run_command('source \\#conf-2') - cons.run_command('fdt addr $loadaddr') - cons.run_command('fdt rm /configurations default') - assert '1' in cons.run_command('source') - assert 'Fail' in cons.run_command('source \\# || echo Fail') + ubman.run_command('fdt addr $loadaddr') + ubman.run_command('fdt rm /configurations default') + assert '1' in ubman.run_command('source') + assert 'Fail' in ubman.run_command('source \\# || echo Fail') - cons.run_command('fdt rm /images default') - assert 'Fail' in cons.run_command('source || echo Fail') - assert 'Fail' in cons.run_command('source \\# || echo Fail') + ubman.run_command('fdt rm /images default') + assert 'Fail' in ubman.run_command('source || echo Fail') + assert 'Fail' in ubman.run_command('source \\# || echo Fail') |