Couple more test-harness platform tweaks

This commit is contained in:
Brian Cox 2017-09-10 00:21:44 -07:00
parent 2a278ad29b
commit 15b7d18104
2 changed files with 29 additions and 22 deletions

View File

@ -105,12 +105,12 @@ EOT
# #
sub initialize() { sub initialize() {
my $twstr = getPolicyFileString(); my $twstr = getPolicyFileString();
twtools::GeneratePolicyFile($twstr); twtools::GeneratePolicyFile($twstr);
# this test requires a clean start of it's tree # this test requires a clean start of it's tree
# #
system("rm -rf $twtools::twrootdir/" . $TESTS{"0-createTempDir"}{dir}); system("rm -rf $twtools::twrootdir/" . $TESTS{"0-createTempDir"}{dir});
} }
@ -120,30 +120,37 @@ sub initialize() {
# #
sub run() { sub run() {
my $twpassed = 1; twtools::logStatus("*** Beginning $description\n");
printf("%-30s", "-- $description");
twtools::logStatus("*** Beginning $description\n"); if ($^O eq "skyos") {
printf("%-30s", "-- $description"); ++$twtools::twskippedtests;
print "SKIPPED; TODO: SkyOS has fewer expected changes here; refactor so we can test for correct values\n";
return;
}
######################################################### my $twpassed = 1;
#
# Run the tests describe above in the %TESTS structure.
#
$twpassed = twtools::RunIntegrityTests(%TESTS);
######################################################### #########################################################
# #
# See if the tests all succeeded... # Run the tests describe above in the %TESTS structure.
# #
if ($twpassed) { $twpassed = twtools::RunIntegrityTests(%TESTS);
#########################################################
#
# See if the tests all succeeded...
#
if ($twpassed) {
++$twtools::twpassedtests; ++$twtools::twpassedtests;
print "PASSED\n"; print "PASSED\n";
} }
else { else {
++$twtools::twfailedtests; ++$twtools::twfailedtests;
print "*FAILED*\n"; print "*FAILED*\n";
} }
} }

View File

@ -137,7 +137,7 @@ processCommandLine();
prepareListOfTests() if scalar(@twtests) == 0; # only if none were on the cmdline prepareListOfTests() if scalar(@twtests) == 0; # only if none were on the cmdline
print "\n"; print "\n";
print "initializing for tests on $^O\n\n"; print "initializing for tests on $^O...\n\n";
print "logging to $ENV{'PWD'}/$twtools::twrootdir/status.log\n\n"; print "logging to $ENV{'PWD'}/$twtools::twrootdir/status.log\n\n";