Module: tools
Branch: master
Commit: ff73eb836e91f0f2f721a2927700b8217359221c
URL: https://source.winehq.org/git/tools.git/?a=commit;h=ff73eb836e91f0f2f721a29…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Thu Dec 17 11:53:56 2020 +0100
testbot/RestoreVM: Explicitly deleting the old disks may not be necessary.
Normally virsh undefine --remove-all-storage handles it but it does not
follow the symbolic links. So tell rm not to complain if it finds no
file to delete.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/scripts/RestoreVM | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testbot/scripts/RestoreVM b/testbot/scripts/RestoreVM
index 57e11c0..a1b9d15 100755
--- a/testbot/scripts/RestoreVM
+++ b/testbot/scripts/RestoreVM
@@ -641,7 +641,7 @@ then
then
fatal_no_cleanup "could not remove the existing '$opt_vm' VM"
fi
- [ -z "$olddisks" ] || dry_run rm $olddisks
+ [ -z "$olddisks" ] || dry_run rm -f $olddisks
fi
Module: tools
Branch: master
Commit: e15e3a459d7a7ec0277f5c65b18eea4b66562307
URL: https://source.winehq.org/git/tools.git/?a=commit;h=e15e3a459d7a7ec0277f5c6…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Thu Dec 17 11:53:33 2020 +0100
testbot/TestAgent: Also dereference symbolic links to better find $::RootDir.
This allows putting a symbolic link to TestAgent in $PATH.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/scripts/TestAgent | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/testbot/scripts/TestAgent b/testbot/scripts/TestAgent
index 40f443e..10bdc63 100755
--- a/testbot/scripts/TestAgent
+++ b/testbot/scripts/TestAgent
@@ -23,12 +23,10 @@ use strict;
sub BEGIN
{
- if ($0 !~ m=^/=)
- {
- # Turn $0 into an absolute path so it can safely be used in @INC
- require Cwd;
- $0 = Cwd::cwd() . "/$0";
- }
+ # Turn $0 into an absolute path so it can safely be used in @INC.
+ # Also dereference symbolic links to better find $::RootDir.
+ use Cwd 'abs_path';
+ $0 = abs_path($0);
if ($0 =~ m=^(/.*)/[^/]+/[^/]+$=)
{
$::RootDir = $1;