Beispiel #1
0
    def stop(self):
        for worker in self._workers:
            worker.stop()

        if self._serial_proxy:
            serial_console.release_port(self._listen_host,
                                        self._listen_port)
Beispiel #2
0
    def stop(self):
        for worker in self._workers:
            worker.stop()

        if self._serial_proxy:
            serial_console.release_port(self._listen_host,
                                        self._listen_port)
Beispiel #3
0
    def test_release_port(self):
        serial.ALLOCATED_PORTS.add(('127.0.0.1', 100))
        serial.ALLOCATED_PORTS.add(('127.0.0.2', 100))
        self.assertEqual(2, len(serial.ALLOCATED_PORTS))

        serial.release_port('127.0.0.1', 100)
        self.assertEqual(1, len(serial.ALLOCATED_PORTS))

        serial.release_port('127.0.0.2', 100)
        self.assertEqual(0, len(serial.ALLOCATED_PORTS))
Beispiel #4
0
    def test_release_port(self):
        serial.ALLOCATED_PORTS.add(('127.0.0.1', 100))
        serial.ALLOCATED_PORTS.add(('127.0.0.2', 100))
        self.assertEqual(2, len(serial.ALLOCATED_PORTS))

        serial.release_port('127.0.0.1', 100)
        self.assertEqual(1, len(serial.ALLOCATED_PORTS))

        serial.release_port('127.0.0.2', 100)
        self.assertEqual(0, len(serial.ALLOCATED_PORTS))