patjoly / geo-tcx

Perl module to edit and extract information from Garmin TCX files
3 stars 1 forks source link

test fails in cloned repository #2

Closed szabgab closed 1 year ago

szabgab commented 1 year ago

After removing the Makefile.PL (as per #1) I managed to install all the dependencies, but then I got this error:

$ dzil test
[DZ] building distribution under .build/1zo6gQMAHa for installation
[DZ] beginning to build Geo-TCX
[DZ] guessing dist's main_module is lib/Geo/TCX.pm
[VersionFromModule] dist version 1.01 (from lib/Geo/TCX.pm)
[DZ] writing Geo-TCX in .build/1zo6gQMAHa
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Geo::TCX
Writing MYMETA.yml and MYMETA.json
cp lib/Geo/TCX/Track.pm blib/lib/Geo/TCX/Track.pm
cp lib/Geo/TCX/Trackpoint.pm blib/lib/Geo/TCX/Trackpoint.pm
cp lib/Geo/TCX.pm blib/lib/Geo/TCX.pm
cp lib/Geo/TCX/Lap.pm blib/lib/Geo/TCX/Lap.pm
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00_load.t ........ 1/2 # Testing Geo::TCX 1.01
t/00_load.t ........ ok   
t/01_main.t ........ 1/72 Uncaught exception from user code:
    /home/gabor/Data/Garmin/ not a valid directory at t/01_main.t line 75.
    Geo::TCX::set_wd(Geo::TCX=HASH(0x55bb2977a578), "~/Data/Garmin") called at /home/gabor/os/geo-tcx/.build/1zo6gQMAHa/blib/lib/Geo/TCX.pm line 164
    Geo::TCX::new("Geo::TCX", "t/2014-08-11-10-25-15.tcx", "work_dir", "~/Data/Garmin") called at t/01_main.t line 75
# Looks like your test exited with 2 just after 19.
t/01_main.t ........ Dubious, test returned 2 (wstat 512, 0x200)
Failed 53/72 subtests 
t/02_lap.t ......... ok     
t/02_track.t ....... ok     
t/02_trackpoint.t .. 1/31 
#   Failed test '   time_add()'
#   at t/02_trackpoint.t line 76.
#          got: 'Mon Aug 11 13:26:11 2014'
#     expected: 'Mon Aug 11 06:26:11 2014'

#   Failed test '   test time_subtract()'
#   at t/02_trackpoint.t line 90.
#          got: 'Sat Aug  9 09:26:06 2014'
#     expected: 'Sat Aug  9 02:26:06 2014'
# Looks like you failed 2 tests of 31.
t/02_trackpoint.t .. Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/31 subtests 
t/03_courses.t ..... ok   

Test Summary Report
-------------------
t/01_main.t      (Wstat: 512 Tests: 19 Failed: 0)
  Non-zero exit status: 2
  Parse errors: Bad plan.  You planned 72 tests but ran 19.
t/02_trackpoint.t (Wstat: 512 Tests: 31 Failed: 2)
  Failed tests:  23, 25
  Non-zero exit status: 2
Files=6, Tests=158,  7 wallclock secs ( 0.03 usr  0.01 sys +  6.38 cusr  0.33 csys =  6.75 CPU)
Result: FAIL
Failed 2/6 test programs. 2/158 subtests failed.
make: *** [Makefile:841: test_dynamic] Error 255
error running make test
patjoly commented 1 year ago

Both of these fails are now fixed in version 1.01 in the repo and on CPAN.

In de-personalizing my repo to get it ready for public consumption I missed a few folders for which I was checking for path validity. All gone now, the tests do not reach anywhere outside the project folder.