update to latest git again, bump version to 4.4

f38
Adam Williamson 9 years ago
parent 1c4b93e906
commit 9c57a140be

1
.gitignore vendored

@ -8,3 +8,4 @@
/os-autoinst-f5bb0fe960e394f135f49fc7e4cfc0dc2d90ba53.tar.gz /os-autoinst-f5bb0fe960e394f135f49fc7e4cfc0dc2d90ba53.tar.gz
/os-autoinst-0b5d885b30e84a229809d1e9e89b8b42533b8643.tar.gz /os-autoinst-0b5d885b30e84a229809d1e9e89b8b42533b8643.tar.gz
/os-autoinst-1962d68ec8b432b8cef665b5b35bce54694a4d98.tar.gz /os-autoinst-1962d68ec8b432b8cef665b5b35bce54694a4d98.tar.gz
/os-autoinst-ba7ea2290f4ac5a70ad335eb56124ba49c518837.tar.gz

@ -1,64 +0,0 @@
From 400a02e6d34a4e6f1e39ce0377a378cb58ab681b Mon Sep 17 00:00:00 2001
From: Adam Williamson <awilliam@redhat.com>
Date: Tue, 9 Aug 2016 09:43:58 -0700
Subject: [PATCH] assert_and_click: handle undefined previous mouse position
assert_and_click tries to record the previous mouse cursor
position and return the cursor there after clicking. However if
the mouse has never been explicitly positioned anywhere before,
`backend_get_last_mouse_set` returns undefined for each
co-ordinate, which results in a couple of 'use of uninitialized
value in int' warnings and the cursor being set to 0,0, which
may trigger the GNOME overview under Wayland. So catch when the
values are undefined and in this case, call mouse_hide() - which
puts the cursor at bottom-right - instead. This avoids both the
warnings and the overview trigger.
Also fix another uninitialized value warning in `mouse_hide`
while we're at it - check if border_offset is defined before
using it.
---
consoles/vnc_base.pm | 8 +++++---
testapi.pm | 10 ++++++++--
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/consoles/vnc_base.pm b/consoles/vnc_base.pm
index 58d0223..765fb8b 100644
--- a/consoles/vnc_base.pm
+++ b/consoles/vnc_base.pm
@@ -188,9 +188,11 @@ sub mouse_hide {
$self->{mouse}->{x} = $self->{vnc}->width - 1;
$self->{mouse}->{y} = $self->{vnc}->height - 1;
- my $border_offset = int($args->{border_offset});
- $self->{mouse}->{x} -= $border_offset;
- $self->{mouse}->{y} -= $border_offset;
+ if (defined $args->{border_offset}) {
+ my $border_offset = int($args->{border_offset});
+ $self->{mouse}->{x} -= $border_offset;
+ $self->{mouse}->{y} -= $border_offset;
+ }
bmwqemu::diag "mouse_move $self->{mouse}->{x}, $self->{mouse}->{y}";
$self->{vnc}->mouse_move_to($self->{mouse}->{x}, $self->{mouse}->{y});
diff --git a/testapi.pm b/testapi.pm
index 60eb757..1d70bf5 100755
--- a/testapi.pm
+++ b/testapi.pm
@@ -311,8 +311,14 @@ sub assert_and_click {
}
# We can't just move the mouse, or we end up in a click-and-drag situation
sleep 1;
- # move mouse back to where it was before we clicked
- return mouse_set($old_mouse_coords->{x}, $old_mouse_coords->{y});
+ # move mouse back to where it was before we clicked, or to the 'hidden'
+ # position if it had never been positioned
+ if (defined $old_mouse_coords->{x} && defined $old_mouse_coords->{y}) {
+ return mouse_set($old_mouse_coords->{x}, $old_mouse_coords->{y});
+ }
+ else {
+ return mouse_hide();
+ }
}
=head2 assert_and_dclick

