X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org From: "Dave Korn" To: References: <15468287 DOT post AT talk DOT nabble DOT com> Subject: RE: Perl with SerialPort Date: Wed, 13 Feb 2008 22:59:12 -0000 Message-ID: <01c701c86e94$0ca90dc0$2e08a8c0@CAM.ARTIMI.COM> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On 13 February 2008 22:46, Dave Korn wrote: > On 13 February 2008 21:23, curator wrote: > >> So the question is: i would like to prefer no 2. For that i have to install >> SerialPort for Perl for cygwin. >> >> Is this possible, and if yes, could you tell me how? > > I'm no perl expert, Still true, but I've found one thing out since sending that: you'll want Device::SerialPort instead of Win32::SerialPort. > but from what I've read on the list it seems that > cpan works under cygwin for most perl modules. Give it a try and let us > know how it goes. Fails at the testing stage, reporting: Running make test /usr/bin/perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/01timing.............ok 4/7 t/01timing.............NOK 7# Failed test (t/01timing.t at line 33) # then: 207441765 now: 207443905 diff: 2140 # Looks like you failed 1 test of 7. t/01timing.............dubious Test returned status 1 (wstat 256, 0x100) DIED. FAILED test 7 Failed 1/7 tests, 85.71% okay t/10basic..............skipped all skipped: No serial port selected for use with testing t/11saved-state........skipped all skipped: No serial port selected for use with testing t/20inherited..........skipped all skipped: No serial port selected for use with testing t/21inherited-state....skipped all skipped: No serial port selected for use with testing Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------ - t/01timing.t 1 256 7 1 14.29% 7 4 tests skipped. Failed 1/5 test scripts, 80.00% okay. 1/7 subtests failed, 85.71% okay. Makefile:868: *** [test_dynamic] Error 255 #0 test_dynamic at /home/dk/.cpan/build/Device-SerialPort-1.04/Makefile:868 #1 test (.PHONY target) Command-line arguments: "test" /artimi/tools/cygwin/bin/make test -- NOT OK Running make install make test had returned bad status, won't install without force I'd suggest going ahead with the force install (which I don't know how to do yet), because looking at 01timing.t:- # We need to test that the "get_tick_count" function actually works # as expected, since we use it during other tests to verify toggle # speeds, hang ups, etc. can_ok('Device::SerialPort',qw(get_tick_count)); # test my $then; ok(defined($then = Device::SerialPort->get_tick_count), "get_tick_count returns a number"); # test ok(sleep(2) <= 2, "sleep sleeps"); # test my $now; ok(defined($now = Device::SerialPort->get_tick_count), "get_tick_count still returns a number"); # test ok( ($now-$then) >= 1000, "measured sleep as more than 1 second") or diag("then: $then now: $now diff: ".($now-$then)); # test # Allow 100ms fudge-time for slow calls, etc ok( ($now-$then) <= 2100, "measured sleep as less than 2 seconds") or diag("then: $then now: $now diff: ".($now-$then)); # test ... I'd say it's a bit over-sensitive. Won't necessarily do anything except tell you that you're running on a multi-tasking OS. POSIX explicitly says "The suspension time may be longer than requested due to the scheduling of other activity by the system" about the sleep() function, and I'd assume perl sleep()'s behaviour reflects that. cheers, DaveK -- Can't think of a witty .sigline today.... -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/