From 15b7d18104ae0d01660cf1ab109d10660ea17a90 Mon Sep 17 00:00:00 2001 From: Brian Cox Date: Sun, 10 Sep 2017 00:21:44 -0700 Subject: [PATCH] Couple more test-harness platform tweaks --- src/test-harness/tests/dirs.pm | 49 +++++++++++++++++++--------------- src/test-harness/twtest.pl | 2 +- 2 files changed, 29 insertions(+), 22 deletions(-) diff --git a/src/test-harness/tests/dirs.pm b/src/test-harness/tests/dirs.pm index 3ff9b5e..071b76f 100644 --- a/src/test-harness/tests/dirs.pm +++ b/src/test-harness/tests/dirs.pm @@ -105,12 +105,12 @@ EOT # sub initialize() { - my $twstr = getPolicyFileString(); - twtools::GeneratePolicyFile($twstr); + my $twstr = getPolicyFileString(); + twtools::GeneratePolicyFile($twstr); - # this test requires a clean start of it's tree - # - system("rm -rf $twtools::twrootdir/" . $TESTS{"0-createTempDir"}{dir}); + # this test requires a clean start of it's tree + # + system("rm -rf $twtools::twrootdir/" . $TESTS{"0-createTempDir"}{dir}); } @@ -120,30 +120,37 @@ sub initialize() { # sub run() { - my $twpassed = 1; + twtools::logStatus("*** Beginning $description\n"); + printf("%-30s", "-- $description"); - twtools::logStatus("*** Beginning $description\n"); - printf("%-30s", "-- $description"); + if ($^O eq "skyos") { + ++$twtools::twskippedtests; + print "SKIPPED; TODO: SkyOS has fewer expected changes here; refactor so we can test for correct values\n"; + return; + } - ######################################################### - # - # Run the tests describe above in the %TESTS structure. - # - $twpassed = twtools::RunIntegrityTests(%TESTS); + my $twpassed = 1; - ######################################################### - # - # See if the tests all succeeded... - # - if ($twpassed) { + ######################################################### + # + # Run the tests describe above in the %TESTS structure. + # + $twpassed = twtools::RunIntegrityTests(%TESTS); + + + ######################################################### + # + # See if the tests all succeeded... + # + if ($twpassed) { ++$twtools::twpassedtests; print "PASSED\n"; - } - else { + } + else { ++$twtools::twfailedtests; print "*FAILED*\n"; - } + } } diff --git a/src/test-harness/twtest.pl b/src/test-harness/twtest.pl index 62b5290..1611811 100755 --- a/src/test-harness/twtest.pl +++ b/src/test-harness/twtest.pl @@ -137,7 +137,7 @@ processCommandLine(); prepareListOfTests() if scalar(@twtests) == 0; # only if none were on the cmdline 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";