#2118: t/src/checkdepend.t fails when extra nci tthunks are disabled
----------------------+-----------------------------------------------------
 Reporter:  dukeleto  |       Owner:  plobsing
     Type:  bug       |      Status:  new     
 Priority:  normal    |   Milestone:          
Component:  testing   |     Version:  3.4.0   
 Severity:  medium    |    Keywords:          
     Lang:            |       Patch:  new     
 Platform:  all       |  
----------------------+-----------------------------------------------------
Changes (by jkeenan):

  * patch:  => new


Comment:

 I've been trying to understand the problem in this ticket, particularly
 since the question of what happens when you configure `--without-extra-
 nci-thunks` shows up in TT #1979, TT #2116, and TT #2024.

 I created this branch in the git repository:  ''tt2118/check_depend''.

 In that branch, I did some modest refactoring of ''t/src/checkdepend.t''
 to make it easier for me to study.  (This mostly entailed grouping all the
 subroutines together at the end of the file.)  I then ran `perl
 Configure.pl --without-extra-nci-thunks && make`.  This configuration
 causes the one test failure in ''t/src/checkdepend.t'':
 {{{
 not ok 84 - src/nci/extra_thunks.c (Makefile: line 1753).

 #   Failed test 'src/nci/extra_thunks.c (Makefile: line 1753).'
 #   at t/src/checkdepend.t line 303.
 #          got: 'src/nci/extra_thunks.str(1)
 # '
 #     expected: ''
 }}}
 After playing with this for several hours, I realized that we could get
 the test to pass with some rather kludgey code.  See attachment for
 complete diff; here's the essence:
 {{{
 +use lib qw( lib );
 +use Parrot::Config;

  =head1 NAME

 @@ -48,7 +49,7 @@ if (! -e 'Makefile') {
      exit;
  }

 -my @incfiles = [];
 +my @incfiles = ();
  find( { wanted => \&wanted, no_chdir => 1 },
        qw/src compilers include frontend/ );

 @@ -57,6 +58,8 @@ our %deps;
  foreach my $file (sort grep /\.[hc]$/, @incfiles) {
      # skip pmcs - we don't handle inheritance correctly
      next if $file =~ m{^src/(?:dyn)?pmc/};
 +    next if ($file eq 'src/nci/extra_thunks.c' and
 +        ! defined
 $Parrot::Config::PConfig_Temp{PARROT_HAS_EXTRA_NCI_THUNKS});
 }}}
 Would this suffice for this ticket?

 Thank you very much.

 kid51

-- 
Ticket URL: <https://trac.parrot.org/parrot/ticket/2118#comment:1>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets

Reply via email to