Skip crc32 test if 'cksum' is not present for comparison (e.g. SkyOS)
This commit is contained in:
parent
736a761bff
commit
0d21e71407
|
@ -28,39 +28,46 @@ sub initialize() {
|
|||
#
|
||||
sub run() {
|
||||
|
||||
my $twpassed = 1;
|
||||
my $twpassed = 1;
|
||||
|
||||
twtools::logStatus("*** Beginning $description\n");
|
||||
printf("%-30s", "-- $description");
|
||||
twtools::logStatus("*** Beginning $description\n");
|
||||
printf("%-30s", "-- $description");
|
||||
|
||||
# lets see if the system 'cksum' agree's with siggen's crc32 value
|
||||
#
|
||||
my ($crc32, undef) = split(/ /, `cksum $twtools::twrootdir/test`);
|
||||
my $siggen = `$twtools::twrootdir/bin/siggen -h -t -C $twtools::twrootdir/test`;
|
||||
# lets see if the system 'cksum' agree's with siggen's crc32 value
|
||||
#
|
||||
my ($crc32, undef) = split(/ /, `cksum $twtools::twrootdir/test`);
|
||||
|
||||
chomp $crc32;
|
||||
chomp $siggen;
|
||||
if ($crc32 eq "") {
|
||||
++$twtools::twskippedtests;
|
||||
print "SKIPPED\n";
|
||||
return;
|
||||
}
|
||||
|
||||
# cksum issues results in decimal, so get siggen's result in base10.
|
||||
$siggen = hex($siggen);
|
||||
my $siggen = `$twtools::twrootdir/bin/siggen -h -t -C $twtools::twrootdir/test`;
|
||||
|
||||
twtools::logStatus(" cksum reports: $crc32\n");
|
||||
twtools::logStatus("siggen reports: $siggen\n");
|
||||
chomp $crc32;
|
||||
chomp $siggen;
|
||||
|
||||
$twpassed = ($crc32 eq $siggen);
|
||||
# cksum issues results in decimal, so get siggen's result in base10.
|
||||
$siggen = hex($siggen);
|
||||
|
||||
#########################################################
|
||||
#
|
||||
# See if the tests all succeeded...
|
||||
#
|
||||
if ($twpassed) {
|
||||
twtools::logStatus(" cksum reports: $crc32\n");
|
||||
twtools::logStatus("siggen reports: $siggen\n");
|
||||
|
||||
$twpassed = ($crc32 eq $siggen);
|
||||
|
||||
#########################################################
|
||||
#
|
||||
# See if the tests all succeeded...
|
||||
#
|
||||
if ($twpassed) {
|
||||
print "PASSED\n";
|
||||
++$twtools::twpassedtests;
|
||||
}
|
||||
else {
|
||||
}
|
||||
else {
|
||||
++$twtools::twfailedtests;
|
||||
print "*FAILED*\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue