diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2011-09-16 15:03:44 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-09-17 03:22:18 +0200 |
commit | 8a12d5fbf0ad0f34695a4067bb39017b0867f364 (patch) | |
tree | a084f8631df4964544f44b5b2fcfa0c6869be58b | |
parent | 89c7db515993cf97d8533a11398a8cc09e762b5f (diff) |
Improve cleanup of selftests
The selftest was only attempting to delete the output file at the end of
the entire test run. This file should actually be deleted after each
subtest to ensure that it does not cause confusing errors if the next
subtest fails to overwrite the output file.
Change-Id: Ia3827926f71a697c6108de3f2b08c969f761d978
Reviewed-on: http://codereview.qt-project.org/5051
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
-rw-r--r-- | tests/auto/testlib/selftests/tst_selftests.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp index 28d75f9591..80e8414b89 100644 --- a/tests/auto/testlib/selftests/tst_selftests.cpp +++ b/tests/auto/testlib/selftests/tst_selftests.cpp @@ -50,7 +50,7 @@ class tst_Selftests: public QObject private slots: void runSubTest_data(); void runSubTest(); - void cleanupTestCase(); + void cleanup(); private: void doRunSubTest(QString const& subdir, QString const& logger, QStringList const& arguments ); @@ -609,8 +609,9 @@ BenchmarkResult BenchmarkResult::parse(QString const& line, QString* error) return out; } -void tst_Selftests::cleanupTestCase() +void tst_Selftests::cleanup() { + // Remove the test output file QFile::remove("test_output"); } |