Francois Gouget : testbot/BackupVM: Fix support for non-English locales.

Alexandre Julliard julliard at winehq.org
Mon Aug 30 15:23:42 CDT 2021


Module: tools
Branch: master
Commit: 839dab4dd3a456297e486c7d859cecc21941f5b7
URL:    https://source.winehq.org/git/tools.git/?a=commit;h=839dab4dd3a456297e486c7d859cecc21941f5b7

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Mon Aug 30 18:50:16 2021 +0200

testbot/BackupVM: Fix support for non-English locales.

Run virsh in a known locale when we need to parse its output.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 testbot/scripts/BackupVM  | 2 +-
 testbot/scripts/RestoreVM | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/testbot/scripts/BackupVM b/testbot/scripts/BackupVM
index 124e222..d433882 100755
--- a/testbot/scripts/BackupVM
+++ b/testbot/scripts/BackupVM
@@ -263,7 +263,7 @@ wait_for_vm()
 
     while true
     do
-        _state=`(virsh --connect "$opt_connect" list --all 2>/dev/null || echo " $_vm error") | sed -e "s/^.* $_vm  *//" -e t -e d`
+        _state=`(LANG= virsh --connect "$opt_connect" list --all 2>/dev/null || echo " $_vm error") | sed -e "s/^.* $_vm  *//" -e t -e d`
         [ -z "$opt_dry_run" ] || _state="shut off"
         case "$_state" in
         "error")
diff --git a/testbot/scripts/RestoreVM b/testbot/scripts/RestoreVM
index a1b9d15..29f5f43 100755
--- a/testbot/scripts/RestoreVM
+++ b/testbot/scripts/RestoreVM
@@ -522,7 +522,7 @@ wait_for_vm()
 
     while true
     do
-        _state=`(virsh --connect "$opt_connect" list --all 2>/dev/null || echo " $_vm error") | sed -e "s/^.* $_vm  *//" -e t -e d`
+        _state=`(LANG= virsh --connect "$opt_connect" list --all 2>/dev/null || echo " $_vm error") | sed -e "s/^.* $_vm  *//" -e t -e d`
         [ -z "$opt_dry_run" ] || _state="shut off"
         case "$_state" in
         "error")




More information about the wine-cvs mailing list