[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - test/test.cpp
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri May 3 12:04:58 UTC 2019
test/test.cpp | 8 ++++++++
1 file changed, 8 insertions(+)
New commits:
commit 318fe40562f5d3fd0616aecf2847657f6de660bf
Author: Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Wed May 1 22:12:56 2019 +0100
Commit: Jan Holesovsky <kendy at collabora.com>
CommitDate: Fri May 3 14:04:30 2019 +0200
test: help people run just the one that matters.
Change-Id: I1916e250613f8d50377180e38505045f71f51fd0
Reviewed-on: https://gerrit.libreoffice.org/71641
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Tested-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/test/test.cpp b/test/test.cpp
index 0b905fb54..91e3251c7 100644
--- a/test/test.cpp
+++ b/test/test.cpp
@@ -18,6 +18,7 @@
#include <cppunit/BriefTestProgressListener.h>
#include <cppunit/CompilerOutputter.h>
#include <cppunit/TestResult.h>
+#include <cppunit/TestFailure.h>
#include <cppunit/TestResultCollector.h>
#include <cppunit/TestRunner.h>
#include <cppunit/TextTestProgressListener.h>
@@ -144,6 +145,13 @@ bool runClientTests(bool standalone, bool verbose)
outputter.setNoWrap();
outputter.write();
+ const std::deque<CPPUNIT_NS::TestFailure *> &failures = result.failures();
+ if (!envar && failures.size() > 0)
+ {
+ std::cerr << "\nTo reproduce the first test failure use:\n\n";
+ std::cerr << "(cd test; CPPUNIT_TEST_NAME=\"" << (*failures.begin())->failedTestName() << "\" ./run_unit.sh)\n\n";
+ }
+
return result.wasSuccessful();
}
More information about the Libreoffice-commits
mailing list