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

Abort #1178

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Abort #1178

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
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
import unittest
from spinn_utilities.config_holder import set_config
from spalloc_client.job import JobDestroyedError
from spinn_utilities.ping import Ping
from spinnman.exceptions import SpinnmanIOException
from spinnman.exceptions import (
SpinnmanIOException, SpinnmanGenericProcessException)
from spinnman.transceiver import create_transceiver_from_hostname
from spinn_front_end_common.data.fec_data_writer import FecDataWriter
from spinn_front_end_common.interface.config_setup import unittest_setup
Expand Down Expand Up @@ -107,14 +107,14 @@ def _remove_old_json(self, folder):
os.remove(json_file)

def testSpin4(self):
if not Ping.host_is_reachable(self.spin4Host):
raise unittest.SkipTest(self.spin4Host + " appears to be down")
try:
trans = create_transceiver_from_hostname(self.spin4Host)
except (SpinnmanIOException):
self.skipTest("Skipping as getting Job failed")

machine = trans.get_machine_details()
self.skipTest("Skipping as create_transceiver failed")
try:
machine = trans.get_machine_details()
except (SpinnmanGenericProcessException):
self.skipTest("Skipping as getting machine_details failed")
FecDataWriter.mock().set_machine(machine)

folder = "spinn4"
Expand All @@ -138,8 +138,6 @@ def testSpin4(self):
trans.close()

def testSpin2(self):
if not Ping.host_is_reachable(self.spalloc):
raise unittest.SkipTest(self.spalloc + " appears to be down")
set_config(
"Machine", "spalloc_user", "Integration testing OK to kill")
set_config("Machine", "spalloc_server", self.spalloc)
Expand All @@ -152,9 +150,15 @@ def testSpin2(self):
spalloc_allocator()
except (JobDestroyedError, ConnectionRefusedError):
self.skipTest("Skipping as getting Job failed")
try:
trans = create_transceiver_from_hostname(hostname)
except (SpinnmanIOException):
self.skipTest("Skipping as create_transceiver failed")

trans = create_transceiver_from_hostname(hostname)
writer.set_machine(trans.get_machine_details())
try:
writer.set_machine(trans.get_machine_details())
except (SpinnmanGenericProcessException):
self.skipTest("Skipping as getting machine_details failed")

m_allocation_controller.close()

Expand Down
Loading