lestrrat-p5 / ZMQ

libzmq Perl binding
46 stars 31 forks source link

Change test call to POSIX::setlocale to 'C', due to 'en_GB.UTF-8' could not be installed in some systems. #49

Closed alambike closed 9 years ago

alambike commented 10 years ago

Tests with locale messages are causing installation fail when locale 'en_GB.UTF-8' is not installed in system.

For example in my Ubuntu 12.04 system with only es_ES.UTF-8 locale:

PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/*.t
# 
#    This is ZMQ::LibZMQ3.pm version 1.15
#    Linked against zmq 3.2.4
t/000_compile.t ... ok
t/001_context.t ... ok
t/002_socket.t .... ok
t/003_message.t ... ok
t/004_version.t ... ok
t/005_poll.t ...... ok
t/006_anyevent.t .. ok

    #   Failed test 'Error is Connection refused'
    #   at t/100_basic.t line 27.
    #                   'Conexión rehusada'
    #     doesn't match '(?^:Connection refused)'
    # Looks like you failed 1 test of 2.

#   Failed test 'connect before server socket is bound (should fail)'
#   at t/100_basic.t line 30.

    #   Failed test 'Error is as expected'
    #   at t/100_basic.t line 102.
    #                   'Argumento inválido'
    #     doesn't match '(?^:Invalid argument)'
    # Looks like you failed 1 test of 2.

#   Failed test 'invalid bind'
#   at t/100_basic.t line 104.
# Looks like you failed 2 tests of 3.
t/100_basic.t ..... 
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/3 subtests 
t/101_threads.t ... ok
t/104_ipc.t ....... ok
t/200_fork.t ...... ok
t/201_thread.t .... ok
t/202_proxy.t ..... skipped: Test requires module 'Proc::Guard' but it's not found
t/rt64944.t ....... ok
t/rt74653.t ....... skipped: Test requires module 'Proc::Guard' but it's not found

Test Summary Report
-------------------
t/100_basic.t   (Wstat: 512 Tests: 3 Failed: 2)
  Failed tests:  1, 3
  Non-zero exit status: 2
Files=15, Tests=70,  8 wallclock secs ( 0.06 usr  0.03 sys +  0.76 cusr  0.18 csys =  1.03 CPU)
Result: FAIL
Failed 1/15 test programs. 2/70 subtests failed.
make: *** [test_dynamic] Error 255
-> FAIL Installing ZMQ::LibZMQ3 failed. See /root/.cpanm/work/1391693288.19333/build.log for details. Retry with --force to force install it.
mjg17 commented 10 years ago

These two commits have now been merged via https://github.com/lestrrat/p5-ZMQ/pull/51

eserte commented 10 years ago

Was this change already released? I still see test failures with non-English locales, e.g. here http://www.cpantesters.org/cpan/report/28c6009a-df57-11e3-9062-88f66dfca90a and here http://www.cpantesters.org/cpan/report/ecfa8d1e-ddf4-11e3-8137-aba9e0bfc7aa

lestrrat commented 10 years ago

I see 1636e0eae843f9ad17df072265f5b76a30417690 in the logs, and yes, this has been shipped.

eserte commented 10 years ago

It's not yet shipped for ZMQ::LibZMQ2.

lestrrat commented 10 years ago

Ah, LibZMQ2...

lestrrat commented 10 years ago

done

eserte commented 10 years ago

Looks good.