@ -23,15 +23,15 @@
%global github_owner os-autoinst %global github_owner os-autoinst
%global github_name os-autoinst %global github_name os-autoinst
%global github_version 4.3 %global github_version 4.4
%global github_commit 1962d68ec8b432b8cef665b5b35bce54694a4d98 %global github_commit ba7ea2290f4ac5a70ad335eb56124ba49c518837
# if set, will be a post-release snapshot build, otherwise a 'normal' build # if set, will be a post-release snapshot build, otherwise a 'normal' build
%global github_date 20160902 %global github_date 20160915
%global shortcommit %(c=%{github_commit}; echo ${c:0:7}) %global shortcommit %(c=%{github_commit}; echo ${c:0:7})
Name: os-autoinst Name: os-autoinst
Version: %{github_version} Version: %{github_version}
Release: 26%{?github_date:.%{github_date}git%{shortcommit}}%{?dist} Release: 4%{?github_date:.%{github_date}git%{shortcommit}}%{?dist}
Summary: OS-level test automation Summary: OS-level test automation
License: GPLv2+ License: GPLv2+
Group: Development/System Group: Development/System
@ -126,7 +126,7 @@ make INSTALLDIRS=vendor %{?_smp_mflags}
# only internal stuff # only internal stuff
rm %{buildroot}%{_libexecdir}/os-autoinst/tools/tidy rm %{buildroot}%{_libexecdir}/os-autoinst/tools/tidy
rm -r %{buildroot}%{_libexecdir}/os-autoinst/tools/lib/perlcritic rm -r %{buildroot}%{_libexecdir}/os-autoinst/tools/lib/perlcritic
#rm %{buildroot}%{_libexecdir}/os-autoinst/tools/check_coverage rm %{buildroot}%{_libexecdir}/os-autoinst/tools/check_coverage
# we don't really need to ship this in the package, usually the web UI # we don't really need to ship this in the package, usually the web UI
# is much better for needle editing # is much better for needle editing
rm %{buildroot}%{_libexecdir}/os-autoinst/crop.py* rm %{buildroot}%{_libexecdir}/os-autoinst/crop.py*
@ -193,7 +193,20 @@ make check VERBOSE=1
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.opensuse.os_autoinst.switch.conf %config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.opensuse.os_autoinst.switch.conf
%changelog %changelog
* Sun Sep 04 2016 Adam Williamson <awilliam@redhat.com> - 4.3.26.20160902git1962d68 * Thu Sep 15 2016 Adam Williamson <awilliam@redhat.com> - 4.4-4.20160915gitba7ea22
- bump to git master again, drop merged patch
* Wed Sep 14 2016 Adam Williamson <awilliam@redhat.com> - 4.4-3.20160912git62f67e7
- final version of POO #13722 fix
* Wed Sep 14 2016 Adam Williamson <awilliam@redhat.com> - 4.4-2.20160912git62f67e7
- test fix for POO #13722
* Mon Sep 12 2016 Adam Williamson <awilliam@redhat.com> - 4.4-1.20160912git62f67e7
- try a new git snapshot again, let's see how it's going
- SUSE started calling this 4.4 at some point, so let's follow along
* Sun Sep 04 2016 Adam Williamson <awilliam@redhat.com> - 4.3-26.20160902git1962d68
- slightly older git snapshot, may fix issues seen in last build - slightly older git snapshot, may fix issues seen in last build
* Sat Sep 03 2016 Adam Williamson <awilliam@redhat.com> - 4.3-25.20160902git0b5d885 * Sat Sep 03 2016 Adam Williamson <awilliam@redhat.com> - 4.3-25.20160902git0b5d885

@ -1 +1 @@
dfdf44ef5298c857e3154879c37443e4 os-autoinst-1962d68ec8b432b8cef665b5b35bce54694a4d98.tar.gz 4b2a6cb31e253c671b84d75c921dc4d5 os-autoinst-ba7ea2290f4ac5a70ad335eb56124ba49c518837.tar.gz

Loading…
Cancel
Save