From a9821c0ac8c36c5fdfd25c07f81cf1eaa9a0b62e Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Mar 29 2017 22:26:40 +0000 Subject: Bump again to fix assert_and_click mouse repositioning (#744) --- diff --git a/.gitignore b/.gitignore index 089e4bf..56c0dbf 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,5 @@ /os-autoinst-84d91e68eb2d54f4967ccedb56f85a332ffbcbf3.tar.gz /os-autoinst-c29555ce95f271faf19fd63965e815e70d38b3f8.tar.gz /os-autoinst-4.4-16.20170327git201dc4e.fc26.src.rpm +/os-autoinst-201dc4e518cb6e1f55bed1b37578da0f7462479c.tar.gz +/os-autoinst-d8f75d2bc24f63a58545d20b79064a7131d41aa2.tar.gz diff --git a/0001-Fix-assert_and_click-mouse-hiding.patch b/0001-Fix-assert_and_click-mouse-hiding.patch new file mode 100644 index 0000000..9a247b6 --- /dev/null +++ b/0001-Fix-assert_and_click-mouse-hiding.patch @@ -0,0 +1,53 @@ +From 851639f604959cdea0448771cd694da2a00f16a1 Mon Sep 17 00:00:00 2001 +From: Adam Williamson +Date: Tue, 28 Mar 2017 21:02:11 -0700 +Subject: [PATCH] Fix assert_and_click mouse hiding + +See https://progress.opensuse.org/issues/17058#note-7 - #728 +caused a problem with the cursor reposition that occurs at the +end of `assert_and_click`, in the case that the cursor had not +been explicitly positioned before the `assert_and_click`. In +this case, `assert_and_click` is meant to call `mouse_hide`. +However, #728 made `get_last_mouse_set` *always* return defined +values, while `assert_and_click` expected it to return undefined +values when the cursor had never been positioned, so it wound +up trying to position the cursor to -1, -1 instead of calling +`mouse_hide`. + +The fix is pretty simple: just adapt the condition to the new +behaviour of `get_last_mouse_set`. +--- + t/03-testapi.t | 3 +++ + testapi.pm | 2 +- + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/t/03-testapi.t b/t/03-testapi.t +index cc28e65..067dcdc 100755 +--- a/t/03-testapi.t ++++ b/t/03-testapi.t +@@ -45,6 +45,9 @@ sub fake_read_json { + elsif ($cmd eq 'backend_mouse_hide') { + return {ret => 1}; + } ++ elsif ($cmd eq 'backend_get_last_mouse_set') { ++ return {ret => {x => -1, y => -1}}; ++ } + else { + print "not implemented \$cmd: $cmd\n"; + } +diff --git a/testapi.pm b/testapi.pm +index ddaea09..0fb61cb 100755 +--- a/testapi.pm ++++ b/testapi.pm +@@ -418,7 +418,7 @@ sub assert_and_click { + sleep 1; + # 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}) { ++ if ($old_mouse_coords->{x} > -1 && $old_mouse_coords->{y} > -1) { + return mouse_set($old_mouse_coords->{x}, $old_mouse_coords->{y}); + } + else { +-- +2.12.1 + diff --git a/os-autoinst.spec b/os-autoinst.spec index b2371f5..b8a0894 100644 --- a/os-autoinst.spec +++ b/os-autoinst.spec @@ -24,14 +24,14 @@ %global github_owner os-autoinst %global github_name os-autoinst %global github_version 4.4 -%global github_commit 201dc4e518cb6e1f55bed1b37578da0f7462479c +%global github_commit d8f75d2bc24f63a58545d20b79064a7131d41aa2 # if set, will be a post-release snapshot build, otherwise a 'normal' build -%global github_date 20170327 +%global github_date 20170329 %global shortcommit %(c=%{github_commit}; echo ${c:0:7}) Name: os-autoinst Version: %{github_version} -Release: 16%{?github_date:.%{github_date}git%{shortcommit}}%{?dist} +Release: 17%{?github_date:.%{github_date}git%{shortcommit}}%{?dist} Summary: OS-level test automation License: GPLv2+ Group: Development/System @@ -120,6 +120,10 @@ This package contains Open vSwitch support for os-autoinst. %prep %autosetup -n %{github_name}-%{github_commit} -p1 +# the full-stack test only really runs reliably on x86_64 and i386 +%ifnarch %{ix86} x86_64 +rm -f t/99-full-stack.t +%endif %build mkdir -p m4 @@ -199,6 +203,10 @@ make check VERBOSE=1 %config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.opensuse.os_autoinst.switch.conf %changelog +* Tue Mar 28 2017 Adam Williamson - 4.4-17.20170126gitd8f75d2 +- Bump again to fix assert_and_click mouse repositioning (see #744) +- Disable full-stack test on non-x86 arches + * Thu Mar 02 2017 Adam Williamson - 4.4-16.20170126git02cd04f - Update to latest git (many useful fixes) diff --git a/sources b/sources index 1df3553..7036979 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (os-autoinst-4.4-16.20170327git201dc4e.fc26.src.rpm) = 3c3a7178e8e3c6f9630d5a4cb05e17a6761a5c263aaa37cedb2f5d3faea0fe9b11d117fb4a623da38f591f8be598bbe2359784b81161dbc5f6b427638a498ac2 +SHA512 (os-autoinst-d8f75d2bc24f63a58545d20b79064a7131d41aa2.tar.gz) = 90b48daf78532e7b99d8cbeffc4a6d03f29a36db78f3e4c546f6b97243088cb2bde97022d687932de085ea0335f9a596e447b86e1c7861a8143f4ee64877046f