Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test issue #1473

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions proxy_integration_tests/test_python_debug/check_debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,14 @@ def debug(self):
]

sim.setup(1.0)
if (get_config_bool("Machine", "enable_advanced_monitor_support")
and not get_config_bool("Java", "use_java")):
if get_config_bool("Machine", "enable_advanced_monitor_support"):
# write_data_speed_up_report
reports.append(
DataSpeedUpPacketGatherMachineVertex.OUT_REPORT_NAME)
reports.append(DataSpeedUpPacketGatherMachineVertex.IN_REPORT_NAME)
if not get_config_bool("Java", "use_java"):
reports.append(
DataSpeedUpPacketGatherMachineVertex.OUT_REPORT_NAME)
else:
reports.append(
DataSpeedUpPacketGatherMachineVertex.IN_REPORT_NAME)
pop = sim.Population(100, sim.IF_curr_exp, {}, label="pop")
pop.record("v")
inp = sim.Population(1, sim.SpikeSourceArray(
Expand Down
12 changes: 7 additions & 5 deletions spynnaker_integration_tests/test_debug_mode/check_debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,14 @@ def debug(self):
]

sim.setup(1.0)
if (get_config_bool("Machine", "enable_advanced_monitor_support")
and not get_config_bool("Java", "use_java")):
if get_config_bool("Machine", "enable_advanced_monitor_support"):
# write_data_speed_up_report
reports.append(
DataSpeedUpPacketGatherMachineVertex.OUT_REPORT_NAME)
reports.append(DataSpeedUpPacketGatherMachineVertex.IN_REPORT_NAME)
if not get_config_bool("Java", "use_java"):
reports.append(
DataSpeedUpPacketGatherMachineVertex.OUT_REPORT_NAME)
else:
reports.append(
DataSpeedUpPacketGatherMachineVertex.IN_REPORT_NAME)
pop = sim.Population(100, sim.IF_curr_exp, {}, label="pop")
pop.record("v")
inp = sim.Population(1, sim.SpikeSourceArray(
Expand Down
15 changes: 15 additions & 0 deletions unittests/model_tests/neuron/test_synaptic_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
from spinn_machine.version.version_strings import VersionStrings
from spinnman.transceiver.mockable_transceiver import MockableTransceiver
from spinnman.transceiver import Transceiver
from spinnman.processes import MostDirectConnectionSelector
from spinnman.connections.udp_packet_connections import SCAMPConnection
from spinnman.exceptions import SpinnmanTimeoutException
from pacman.model.placements import Placement
from pacman.operations.routing_info_allocator_algorithms import (
ZonedRoutingInfoAllocator)
Expand Down Expand Up @@ -61,6 +64,14 @@
import pyNN.spiNNaker as p


class _MockConnection(SCAMPConnection):
def send(self, data):
pass

def receive_scp_response(self, timeout=1.0):
raise SpinnmanTimeoutException("Test", timeout)


class _MockTransceiverinOut(MockableTransceiver):

@overrides(MockableTransceiver.malloc_sdram)
Expand Down Expand Up @@ -99,6 +110,10 @@ def read_word(
datum, = struct.unpack("<I", self.read_memory(x, y, base_address, 4))
return datum

@overrides(Transceiver.get_scamp_connection_selector)
def get_scamp_connection_selector(self) -> MostDirectConnectionSelector:
return MostDirectConnectionSelector([_MockConnection(0, 0)])


def say_false(self, *args, **kwargs):
return False
Expand Down