diff options
author | Justin Luth <justin.luth@collabora.com> | 2020-09-23 15:32:33 +0300 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2020-09-25 11:17:01 +0200 |
commit | 34894211362ade76580eddf7e4f3a23da3872a98 (patch) | |
tree | 9ecd216ccc74a9486bdd84a5ffd25c09aa9e0245 /sal | |
parent | ada652802db80202090fe55915d0b6ce648de59f (diff) |
cppunittester: [_RUN_____] indicates unit test start
-visual: so that the human eye can easily find it
-at start: to identify the last test if it ends abruptly
-no spaces: easy scripting | grep RUN | awk '{print $2}'
A visually unique, eye-catching start banner
will be helpful when browsing through logs,
or when adding asserts and running a make sw.check.
[I frequently look for existing unit tests that match
a certain condition in the 15 ooxmlexport tests.]
Previously, the tests ran in the order that they existed
in the file. So if one asserted/crashed in the middle of
the run, you could easily guess which test it was
by finding the name of the test that just finished OK.
However, since
2f2246d22e2a8ccbc1dc3e6f5243734a61edf270
Author: Stephan Bergmann on Sat Aug 8 12:00:23 2020
external/cppunit: Run tests in deterministic order
the tests are sorted by name and run in
alphabetical order - which is not at all obvious or
intuitive. It certainly makes it harder to guess
what the next alphabetical name will be.
P.S. For consistency, I considered adding [____DONE_]
as well, but existing tooling might search for
"finished in:" and grab the first string (the test name)
so I don't want to break anything doing that.
Change-Id: I5521e681cd9f8304842290680f0389256fe3fe43
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103268
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sal')
-rw-r--r-- | sal/cppunittester/cppunittester.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sal/cppunittester/cppunittester.cxx b/sal/cppunittester/cppunittester.cxx index d325808198b7..468b54ca9ecc 100644 --- a/sal/cppunittester/cppunittester.cxx +++ b/sal/cppunittester/cppunittester.cxx @@ -98,8 +98,9 @@ public: TimingListener(const TimingListener&) = delete; TimingListener& operator=(const TimingListener&) = delete; - void startTest( CppUnit::Test *) override + void startTest( CppUnit::Test *test) override { + std::cout << "[_RUN_____] " << test->getName() << std::endl; m_nStartTime = osl_getGlobalTimer(); } |