[PATCH 1/5] user32/tests: Test only part of the available modes.
Zhiyi Zhang
zzhang at codeweavers.com
Thu May 13 05:49:27 CDT 2021
I will send a new version. Introducing randomness in tests is not a good idea.
The rest of the patch series should be fine.
On 5/13/21 6:35 PM, Zhiyi Zhang wrote:
> Test only 1/10 of the all modes and at most 10 modes because TestBots have a 2 minutes timeout.
> This reduce the time to run the monitor test from 6 minutes to 25 seconds.
>
> Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50086
> Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
> ---
> dlls/user32/tests/monitor.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/dlls/user32/tests/monitor.c b/dlls/user32/tests/monitor.c
> index 6b233970ace..c4416a47259 100644
> --- a/dlls/user32/tests/monitor.c
> +++ b/dlls/user32/tests/monitor.c
> @@ -741,6 +741,12 @@ static void test_ChangeDisplaySettingsEx(void)
> dm.dmSize = sizeof(dm);
> for (mode = 0; EnumDisplaySettingsExA(devices[device].name, mode, &dm, 0); ++mode)
> {
> + /* Test 1/10 of all modes and at most 10 modes because TestBots have a 2 mins timeout */
> + if (mode >= 10)
> + break;
> + if (mode && rand() % 10)
> + continue;
> +
> dm.dmPosition = position;
> dm.dmFields |= DM_POSITION;
> /* Reattach detached non-primary adapters, otherwise ChangeDisplaySettingsExA with only CDS_RESET fails */
More information about the wine-devel
mailing list