From 9c6142ec26a0ba61b1cf58d1e6bf0b5376394bcd Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Tue, 30 Mar 2021 18:36:08 +0300 Subject: Exclude some tests in Windows RDP session It seems that RDP may change (limit?) color space (even configured to use 32-bit colors), and then some tests start failing like this: Test name: BackendTest::testDrawAlphaBitmapMirrored equality assertion failed - Expected: c[80000000] - Actual : c[84000000] Debugging ImplDrawBitmap in vcl/win/gdi/gdiimpl.cxx, and adding a call to GetPixel immediately after the call to StretchDIBits, shows that the resulting color on the device is different from the color in the bitmap data: e.g., for original color {128, 0, 0} the result is {132, 0, 0}. Calling GetColorAdjustment shows that there's no color adjustments set for the device, so I can't detect or modify the behavior this way. So just disable the tests for now when running in RDP sessions. Change-Id: Ie89d07f18f53e56bed6f7fa58432b8575b4d9f12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113388 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- unotest/source/cpp/bootstrapfixturebase.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'unotest/source') diff --git a/unotest/source/cpp/bootstrapfixturebase.cxx b/unotest/source/cpp/bootstrapfixturebase.cxx index 5c5b3bcc3a9c..5eb5b91dcaf0 100644 --- a/unotest/source/cpp/bootstrapfixturebase.cxx +++ b/unotest/source/cpp/bootstrapfixturebase.cxx @@ -13,6 +13,10 @@ #include #include +#if defined _WIN32 +#include +#endif + using namespace ::com::sun::star; // NB. this constructor is called before any tests are run, once for each @@ -32,4 +36,13 @@ void test::BootstrapFixtureBase::setUp() void test::BootstrapFixtureBase::tearDown() { StarBASIC::DetachAllDocBasicItems(); } +bool test::BootstrapFixtureBase::isWindowsRDP() const +{ +#if defined _WIN32 + return GetSystemMetrics(SM_REMOTESESSION); +#else + return false; +#endif +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit