I just release 0.03 of Siebel::AssertOS with an added feature to check also supported Linux distributions, but I'm still getting PASS reports from OpenBSD and FreeBSD.

I did some testing in my local machine and 'make test' is getting different results from 'prove'.

jackal@yggdrasil:~/Projetos/Siebel-AssertOS$ prove
t/POD-coverage.t ..... ok
t/POD.t .............. ok
t/Siebel-AssertOS.t .. ok
All tests successful.
Files=3, Tests=3, 0 wallclock secs ( 0.03 usr 0.00 sys + 0.09 cusr 0.01 csys = 0.13 CPU)
Result: PASS

jackal@yggdrasil:~/Projetos/Siebel-AssertOS$ prove -v
t/POD-coverage.t .....
1..1
ok 1 - Siebel::AssertOS is covered
ok
t/POD.t ..............
1..1
ok 1 - POD test for blib/lib/Siebel/AssertOS.pm
ok
t/Siebel-AssertOS.t ..
1..1
ok 1 - use Siebel::AssertOS;
ok
All tests successful.
Files=3, Tests=3, 1 wallclock secs ( 0.02 usr 0.01 sys + 0.08 cusr 0.02 csys = 0.13 CPU)
Result: PASS

jackal@yggdrasil:~/Projetos/Siebel-AssertOS$ make test
cp lib/Siebel/AssertOS.pm blib/lib/Siebel/AssertOS.pm
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/POD-coverage.t ..... ok
t/POD.t .............. ok
t/Siebel-AssertOS.t .. 1/1
#   Failed test 'use Siebel::AssertOS;'
#   at t/Siebel-AssertOS.t line 5.
#     Tried to use 'Siebel::AssertOS'.
# Error: OS/distribution unsupported: linux ubuntu at /home/jackal/Projetos/Siebel-AssertOS/blib/lib/Siebel/AssertOS.pm line 41.
# BEGIN failed--compilation aborted at (eval 4) line 2.
# Looks like you failed 1 test of 1.
t/Siebel-AssertOS.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests

Test Summary Report
-------------------
t/Siebel-AssertOS.t (Wstat: 256 Tests: 1 Failed: 1)
  Failed test:  1
  Non-zero exit status: 1
Files=3, Tests=3, 0 wallclock secs ( 0.02 usr 0.01 sys + 0.10 cusr 0.02 csys = 0.15 CPU)
Result: FAIL
Failed 1/3 test programs. 1/3 subtests failed.
make: ** [test_dynamic] Erro 1
jackal@yggdrasil:~/Projetos/Siebel-AssertOS$

Maybe I'm testing it incorrectly?

This is the currently (and only) test:

use Test::More tests => 1;
BEGIN { use_ok('Siebel::AssertOS') };

Regards,
Alceu

Em 18-04-2013 13:07, David Cantrell escreveu:
On Thu, Apr 18, 2013 at 09:14:46AM -0300, Alceu Rodrigues de Freitas Junior 
wrote:

For that, I release a distribution that would to just like
Devel::CheckOS ...

This is the list of operational systems that would be supported (sub
from Siebel::AssertOS):

sub os_is {

     my $os = shift;

     given ($os) {

         when ('linux')   { return 1 }
         when ('MSWin32') { return 1 }
         when ('aix')     { return 1 }
         when ('solaris') { return 1 }
         when ('hpux')    { return 1 }
         default          { return 0 }
     }
}

I would have written Siebel::AssertOS thus:

   package Devel::AssertOS::OSFeatures::SupportsSiebel;
   use Devel::CheckOS;

   sub matches { return qw(Linux AIX Solaris HPUX MSWin32); }
   sub os_is { Devel::CheckOS::os_is(matches()); }
   Devel::CheckOS::die_unsupported() unless(os_is());

   sub expn { "The operating system can run Siebel CRM" }


Reply via email to