summaryrefslogtreecommitdiff
path: root/test/test.cpp
AgeCommit message (Collapse)AuthorFilesLines
2020-02-23wsd: improve test loggingAshod Nakashian1-10/+38
Logs from test are now more atomic (less interleaving). And each integration-test (old-style tests running from new-style tests) will now print clearly when it begins and when it fails, making it easier to find failures. Misc other minor cleanups in test logging. Change-Id: Iff664e42a04d1c6dbf1332b2884c35183ef85e21 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89309 Tested-by: Ashod Nakashian <ashnakash@gmail.com> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2020-01-21test: simplify and remove obsolete /proc grokking code.Michael Meeks1-119/+10
Change-Id: I482c56dd76067019d83196aa305d14703e25bb44
2020-01-21test: dung out redundant LOOL_TEST_CLIENT_PORT.Michael Meeks1-1/+10
And cleanup other related oddities. Change-Id: I2d179a2ece6a8553e10e406ad4e5da08a2ff58e5
2020-01-21test: switch to parallel tests based on Unit framework.Michael Meeks1-1/+2
Increase a few timeouts, bin old-style standalone unit tests, fix a number of bugs. Change-Id: Ia3d59466ecb9a9443807ba3445d04dd5f77e3dba
2019-11-14Add a 'how to debug' to the whitebox unit tests.Jan Holesovsky1-1/+6
Change-Id: I373ae9e7268b108eedcae2805b0c1681845542cb Reviewed-on: https://gerrit.libreoffice.org/82651 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-11-13killpoco: removed StringTokenizer from test directoryPranam Lashkari1-3/+4
removed use of Poco::StringTokenizer from the test directory using LOOLProtocol::tokenize and std::vecor<std::string> Change-Id: I20fc2e0ef0d0d8fc959fee7972aa095f2581c181 Reviewed-on: https://gerrit.libreoffice.org/82565 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-10-08typo fixes in comments and codeAndras Timar1-1/+1
Change-Id: Idd98516d30d98dea18eda9bbec8ac9777063b553
2019-09-22wsd: test: support test command-line args in any orderAshod Nakashian1-3/+14
No longer is it necessary to run with --verbose in case we need --debugrun. Also, by default the log level is now warning instead of error, which should hopefully be more useful in troubleshooting issues (or at least to force us better categorize log messages). Change-Id: Iad4279ecf3bf77780adcd786d4f46d9c964f302d Reviewed-on: https://gerrit.libreoffice.org/79351 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-09-22wsd: improved kit thread namingAshod Nakashian1-6/+16
Now the wsd docbroker thread and its peer kit thread are trivial to match, since they are called docbroker_xxx and kitbroker_xxx (where xxx is the instance ID) respectively. Also, label spare kit instances as kit_spare_xxx to differentiate from ones with actual documents, where xxx is a running counter to differentiate spare instances from one another. Now we are able to easily see (and count) the number of spare kit instances, and match wsd and kit threads handling a given document. Unit-test logic updated to reflect the new thread naming scheme. Change-Id: I154dc8f200fbe0e65f3f5984e6dad2cef1b52e22 Reviewed-on: https://gerrit.libreoffice.org/79328 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-09-12test: fix memory leakMiklos Vajna1-1/+3
==18134==ERROR: LeakSanitizer: detected memory leaks Direct leak of 8 byte(s) in 1 object(s) allocated from: #0 0x514db8 in operator new(unsigned long) /git/libreoffice/lode/packages/llvm-472c6ef8b0f53061b049039f9775ab127beafbe4.src/compiler-rt/lib/asan/asan_new_delete.cc:105 #1 0x9f836c in runClientTests(bool, bool) /git/libreoffice/online-san/test/test.cpp:113:28 #2 0x9f7975 in main /git/libreoffice/online-san/test/test.cpp:77:12 Change-Id: Ib93625e2a77e37733b9bb052dd73ec3333bc2a71
2019-09-05test: print out the correct way to run all-local test.Michael Meeks1-1/+4
Change-Id: I2a9a90beff7b2dc689dc2de7df86404018b514fb
2019-08-29test: add --debugrun switchMiklos Vajna1-1/+5
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
2019-05-14test: use process groups as well to allow concurrent make checks.Michael Meeks1-18/+21
Change-Id: Ib1a55f53c51835a8f9fb1c17146f30e887103906
2019-05-10test: better zombie handling for more recent kernels.Michael Meeks1-2/+2
Change-Id: I2ae0bcc4c42100ee08ee3fcf68cb7022f38aed7b
2019-05-04test: recommend --verbose mode, and interleave output chronologically.Michael Meeks1-4/+10
Avoids a number of unpleasant attempts to interleave output. Change-Id: I84b25e338b576d88f7f5fc47fbfcae34c3d377fd
2019-05-03Update unit test data for recent master.Michael Meeks1-0/+4
Also add better printout for unit-client case. Change-Id: Ic3c5573eab55ad5469adefa5bbfbd6c0e05e571e
2019-05-03Improve pid collection and printout for tests.Michael Meeks1-1/+1
Change-Id: I820c1acbdbae41dd2c2c6bb7285b84bbb61e79d5
2019-05-01test: help people run just the one that matters.Michael Meeks1-0/+8
Change-Id: I1916e250613f8d50377180e38505045f71f51fd0 Reviewed-on: https://gerrit.libreoffice.org/71642 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2019-03-04Don't use the same std::ostringstream from multiple threads.Michael Meeks1-6/+11
Avoids tests crashing with obscure memory errors re-allocating the string buffer; and hopefully cleans up the output too. Change-Id: I3e38680c15129e84f0c7dd8cada3b505cf08ad34
2018-11-30test: no need to copy procEntryMiklos Vajna1-1/+1
Change-Id: Iac7bca9ebcf104975d01bcd1cdfe8e0f4d2a742e
2018-10-17test: avoid some unnecessary value parametersMiklos Vajna1-1/+1
2017-12-20loplugin:includeformPranav Kant1-2/+2
Change-Id: Ib62a7aa61062f00698aa3e8a144438de5c57e53d
2017-09-19Implement more reliable in-process short-cuts.Michael Meeks1-0/+31
Change-Id: Icdfa71affad147c29df175ae687cbecc3f1f171b
2017-09-19Re-factor pid hunting code into test.cpp where we can do better.Michael Meeks1-0/+85
Prepare the ground for using WSD hooks for this. Change-Id: I5c3e32396b335ad189472ab3a51044372ee304b2
2017-08-17unit tests: Really bail out on error; and no need for a tempfile.Jan Holesovsky1-2/+2
Change-Id: I53c1ab62bf9293217a5cada54c358292364ed60a
2017-06-19test: make sure own header is self-containedMiklos Vajna1-2/+2
By including it before anything else. Change-Id: I0fa37dcee7828a05e3ba7aac4eec3b63d1203468
2017-06-02Run old-style unit tests as a new-style unit test.Michael Meeks1-0/+16
This moves the code into the same process, for easier logging & debugging. Disabled initially. Change-Id: Id48b5649ba14deb0a2159ca59e321c7d0ae66dad
2017-04-20wsd: fix verbose test outputAshod Nakashian1-11/+17
Change-Id: I089c31555a90c99c89745529c6df6552fd0bd7f9 Reviewed-on: https://gerrit.libreoffice.org/36709 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-04-07Write the failures we got during the test run.Jan Holesovsky1-2/+16
Change-Id: I2c05b6f2c890b3a67824f1ca612fa7f4e05d994f
2017-03-10config.h - get includes right: must always be the first include.Michael Meeks1-0/+2
2017-01-16Bin default values for parameters that were defaulted at just one call siteTor Lillqvist1-1/+1
Change-Id: I965b0be1ad4f706a06d06d5c6c3f940c1b3cc33c
2016-12-19loolwsd: string trimming helpersAshod Nakashian1-1/+0
Change-Id: I5e47f92b624890421bd7022084063cdea77da12b Reviewed-on: https://gerrit.libreoffice.org/32155 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-25Apply the pre-branch rename script to re-organize the source.Michael Meeks1-0/+103