@@ -790,7 +790,10 @@ sub run_cc_test {
790
790
($fnbackend ,$opt ) = $fnbackend =~ / ^(cc?)(,-o.)?/ ;
791
791
$opt =~ s / ,-/ _/ if $opt ;
792
792
$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
+ # }
794
797
use Config;
795
798
require B::C::Config;
796
799
# 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 {
920
923
return 1;
921
924
}
922
925
}
923
- if ($todo and $todo =~ / TODO/ ) {
924
- $todo =~ s / TODO // ;
926
+ if ($todo and $todo =~ / TODO / ) {
927
+ $todo =~ s / TODO // g ;
925
928
TODO:
926
929
{
927
930
local $TODO = $todo ;
@@ -939,16 +942,21 @@ sub run_cc_test {
939
942
($result ,$out ,$stderr ) = run_cmd($exe , 5);
940
943
if (defined ($out ) and !$result ) {
941
944
if ($out =~ / ^$expect $ / ) {
942
- ok(1, $todo eq ' #' ? " " : " $todo " );
945
+ if ($todo eq ' #' ) {
946
+ ok(1);
947
+ } else {
948
+ ok(1, $todo );
949
+ }
943
950
unlink ($test , $cfile , $exe , @obj ) unless $keep_c ;
944
951
return 1;
945
952
} else {
946
953
# 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 );
952
960
if (! $? and $got =~ / ^$expect $ / ) {
953
961
ok(1, " $todo wanted: \" $expect \" , got: \" $out \" " );
954
962
} else {
@@ -963,11 +971,11 @@ sub run_cc_test {
963
971
}
964
972
}
965
973
if ($todo and $todo =~ / TODO/ ) {
966
- $todo =~ s / TODO // ;
974
+ $todo =~ s /# TODO// g ;
967
975
TODO:
968
976
{
969
- local $TODO = $todo ;
970
- ok(0, " $todo wanted: \" $expect \" , \$\? = $? , got: \" $out \" " );
977
+ local $TODO = $todo ? $todo : $] ;
978
+ ok(0, " wanted: \" $expect \" , \$\? = $? , got: \" $out \" " );
971
979
}
972
980
} else {
973
981
ok(0, " wanted: \" $expect \" , \$\? = $? , got: \" $out \" " );
@@ -1149,7 +1157,7 @@ sub plctest {
1149
1157
chomp $out ;
1150
1158
my $ok = $out =~ / $expected / ;
1151
1159
if ($todo and $todo =~ / TODO/ ) {
1152
- $todo =~ s / TODO // ;
1160
+ $todo =~ s / TODO // g ;
1153
1161
TODO: {
1154
1162
local $TODO = $todo ;
1155
1163
ok($ok );
@@ -1172,7 +1180,11 @@ sub ctest {
1172
1180
my ($num , $expected , $backend , $base , $script , $todo ) = @_ ;
1173
1181
my $name = $base ." _$num " ;
1174
1182
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
+ # }
1176
1188
$b =~ s / -(D.*|f.*|v),// g ;
1177
1189
$b =~ s / -/ _/ g ;
1178
1190
$b =~ s / [, ]// g ;
@@ -1212,7 +1224,7 @@ sub ctest {
1212
1224
ok(1, " skip MSVC" ); return 1;
1213
1225
}
1214
1226
if ($todo and $todo =~ / TODO/ ) {
1215
- $todo =~ s / TODO // ;
1227
+ $todo =~ s / TODO // g ;
1216
1228
TODO: {
1217
1229
local $TODO = $todo ;
1218
1230
ok(undef , " failed to compile" );
@@ -1237,7 +1249,7 @@ sub ctest {
1237
1249
}
1238
1250
}
1239
1251
if ($todo and $todo =~ / TODO/ ) {
1240
- $todo =~ s / TODO // ;
1252
+ $todo =~ s / TODO // g ;
1241
1253
TODO: {
1242
1254
local $TODO = $todo ;
1243
1255
ok ($out =~ / $expected / );
@@ -1248,7 +1260,7 @@ sub ctest {
1248
1260
}
1249
1261
} else {
1250
1262
if ($todo and $todo =~ / TODO/ ) {
1251
- $todo =~ s / TODO // ;
1263
+ $todo =~ s / TODO // g ;
1252
1264
TODO: {
1253
1265
local $TODO = $todo ;
1254
1266
ok (undef );
@@ -1291,7 +1303,7 @@ sub ccompileok {
1291
1303
my $ok = -e $name or -e " $name .exe" ;
1292
1304
if ($todo and $todo =~ / TODO/ ) {
1293
1305
TODO: {
1294
- $todo =~ s / TODO // ;
1306
+ $todo =~ s / TODO // g ;
1295
1307
local $TODO = $todo ;
1296
1308
ok($ok );
1297
1309
}
@@ -1308,6 +1320,7 @@ sub todo_tests_default {
1308
1320
my $what = shift ;
1309
1321
my $DEBUGGING = ($Config {ccflags } =~ m / -DDEBUGGING/ );
1310
1322
my $ITHREADS = ($Config {useithreads });
1323
+ my $CPERL = ($Config {usecperl });
1311
1324
1312
1325
my @todo = ();
1313
1326
# no IO::Scalar
@@ -1317,6 +1330,7 @@ sub todo_tests_default {
1317
1330
push @todo , 28 if $] > 5.023 and
1318
1331
($Config {cc } =~ / -m32/ or $Config {ccflags } =~ / -m32/ );
1319
1332
push @todo , (21, 38) if $^O eq ' cygwin' ; # hangs
1333
+ push @todo , (15,27,41..45) if $] >= 5.025 and !$CPERL ;
1320
1334
1321
1335
if ($what =~ / ^c(|_o[1-4])$ / ) {
1322
1336
# a regression
@@ -1326,6 +1340,7 @@ sub todo_tests_default {
1326
1340
# push @todo, (48) if $] >= 5.018; # opfree
1327
1341
push @todo , (48) if $what eq ' c_o4' and $] < 5.021 and $ITHREADS ;
1328
1342
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;
1329
1344
push @todo , (29) if $] >= 5.021006 and $ITHREADS ;
1330
1345
push @todo , (10,15,27,41,42,43,44,45,49,50)
1331
1346
if $] >= 5.021006 and $what eq ' c_o4' ;
@@ -1351,10 +1366,11 @@ sub todo_tests_default {
1351
1366
# push @todo, (27) if $] > 5.008008 and $] < 5.009 and $what eq 'cc_o2';
1352
1367
push @todo , (103) if ($] >= 5.012 and $] < 5.014 and !$ITHREADS );
1353
1368
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 ;
1355
1370
push @todo , (29) if $] >= 5.021006 and $what eq ' cc_o1' ;
1356
1371
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 ;
1358
1374
}
1359
1375
push @todo , (48) if $] > 5.007 and $] < 5.009 and $^O =~ / MSWin32|cygwin/i ;
1360
1376
return @todo ;
0 commit comments