diff --git a/src/test-harness/tests/crc32.pm b/src/test-harness/tests/crc32.pm index b694b90..c4bf82d 100644 --- a/src/test-harness/tests/crc32.pm +++ b/src/test-harness/tests/crc32.pm @@ -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"; - } + } }