Skip to Content.
Sympa Menu

devel - Re: [sympa-developpers] [sympa-commits] sympa[10828] trunk/t/Language.t: [dev] no need to re-add standard @INC, but relative path for src/lib helps executing the tests manually

Subject: Developers of Sympa

List archive

Chronological Thread  
  • From: IKEDA Soji <address@concealed>
  • To: address@concealed
  • Subject: Re: [sympa-developpers] [sympa-commits] sympa[10828] trunk/t/Language.t: [dev] no need to re-add standard @INC, but relative path for src/lib helps executing the tests manually
  • Date: Fri, 6 Jun 2014 16:10:26 +0900

Hi, please tell me...

On Wed, 4 Jun 2014 17:28:26 +0200 (CEST)
address@concealed wrote:

> sympa[10828] trunk/t/Language.t: [dev] no need to re-add standard @INC, but
> relative path for src/lib helps executing the tests manually
> Revision 10828 Author rousse Date 2014-06-04 17:28:25 +0200 (mer. 04 juin
> 2014)
> Log Message[dev] no need to re-add standard @INC, but relative path for
> src/lib helps executing the tests manually
> Modified Paths
> trunk/t/Language.t
> Diff
> Modified: trunk/t/Language.t (10827 => 10828)
> --- trunk/t/Language.t 2014-06-04 13:14:25 UTC (rev 10827)
> +++ trunk/t/Language.t 2014-06-04 15:28:25 UTC (rev 10828)
> @@ -9,9 +9,12 @@
>
> use strict;
> use warnings;
> +
> +use FindBin qw($Bin);
> +use lib 't/stub', "$Bin/../src/lib";
> +
> use Test::More;
>
> -use lib 't/stub', @INC;
> use Sympa::Language;
>
> # Lang 2 gettext locale

@INC was unneccessary. However, I have two questions:

- Is arrangement by FindBin required?

Is it possible that "make check" invokes test scripts from the
other location than the top of source? If it is not, lib list
can simply contain "src/lib".

- May each test script be executable? I mean that its executable
bit is on and it has sh-bang line.

Sh-bang line fixes path of Perl interpreter. Developer may wish
to test with other Perl executables. I guess the script
itself should not have sh-bang and may not be executable.


Additionally, if "make check" gives default module search path
using PERL5LIB enviroment variable, lib list also need not contain
"src/lib".

# n.b. environment variable seems better than -I option,
# because it will propagate to child processes (see LockedFile.t).


Regards,

--- Soji

--
株式会社 コンバージョン セキュリティ&OSSソリューション部 池田荘児
〒231-0004 神奈川県横浜市中区元浜町3-21-2 ヘリオス関内ビル7F
e-mail address@concealed TEL 045-640-3550
http://www.conversion.co.jp/



Archive powered by MHonArc 2.6.19+.

Top of Page