test-nginx doesn't work

Posted by bigplum (Guest)
on 2012-01-13 10:52
(Received via mailing list)
I've put test-nginx into a test directory,  but it shows can't locate
socket.pm. Do I need to install TEST::NGINX into perl lib directory?

# ll test
总用量 60
drwxr-xr-x 5 root  root  4096 2012-01-01 08:00 ./
drwxr-xr-x 5 simon simon 4096 2012-01-13 17:31 ../
-rw-r--r-- 1 root  root  8018 2012-01-01 08:00 Changes
-rw-r--r-- 1 root  root   298 2012-01-01 08:00 .gitignore
drwxr-xr-x 4 root  root  4096 2012-01-01 08:00 inc/
drwxr-xr-x 3 root  root  4096 2012-01-01 08:00 lib/
-rw-r--r-- 1 root  root   758 2012-01-01 08:00 Makefile.PL
-rw-r--r-- 1 root  root   749 2012-01-01 08:00 MANIFEST
-rw-r--r-- 1 root  root   303 2012-01-01 08:00 MANIFEST.SKIP
-rw-r--r-- 1 root  root   867 2012-01-01 08:00 META.yml
-rw-r--r-- 1 root  root  9851 2012-01-01 08:00 README
drwxr-xr-x 2 root  root  4096 2012-01-01 08:00 t/


# prove -r t/apply_moves.t
t/apply_moves.t .. Can't locate Test/Nginx/Socket.pm in @INC (@INC
contains: /etc/perl /usr/local/lib/perl/5.10.1
/usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5
/usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at
t/apply_moves.t line 2.
BEGIN failed--compilation aborted at t/apply_moves.t line 2.
t/apply_moves.t .. Dubious, test returned 2 (wstat 512, 0x200)
No subtests run

Test Summary Report
-------------------
t/apply_moves.t (Wstat: 512 Tests: 0 Failed: 0)
  Non-zero exit status: 2
  Parse errors: No plan found in TAP output
Files=1, Tests=0,  0 wallclock secs ( 0.02 usr +  0.01 sys =  0.03 CPU)
Result: FAIL

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?2,221154,221154#msg-221154
Posted by Piotr Sikora (Guest)
on 2012-01-13 10:58
(Received via mailing list)
Hi,

> # prove -r t/apply_moves.t

prove -I lib -r t

Best regards,
Piotr Sikora < piotr.sikora@frickle.com >
Posted by agentzh (Guest)
on 2012-01-13 11:57
(Received via mailing list)
On Fri, Jan 13, 2012 at 5:52 PM, bigplum <nginx-forum@nginx.us> wrote:
> I've put test-nginx into a test directory, but it shows can't locate
> socket.pm. Do I need to install TEST::NGINX into perl lib directory?
>

You need to

1. install Test::Nginx into your perl installation by running the
following commands on shell:

    perl Makefile.PL
    make
    make install

In case that you have multiple perl installations in your system,
please ensure that you're using the right perl.

2. specify the location of Test::Nginx's lib/ directory in your
"prove" command line (just as Piotr Sikora has pointed out), that is

    prove -I/path/to/Test-Nginx/lib -r t

Regards,
-agentzh
Posted by bigplum (Guest)
on 2012-01-17 04:45
(Received via mailing list)
It's OK now by refering to agentzh's steps. thanks all.

Additionally, maybe it's useful to set ftp mode before running "make":

export BM_UPLOAD_FTP_PASSIVE="true"

otherwise this error would occur:

*** Installing dependencies...
Can't use an undefined value as a symbol reference at
/usr/share/perl/5.10/Net/FTP/dataconn.pm line 54.
Compilation failed in require at inc/Module/Install/AutoInstall.pm line
37.

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?2,221154,221340#msg-221340
::...
免责声明:
当前网页内容, 由 大妈 ZoomQuiet 使用工具: ScrapBook :: Firefox Extension 人工从互联网中收集并分享;
内容版权归原作者所有;
本人对内容的有效性/合法性不承担任何强制性责任.
若有不妥, 欢迎评注提醒:

或是邮件反馈可也:
askdama[AT]googlegroups.com


订阅 substack 体验古早写作:


点击注册~> 获得 100$ 体验券: DigitalOcean Referral Badge

关注公众号, 持续获得相关各种嗯哼:
zoomquiet


自怼圈/年度番新

DU22.4
关于 ~ DebugUself with DAMA ;-)
粤ICP备18025058号-1
公安备案号: 44049002000656 ...::