Basic gitlab-ci.yml for Perl module fails

112 views
Skip to first unread message

Loris Bennett

unread,
Mar 19, 2018, 12:07:46 PM3/19/18
to GitLab
Hi,

I'm new to CI with Gitlab and have just created a basic Perl module and can run prove in the following way:
  
$ prove -l t
t
/00-load.t ....... 1/? # Testing Foo::Bar 0.01, Perl 5.024001, /usr/bin/perl
t
/00-load.t ....... ok  
t
/manifest.t ...... skipped: Author tests not required for installation
t
/pod-coverage.t .. skipped: Author tests not required for installation
t
/pod.t ........... skipped: Author tests not required for installation
All tests successful.
Files=4, Tests=1,  0 wallclock secs ( 0.02 usr  0.01 sys +  0.05 cusr  0.00 csys =  0.08 CPU)
Result: PASS


I have written a .gitlab-ci.yml file with the following contents:

stages:
 
- test

job
1:
  stage
: test
  script
: prove -l t
  tags
:
   
- perl


but I get the error

        TAP::Object::_construct(TAP::Harness=HASH(0x5608cb0c3e98), "TAP::Parser", HASH(0x5608cb64f990)) called at /usr/share/perl/5.24/TAP/Harness.pm line 852
        TAP::Harness::make_parser(TAP::Harness=HASH(0x5608cb0c3e98), TAP::Parser::Scheduler::Job=HASH(0x5608cb80a480)) called at /usr/share/perl/5.24/TAP/Harness.pm line 651
        TAP
::Harness::_aggregate_single(TAP::Harness=HASH(0x5608cb0c3e98), TAP::Parser::Aggregator=HASH(0x5608cb6171e0), TAP::Parser::Scheduler=HASH(0x5608cb80a420)) called at /usr/share/perl/5.24/TAP/Harness.pm line 743
        TAP
::Harness::aggregate_tests(TAP::Harness=HASH(0x5608cb0c3e98), TAP::Parser::Aggregator=HASH(0x5608cb6171e0), "t") called at /usr/share/perl/5.24/TAP/Harness.pm line 558
        TAP
::Harness::__ANON__() called at /usr/share/perl/5.24/TAP/Harness.pm line 571
        TAP
::Harness::runtests(TAP::Harness=HASH(0x5608cb0c3e98), "t") called at /usr/share/perl/5.24/App/Prove.pm line 546
       
App::Prove::_runtests(App::Prove=HASH(0x5608cb0b7d48), HASH(0x5608cb526548), "t") called at /usr/share/perl/5.24/App/Prove.pm line 504
       
App::Prove::run(App::Prove=HASH(0x5608cb0b7d48)) called at /usr/bin/prove line 13
ERROR: Job failed: exit status 1

Can any one give me a pointer as to what might be wrong?

Cheers

Loris

Loris Bennett

unread,
Mar 20, 2018, 8:44:02 AM3/20/18
to GitLab
The problem is that the test is being carried out in the wrong directory.  I added a 'cd' to the script part of the job and everything now works fine.
Reply all
Reply to author
Forward
0 new messages