Don't complain about settings that are only modified after a reboot if none took place.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/bin/SetWinLocale | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-)
diff --git a/testbot/bin/SetWinLocale b/testbot/bin/SetWinLocale index 2ff8348fb3..6535c49396 100755 --- a/testbot/bin/SetWinLocale +++ b/testbot/bin/SetWinLocale @@ -904,7 +904,19 @@ if ($OptUTF8) } if ($OptMUI) { - CheckSetting($Settings, "PreferredUILanguages", $OptMUI, "for --mui $OptMUI"); + if ($OptReboot) + { + CheckSetting($Settings, "PreferredUILanguages", $OptMUI, "for --mui $OptMUI"); + if ($Settings->{PreferredUILanguagesPending}) + { + Error("PreferredUILanguagesPending should not be set for --mui $OptMUI\n"); + $Success = 0; + } + } + else + { + CheckSetting($Settings, "PreferredUILanguagesPending", $OptMUI, "for --mui $OptMUI"); + } } if ($KeyboardIds) { @@ -923,7 +935,7 @@ if ($OptSysCopy) CheckSetting($Settings, "DefCountry", $CountryId, "for --country $OptCountry"); CheckSetting($Settings, "DefCountryName", $OptCountry, "for --country $OptCountry"); } - if ($OptMUI) + if ($OptMUI and $OptReboot) { CheckSetting($Settings, "DefMachinePreferredUILanguages", $OptMUI, "for --mui $OptMUI"); } @@ -932,6 +944,13 @@ if ($OptSysCopy) CheckSetting($Settings, "DefInputMethod", $KeyboardIds->[0], "for --keyboard $OptKeyboard", 1); } } +if (!$OptReboot and ($OptSystem or $OptMUI)) +{ + my @Pending; + push @Pending, "--system $OptSystem" if ($OptSystem); + push @Pending, "--mui $OptMUI" if ($OptMUI); + Warning(join(" ", "the", @Pending, "changes are still pending\n")); +}
Cleanup(); exit(1) if (!$Success);