Skip Menu |

This queue is for tickets about the Device-SerialPort CPAN distribution.

Report information
The Basics
Id: 18086
Status: open
Priority: 0/
Queue: Device-SerialPort

People
Owner: Nobody in particular
Requestors: adamk [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.002
Fixed in: (no value)



Subject: Provide compatibility with automated environments
Device::SerialPort is by and large not working with CPAN Testers. It assumes that /dev/ttyS1 is available, and is generally not really suited to being tested in an automated environment. This failure also means that nothing else that uses Device::SerialPort can be run in an automated testing environment either, even if serial access is one small part of that larger system. Please add (at the very least) support for the AUTOMATED_TESTING flag, and skip any testing for which you can't find a resource, such as a working physical serial port. Alternatively, if there's some testing that can be done just using a mocked serial port, consider using that instead. As a second level of support, consider adding support for tests passing without a physical serial cable, so that developers working on things without a physical serial cable can install Device::SerialPort within the recursive CPAN.pm installation. In my case, I don't have serial devices on hand, because the device this code will ultimately run on is a very expensive system sitting in an airport server room, and as a developer I am most certainly NOT working in an airport server room. Thanks
Subject: Re: [rt.cpan.org #18086] Provide compatibility with automated environments
Date: Fri, 10 Mar 2006 18:18:22 EST
To: bug-Device-SerialPort [...] rt.cpan.org
From: Bbirthisel [...] aol.com
In a message dated 3/9/2006 9:45:21 PM Eastern Standard Time, bug-Device-SerialPort@rt.cpan.org writes: Show quoted text
> Device::SerialPort is by and large not working with CPAN Testers. > > It assumes that /dev/ttyS1 is available, and is generally not really > suited to being tested in an automated environment. > > This failure also means that nothing else that uses Device::SerialPort > can be run in an automated testing environment either, even if serial > access is one small part of that larger system. > > Please add (at the very least) support for the AUTOMATED_TESTING flag, > and skip any testing for which you can't find a resource, such as a > working physical serial port. > > Alternatively, if there's some testing that can be done just using a > mocked serial port, consider using that instead.
There is quite a lot that can be done with a mocked serial port. And while I am no longer the primary maintainer of Device::SerialPort, the same emulation would work with Win32::SerialPort. But I don't have enough tuits to do it anytime soon. If I was going to do it, I would start by looking at the Home Automation article in TPJ # 16 (reprinted in O'Reilly's Games, Diversions & Perl Culture. There I created a small Serial_Stub.pm for those who didn't have the special control devices. It would then just have to scale up to the full command set (and there is a test suite to confirm that). The provision already exists to "loopback" without an external cable (partly in order to support the examples in that article). And certainly such an item would be a useful addition to the existing examples and tests. -bill