@@ -790,7 +790,10 @@ sub run_cc_test {
790790 ($fnbackend ,$opt ) = $fnbackend =~ / ^(cc?)(,-o.)?/ ;
791791 $opt =~ s / ,-/ _/ if $opt ;
792792 $opt = ' ' unless $opt ;
793- # if ($] > 5.021006 and $fnbackend eq 'cc') { print "ok $cnt # skip CC for 5.22 WIP\n"; return 1; }
793+ # if ($] > 5.023007 and $fnbackend eq 'cc' and !$Config{usecperl}) {
794+ # print "ok $cnt # skip CC for 5.24\n";
795+ # return 1;
796+ # }
794797 use Config;
795798 require B::C::Config;
796799 # note that the smokers run the c.t and c_o3.t tests in parallel, with possible
@@ -920,8 +923,8 @@ sub run_cc_test {
920923 return 1;
921924 }
922925 }
923- if ($todo and $todo =~ / TODO/ ) {
924- $todo =~ s / TODO // ;
926+ if ($todo and $todo =~ / TODO / ) {
927+ $todo =~ s / TODO // g ;
925928 TODO:
926929 {
927930 local $TODO = $todo ;
@@ -939,16 +942,21 @@ sub run_cc_test {
939942 ($result ,$out ,$stderr ) = run_cmd($exe , 5);
940943 if (defined ($out ) and !$result ) {
941944 if ($out =~ / ^$expect $ / ) {
942- ok(1, $todo eq ' #' ? " " : " $todo " );
945+ if ($todo eq ' #' ) {
946+ ok(1);
947+ } else {
948+ ok(1, $todo );
949+ }
943950 unlink ($test , $cfile , $exe , @obj ) unless $keep_c ;
944951 return 1;
945952 } else {
946953 # cc test failed, double check uncompiled
947- $got = run_perl(verbose => $ENV {TEST_VERBOSE }, # for debugging
948- nolib => $ENV {PERL_CORE } ? 0 : 1, # include ../lib only in CORE
949- stderr => 1, # to capture the "ccode.pl syntax ok"
950- timeout => 10,
951- progfile => $test );
954+ $got = run_perl
955+ (verbose => $ENV {TEST_VERBOSE }, # for debugging
956+ nolib => $ENV {PERL_CORE } ? 0 : 1, # include ../lib only in CORE
957+ stderr => 1, # to capture the "ccode.pl syntax ok"
958+ timeout => 10,
959+ progfile => $test );
952960 if (! $? and $got =~ / ^$expect $ / ) {
953961 ok(1, " $todo wanted: \" $expect \" , got: \" $out \" " );
954962 } else {
@@ -963,11 +971,11 @@ sub run_cc_test {
963971 }
964972 }
965973 if ($todo and $todo =~ / TODO/ ) {
966- $todo =~ s / TODO // ;
974+ $todo =~ s /# TODO// g ;
967975 TODO:
968976 {
969- local $TODO = $todo ;
970- ok(0, " $todo wanted: \" $expect \" , \$\? = $? , got: \" $out \" " );
977+ local $TODO = $todo ? $todo : $] ;
978+ ok(0, " wanted: \" $expect \" , \$\? = $? , got: \" $out \" " );
971979 }
972980 } else {
973981 ok(0, " wanted: \" $expect \" , \$\? = $? , got: \" $out \" " );
@@ -1149,7 +1157,7 @@ sub plctest {
11491157 chomp $out ;
11501158 my $ok = $out =~ / $expected / ;
11511159 if ($todo and $todo =~ / TODO/ ) {
1152- $todo =~ s / TODO // ;
1160+ $todo =~ s / TODO // g ;
11531161 TODO: {
11541162 local $TODO = $todo ;
11551163 ok($ok );
@@ -1172,7 +1180,11 @@ sub ctest {
11721180 my ($num , $expected , $backend , $base , $script , $todo ) = @_ ;
11731181 my $name = $base ." _$num " ;
11741182 my $b = $backend ; # protect against parallel test name clashes
1175- # if ($] > 5.021006 and $backend =~ /^CC/i) { ok(1, "skip CC for 5.22 WIP"); return 1; } # temp 5.22
1183+ my $CPERL = $Config {usecperl };
1184+ # if ($] > 5.021006 and $backend =~ /^CC/i) { ok(1, "skip CC for 5.22 WIP"); return 1; }
1185+ # if ($] >= 5.025 and !$CPERL and $todo !~ /TODO /) {
1186+ # $todo .= 'TODO - no 5.26 yet';
1187+ # }
11761188 $b =~ s / -(D.*|f.*|v),// g ;
11771189 $b =~ s / -/ _/ g ;
11781190 $b =~ s / [, ]// g ;
@@ -1212,7 +1224,7 @@ sub ctest {
12121224 ok(1, " skip MSVC" ); return 1;
12131225 }
12141226 if ($todo and $todo =~ / TODO/ ) {
1215- $todo =~ s / TODO // ;
1227+ $todo =~ s / TODO // g ;
12161228 TODO: {
12171229 local $TODO = $todo ;
12181230 ok(undef , " failed to compile" );
@@ -1237,7 +1249,7 @@ sub ctest {
12371249 }
12381250 }
12391251 if ($todo and $todo =~ / TODO/ ) {
1240- $todo =~ s / TODO // ;
1252+ $todo =~ s / TODO // g ;
12411253 TODO: {
12421254 local $TODO = $todo ;
12431255 ok ($out =~ / $expected / );
@@ -1248,7 +1260,7 @@ sub ctest {
12481260 }
12491261 } else {
12501262 if ($todo and $todo =~ / TODO/ ) {
1251- $todo =~ s / TODO // ;
1263+ $todo =~ s / TODO // g ;
12521264 TODO: {
12531265 local $TODO = $todo ;
12541266 ok (undef );
@@ -1291,7 +1303,7 @@ sub ccompileok {
12911303 my $ok = -e $name or -e " $name .exe" ;
12921304 if ($todo and $todo =~ / TODO/ ) {
12931305 TODO: {
1294- $todo =~ s / TODO // ;
1306+ $todo =~ s / TODO // g ;
12951307 local $TODO = $todo ;
12961308 ok($ok );
12971309 }
@@ -1308,6 +1320,7 @@ sub todo_tests_default {
13081320 my $what = shift ;
13091321 my $DEBUGGING = ($Config {ccflags } =~ m / -DDEBUGGING/ );
13101322 my $ITHREADS = ($Config {useithreads });
1323+ my $CPERL = ($Config {usecperl });
13111324
13121325 my @todo = ();
13131326 # no IO::Scalar
@@ -1317,6 +1330,7 @@ sub todo_tests_default {
13171330 push @todo , 28 if $] > 5.023 and
13181331 ($Config {cc } =~ / -m32/ or $Config {ccflags } =~ / -m32/ );
13191332 push @todo , (21, 38) if $^O eq ' cygwin' ; # hangs
1333+ push @todo , (15,27,41..45) if $] >= 5.025 and !$CPERL ;
13201334
13211335 if ($what =~ / ^c(|_o[1-4])$ / ) {
13221336 # a regression
@@ -1326,6 +1340,7 @@ sub todo_tests_default {
13261340 # push @todo, (48) if $] >= 5.018; # opfree
13271341 push @todo , (48) if $what eq ' c_o4' and $] < 5.021 and $ITHREADS ;
13281342 push @todo , (8,18,19,25,26,28) if $what eq ' c_o4' and !$ITHREADS ;
1343+ # push @todo, (10) if $what eq 'c_o4' and $] > 5.023;
13291344 push @todo , (29) if $] >= 5.021006 and $ITHREADS ;
13301345 push @todo , (10,15,27,41,42,43,44,45,49,50)
13311346 if $] >= 5.021006 and $what eq ' c_o4' ;
@@ -1351,10 +1366,11 @@ sub todo_tests_default {
13511366 # push @todo, (27) if $] > 5.008008 and $] < 5.009 and $what eq 'cc_o2';
13521367 push @todo , (103) if ($] >= 5.012 and $] < 5.014 and !$ITHREADS );
13531368 push @todo , (12,19) if $] >= 5.019; # XXX had 25 also
1354- push @todo , (25) if $] >= 5.021006 and !$Config { usecperl } ;
1369+ push @todo , (25) if $] >= 5.021006 and !$CPERL ;
13551370 push @todo , (29) if $] >= 5.021006 and $what eq ' cc_o1' ;
13561371 push @todo , (24,29) if $] >= 5.021006 and $what eq ' cc_o2' ;
1357- push @todo , (103) if ($Config {usecperl } and $ITHREADS );
1372+ push @todo , (103) if $CPERL and $ITHREADS ;
1373+ push @todo , (9,10,15,24,26,27,41..45,103) if $] > 5.023007 and !$CPERL ;
13581374 }
13591375 push @todo , (48) if $] > 5.007 and $] < 5.009 and $^O =~ / MSWin32|cygwin/i ;
13601376 return @todo ;
0 commit comments