From 21e9c223b753ade33c994c1efabbd67978eda3bf Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Mon, 11 Jul 2022 14:27:28 +0200 Subject: Test skip and fail in cleanup() as well as in cleanupTestCase() The skipcleanup and failcleanup tests were actually testing skip and fail in cleanupTestCase(), not in cleanup(). Add almost-duplicate tests and clean up so that we now have {fail,skip}cleanup(,testcase} tests to cover all four cases. Generated expected output. The new tests (with old names) get their fail or skip - during cleanup() - reported against the test instead of the cleanupTestCase function. (Results for {init,cleanup}TestCase() are always reported, even when these slots are not defined, as no-op passes.) Pick-to: 6.4 Change-Id: I0988d1696b50c0e2f30c45ddc25e1bd0bfd2151a Reviewed-by: Ivan Solovev Reviewed-by: Mitch Curtis --- tests/auto/testlib/selftests/generate_expected_output.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'tests/auto/testlib/selftests/generate_expected_output.py') diff --git a/tests/auto/testlib/selftests/generate_expected_output.py b/tests/auto/testlib/selftests/generate_expected_output.py index b1da3fd9fa..987a08b2c1 100755 --- a/tests/auto/testlib/selftests/generate_expected_output.py +++ b/tests/auto/testlib/selftests/generate_expected_output.py @@ -32,14 +32,15 @@ TESTS = ['assert', 'badxml', 'benchlibcallgrind', 'benchlibcounting', 'benchlibwalltime', 'blacklisted', 'cmptest', 'commandlinedata', 'counting', 'crashes', 'datatable', 'datetime', 'deleteLater', 'deleteLater_noApp', 'differentexec', 'exceptionthrow', 'expectfail', - "extendedcompare", 'failcleanup', 'faildatatype', 'failfetchtype', 'failinit', - 'failinitdata', 'fetchbogus', 'findtestdata', 'float', 'globaldata', - 'longstring', 'maxwarnings', 'mouse', 'multiexec', 'pairdiagnostics', 'pass', + "extendedcompare", 'failcleanup', 'failcleanuptestcase', + 'faildatatype', 'failfetchtype', 'failinit', 'failinitdata', + 'fetchbogus', 'findtestdata', 'float', 'globaldata', 'longstring', + 'maxwarnings', 'mouse', 'multiexec', 'pairdiagnostics', 'pass', 'printdatatags', 'printdatatagswithglobaltags', 'qexecstringlist', 'signaldumper', 'silent', 'singleskip', 'skip', 'skipcleanup', - 'skipinit', 'skipinitdata', 'sleep', 'strcmp', 'subtest', 'testlib', - 'tuplediagnostics', 'verbose1', 'verbose2', 'verifyexceptionthrown', - 'warnings', 'watchdog', 'junit', 'keyboard'] + 'skipcleanuptestcase', 'skipinit', 'skipinitdata', 'sleep', 'strcmp', + 'subtest', 'testlib', 'tuplediagnostics', 'verbose1', 'verbose2', + 'verifyexceptionthrown', 'warnings', 'watchdog', 'junit', 'keyboard'] class Fail (Exception): pass -- cgit v1.2.3