summaryrefslogtreecommitdiff
path: root/test/py/tests/test_source.py
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2025-04-07 16:40:02 -0600
committerTom Rini <trini@konsulko.com>2025-04-08 11:43:23 -0600
commitff61d6bfd1c9534d3fc2397846a5899639f2e55d (patch)
treedcfe4bc52848a5637c975a3352b57885e5b8a06d /test/py/tests/test_source.py
parent34820924edbc4ec7803eb89d9852f4b870fa760a (diff)
parentf892a7f397a66d8d09f418d1e0e06dfb48bac27d (diff)
Merge branch 'next'
Note that this undoes the changes of commit cf6d4535cc4c ("x86: emulation: Disable bloblist for now") as that was intended only for the release due to time.
Diffstat (limited to 'test/py/tests/test_source.py')
-rw-r--r--test/py/tests/test_source.py45
1 files changed, 22 insertions, 23 deletions
diff --git a/test/py/tests/test_source.py b/test/py/tests/test_source.py
index bbc311df6d1..970d8c79869 100644
--- a/test/py/tests/test_source.py
+++ b/test/py/tests/test_source.py
@@ -3,35 +3,34 @@
import os
import pytest
-import u_boot_utils as util
+import utils
@pytest.mark.boardspec('sandbox')
@pytest.mark.buildconfigspec('cmd_echo')
@pytest.mark.buildconfigspec('cmd_source')
@pytest.mark.buildconfigspec('fit')
-def test_source(u_boot_console):
+def test_source(ubman):
# Compile our test script image
- cons = u_boot_console
- 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')
- util.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')