test/test.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
New commits: commit 38e06bf94efe6a86a154faf47a5428289ee15161 Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Thu Aug 29 09:00:16 2019 +0200 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Thu Aug 29 09:00:16 2019 +0200 test: add --debugrun switch Normally we use getgrp() to find out which lool* processes are ours when running 'make check', to support running multiple of these in parallel. However, in case you try to debug a failure, it's handy to start loolwsd manually and invoke ./test manually in two different shells. So add a switch which allows this: the result is that the failing test doesn't fail early in an uninteresting way (complaining that it can't find any loolkit processes) but fails the same way as during 'make check'. Let's call this --debugrun, since core has similar gb_UITest_DEBUGRUN/gb_JunitTest_DEBUGRUN switches, which also allow connecting to an already running "main" process. Change-Id: Ic7e29eb143ae70f199ef3a09ec9d6b6f8ee0650d diff --git a/test/test.cpp b/test/test.cpp index 6fb933dde..b04555ac7 100644 --- a/test/test.cpp +++ b/test/test.cpp @@ -64,9 +64,12 @@ bool filterTests(CPPUNIT_NS::TestRunner& runner, CPPUNIT_NS::Test* testRegistry, return haveTests; } +static bool IsDebugrun = false; + int main(int argc, char** argv) { const bool verbose = (argc > 1 && std::string("--verbose") == argv[1]); + IsDebugrun = (argc > 2 && std::string("--debugrun") == argv[2]); const char* loglevel = verbose ? "trace" : "error"; Log::initialize("tst", loglevel, true, false, {}); @@ -203,7 +206,8 @@ std::vector<int> getProcPids(const char* exec_filename) { // We could have several make checks running at once. int kidGrp = std::atoi(tokens[4].c_str()); - if (kidGrp != grp) + // Don't require matching grp for --debugrun invocations. + if (kidGrp != grp && !IsDebugrun) continue; switch (tokens[2].c_str()[0]) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits