diff options
author | Simon Glass <sjg@chromium.org> | 2024-11-12 07:13:17 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-11-13 12:01:35 -0600 |
commit | 6f3583074fc05e16ca8a0244aa7bf6e634e7d6df (patch) | |
tree | abaf86a44d2945d2c2488199c97ebcde54a1ab69 /test/py/conftest.py | |
parent | 530c694c450e5b98c50ea5b1201df474bc952ca9 (diff) |
test: Allow connecting to a running board
Sometimes we know that the board is already running the right software,
so provide an option to allow running of tests directly, without first
resetting the board.
This saves time when re-running a test where only the Python code is
changing.
Note that this feature is open to errors, since the user must know that
the board is in a fit state to execute tests. It is useful for repeated
iteration on a particular test, where it can save quite a bit of time.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/py/conftest.py')
-rw-r--r-- | test/py/conftest.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/py/conftest.py b/test/py/conftest.py index 46a410cf268..7a52b966154 100644 --- a/test/py/conftest.py +++ b/test/py/conftest.py @@ -80,6 +80,8 @@ def pytest_addoption(parser): parser.addoption('--gdbserver', default=None, help='Run sandbox under gdbserver. The argument is the channel '+ 'over which gdbserver should communicate, e.g. localhost:1234') + parser.addoption('--use-running-system', default=False, action='store_true', + help="Assume that U-Boot is ready and don't wait for a prompt") def run_build(config, source_dir, build_dir, board_type, log): """run_build: Build U-Boot @@ -254,6 +256,7 @@ def pytest_configure(config): ubconfig.board_type = board_type ubconfig.board_identity = board_identity ubconfig.gdbserver = gdbserver + ubconfig.use_running_system = config.getoption('use_running_system') ubconfig.dtb = build_dir + '/arch/sandbox/dts/test.dtb' ubconfig.connection_ok = True |