Previously this defaulted to 'trace' - now it can be configured, but
still defaults to 'trace'.
Change-Id: I0ecf2f0b991cd8cc29dbde866dd4589be4ca7957
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Clang-tidy thinks, incorrectly, that an
assert(false) can be replaced with static_assert.
While the assert(false) in question is a trap
for code paths that shouldn't happen,
static_assert is a compile-time check that
has nothing to do with the execution path.
Since the assert in question is used in a
macro, it shows up countless times where
said macro is used. This silences it.
Change-Id: I19b35da6332a06335cc83b0584505a42741de97f
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Apply the test filter on all tests,
not just the first.
Change-Id: Ib34e90e883f5de2ddcf04c710f433cb54677575d
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
With multi-tests, the instance of UnitBase may
change while an old test thread is still running.
Here we capture the instance of the test so we
do not publish events into a different (newer)
test.
Change-Id: I3ca2c058cbd81d4077b140f24f60f3f20f12b9b5
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Now that we may have multiple tests in a
single unit-test module, we should call
UnitWSD::configure for each one, not just
once at the start. Each test can modify
the configuration settings to meet its
test conditions.
Change-Id: I08de2d998edee5b4cbade08f2496196b596a8600
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
We now capture the expected variable's name
and log the expected and actual values when
the assertion fails.
Change-Id: I1c72de9a816acd4a369e8e3f649615462372c49c
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
When invoking exitTest it's useful to know
something about the reason. Whether it's
because the test passed or timed out,
it's useful to log this information.
Change-Id: I8e8ae525b7c2ef1de2e394d08107341cdc87c008
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Now that multiple tests and filtering are
supported, it's useful to know what tests
exist in each unit-test module.
Change-Id: Ifaa7eccabab6b23a57edf2786c0cd726ab0265db
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Using the envar COOL_TEST_OPTIONS, which is
provisioned to support other options than
just filtering, it is now possible to
only run the tests with names partially
matching the filter's case-insensitive
string.
Change-Id: I6168887677fd0fddd72bac2538837615b10b9fae
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Each test loads one or more document. At the end
of the test we may load a new test (a new
UnitWSD/Kit instance). However, because of the
static interface that the tests have, there
could be only one instance at a time. This
means that when we switch the current test
instance, an existing DocBroker might fire
events into the wrong (new) test, making it
fail.
By capturing the current test, we make sure
that DocBroker can never run against different
tests.
Change-Id: I161ec3c9ce1617f41d03b53d2d5fb19682930b78
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
The event we trigger when we detect data-loss
is best named to reflect that fact.
And since we can override the behavior,
for example if the test expected to trigger
the data-loss detection, then we can signal
the non-failure by the return value.
Change-Id: I67ca69ae783c956cfdd14d54dab5efb7cc3d258c
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Unfortunately, we can eliminate it because
we want to have the file/line where the
command is issued, for debugging. But, the
body doesn't have to be in the macro and
has now moved to a member function.
Change-Id: I02aefa6d8a8182bdfae8a1e0b4bae28a649e74bf
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Small deltas were not compressed at all, now they are.
Change-Id: I0543a488723816b4140b27c5690f657aea26226e
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
So tablet user is able to check what is the current edit mode
by looking at the status bar
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I4990ca748762eb100b0ca9e791b4ae2a0843f2f6
In rare cases when we have a corrupted document, or
we run out of memory while loading, we end up with
a Kit that has no document and would not be reused.
If we exit the Kit, we immediately cleanup DocBroker
on the WSD side and allow for retrying.
Change-Id: I3e811a066365e94f0606b9458be1272607cc45cf
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
So far, we assumed only json objects are
used, but that's only because we didn't
have arrays. This adds support for detecting
both json arrays and objects alike.
Change-Id: If91bf092ab95869298e90e4f071505471ab1db19
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Mode is sent via status message so handle it there to avoid
race
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Iaa9c23d4c88950d88701d8adf552d606871902d8