Skip to content

Commit

Permalink
No point doing so many tests!
Browse files Browse the repository at this point in the history
  • Loading branch information
rowleya committed Sep 20, 2023
1 parent 69205ba commit 5d7da63
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test_whole_board/test_board_sets.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,25 +109,25 @@ def do_run(sender_board):
f"No spikes for {receiver_pop.label}:{spikes[:,0][jumps] + 1}"


@pytest.mark.parametrize("x,y,b,s", BOARDS)
def test_run(x, y, b, s):
@pytest.mark.parametrize("x,y,s", BOARDS)
def test_run(x, y, s):
test_dir = os.path.dirname(__file__)
client = SpallocClient(SPALLOC_URL, SPALLOC_USERNAME, SPALLOC_PASSWORD)
job = client.create_job_rect_at_board(
WIDTH, HEIGHT, triad=(x, y, b), machine_name=SPALLOC_MACHINE)
WIDTH, HEIGHT, triad=(x, y, 0), machine_name=SPALLOC_MACHINE)
with job:
job.launch_keepalive_task()
# Wait for not queued for up to 30 seconds
state = job.get_state(wait_for_change=True)
# If queued or destroyed skip test
if state == SpallocState.QUEUED:
job.destroy("Queued")
pytest.skip(f"Some boards starting at {x}, {y}, {b} is in use")
pytest.skip(f"Some boards starting at {x}, {y}, 0 is in use")
elif state == SpallocState.DESTROYED:
pytest.skip(f"Boards {x}, {y}, {b} could not be allocated")
pytest.skip(f"Boards {x}, {y}, 0 could not be allocated")
# Actually wait for ready now (as might be powering on)
job.wait_until_ready()
tmpdir = tempfile.mkdtemp(prefix=f"{x}_{y}_{b}", dir=test_dir)
tmpdir = tempfile.mkdtemp(prefix=f"{x}_{y}_0", dir=test_dir)
os.chdir(tmpdir)
with open("spynnaker.cfg", "w", encoding="utf-8") as f:
f.write("[Machine]\n")
Expand Down

0 comments on commit 5d7da63

Please sign in to comment.