Skip to content

Commit

Permalink
Merge pull request #81 from kacf/skip_worker_check
Browse files Browse the repository at this point in the history
test: Move skip condition earlier so we don't hit the worker check.
  • Loading branch information
Kristian Amlie authored Jan 19, 2023
2 parents 6a5a550 + 85a184c commit 3886cc3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 3 additions & 1 deletion tests/test_update.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/python
# Copyright 2022 Northern.tech AS
# Copyright 2023 Northern.tech AS
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -768,6 +768,8 @@ def test_signed_updates(self, sig_case, bitbake_variables, connection):
connection.run(
"cp -L /data/etc/mender/mender.conf.bak $(realpath /etc/mender/mender.conf)"
)
else:
connection.run("rm -f $(realpath /etc/mender/mender.conf)")
if sig_key:
connection.run(
"rm -f /etc/mender/%s" % os.path.basename(sig_key.public)
Expand Down
9 changes: 3 additions & 6 deletions tests/utils/fixtures/fixtures.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/python
# Copyright 2020 Northern.tech AS
# Copyright 2023 Northern.tech AS
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -194,17 +194,14 @@ def setup_board(

print("board type: ", board_type)

worker_count = get_worker_count()
assert (
"qemu" in board_type or worker_count == 1
), "Only QEMU is supported when using multiple workers"

if "qemu" in board_type:
image_dir = build_image_fn()
return setup_qemu(request, qemu_wrapper, image_dir, session_connection)
elif "raspberrypi4" in board_type and request.config.getoption(
"--hardware-testing"
):
worker_count = get_worker_count()
assert worker_count == 1, "Only QEMU is supported when using multiple workers"
return setup_hardware_test_board(request, session_connection)
elif conversion:
pytest.skip("Skip non-qemu platforms for mender-convert")
Expand Down

0 comments on commit 3886cc3

Please sign in to comment.