Hello community,
here is the log from the commit of package ldtp for openSUSE:Factory
checked in at Fri Sep 4 00:41:55 CEST 2009.
--------
--- ldtp/ldtp.changes 2009-08-13 23:48:10.000000000 +0200
+++ ldtp/ldtp.changes 2009-08-21 14:18:36.000000000 +0200
@@ -1,0 +2,9 @@
+Fri Aug 21 14:08:20 CEST 2009 - dimstar@opensuse.org
+
+- Update to version 1.7.1:
+ + fdo#590755 - Keycodes mismatch using generatekeyevent from
+ python-ldtp
+ + fdo#591753 - On window callback exit ldtp crashes
+ + fdo#591764 - Var argument to onwindowcreate callback function
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
ldtp-1.7.0.tar.bz2
New:
----
ldtp-1.7.1.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ldtp.spec ++++++
--- /var/tmp/diff_new_pack.jFSzqC/_old 2009-09-04 00:40:28.000000000 +0200
+++ /var/tmp/diff_new_pack.jFSzqC/_new 2009-09-04 00:40:28.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package ldtp (Version 1.7.0)
+# spec file for package ldtp (Version 1.7.1)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -25,7 +25,7 @@
BuildRequires: libxml2-devel
License: GPL v2 or later ; LGPL v2.1 or later
Group: Productivity/Other
-Version: 1.7.0
+Version: 1.7.1
Release: 1
Summary: Linux Desktop Testing Project (LDTP)
Url: http://ldtp.freedesktop.org
++++++ ldtp-1.7.0.tar.bz2 -> ldtp-1.7.1.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ldtp-1.7.0/Doxyfile new/ldtp-1.7.1/Doxyfile
--- old/ldtp-1.7.0/Doxyfile 2009-08-13 06:56:02.000000000 +0200
+++ new/ldtp-1.7.1/Doxyfile 2009-08-14 06:34:28.000000000 +0200
@@ -4,7 +4,7 @@
# Project related configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = LDTP
-PROJECT_NUMBER = 1.7.0
+PROJECT_NUMBER = 1.7.1
OUTPUT_DIRECTORY = doc
CREATE_SUBDIRS = YES
OUTPUT_LANGUAGE = English
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ldtp-1.7.0/configure new/ldtp-1.7.1/configure
--- old/ldtp-1.7.0/configure 2009-08-13 06:55:35.000000000 +0200
+++ new/ldtp-1.7.1/configure 2009-08-14 06:35:04.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for ldtp 1.7.0.
+# Generated by GNU Autoconf 2.63 for ldtp 1.7.1.
#
# Report bugs to .
#
@@ -596,8 +596,8 @@
# Identity of this package.
PACKAGE_NAME='ldtp'
PACKAGE_TARNAME='ldtp'
-PACKAGE_VERSION='1.7.0'
-PACKAGE_STRING='ldtp 1.7.0'
+PACKAGE_VERSION='1.7.1'
+PACKAGE_STRING='ldtp 1.7.1'
PACKAGE_BUGREPORT='ldtp-dev@lists.freedesktop.org'
ac_subst_vars='LTLIBOBJS
@@ -1292,7 +1292,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures ldtp 1.7.0 to adapt to many kinds of systems.
+\`configure' configures ldtp 1.7.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1363,7 +1363,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of ldtp 1.7.0:";;
+ short | recursive ) echo "Configuration of ldtp 1.7.1:";;
esac
cat <<\_ACEOF
@@ -1470,7 +1470,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-ldtp configure 1.7.0
+ldtp configure 1.7.1
generated by GNU Autoconf 2.63
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1484,7 +1484,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by ldtp $as_me 1.7.0, which was
+It was created by ldtp $as_me 1.7.1, which was
generated by GNU Autoconf 2.63. Invocation command line was
$ $0 $@
@@ -2327,7 +2327,7 @@
# Define the identity of the package.
PACKAGE='ldtp'
- VERSION='1.7.0'
+ VERSION='1.7.1'
cat >>confdefs.h <<_ACEOF
@@ -5364,7 +5364,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by ldtp $as_me 1.7.0, which was
+This file was extended by ldtp $as_me 1.7.1, which was
generated by GNU Autoconf 2.63. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -5427,7 +5427,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-ldtp config.status 1.7.0
+ldtp config.status 1.7.1
configured by $0, generated by GNU Autoconf 2.63,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ldtp-1.7.0/configure.in new/ldtp-1.7.1/configure.in
--- old/ldtp-1.7.0/configure.in 2009-08-13 06:54:16.000000000 +0200
+++ new/ldtp-1.7.1/configure.in 2009-08-14 06:34:22.000000000 +0200
@@ -1,7 +1,7 @@
dnl *************************************************************
dnl Process this file with autoconf to produce a configure script
dnl *************************************************************
-AC_INIT(ldtp, 1.7.0, ldtp-dev@lists.freedesktop.org)
+AC_INIT(ldtp, 1.7.1, ldtp-dev@lists.freedesktop.org)
AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ldtp-1.7.0/doc/pyldtp-doc.h new/ldtp-1.7.1/doc/pyldtp-doc.h
--- old/ldtp-1.7.0/doc/pyldtp-doc.h 2009-08-13 07:35:04.000000000 +0200
+++ new/ldtp-1.7.1/doc/pyldtp-doc.h 2009-08-14 06:23:52.000000000 +0200
@@ -4959,7 +4959,8 @@
/** \page onwindowcreate onwindowcreate
* \section Syntax
*
- * onwindowcreate ('', '')
+ * onwindowcreate ('', ''[,
+ * ])
*
* \section Description
*
@@ -4978,52 +4979,39 @@
* <pre>
*
* from ldtp import *
- *
* import threading
- *
*
- * callbackRunning = threading.Event ()
- *
- * callbackRunning.clear ()
- *
- * callbackState = threading.Event ()
- *
- * callbackState.clear ()
- *
+ * callbackRunning = threading.Event()
+ * callbackRunning.clear()
+ * callbackState = threading.Event()
+ * callbackState.clear()
*
- * def cb ():
- *
- * callbackState.set ()
- *
- * waittillguiexist ('dlgReplace')
- *
- * click ('dlgReplace', 'btnClose')
- *
- * callbackState.clear ()
- *
- * callbackRunning.set ()
- *
- * print 'callbackend'
- *
- *
- * onwindowcreate ('Replace', cb)
- *
- * click ('*gedit', 'btnReplace')
- *
- * click ('*gedit', 'btnFind')
- *
- * waittillguiexist ('dlgFind')
- *
- * click ('dlgFind', 'btnClose')
- *
- * if callbackState.isSet ():
- *
- * print 'Waiting for callback to complete'
- *
- * callbackRunning.wait ()
- *
- * print 'callbackset'
- *
+ * def cb():
+ * callbackState.set()
+ * waittillguiexist('dlgReplace')
+ * click('dlgReplace', 'btnClose')
+ * callbackState.clear()
+ * callbackRunning.set()
+ * print 'callbackend'
+ *
+ * def cbwithvarargs(*args):
+ * for arg in args:
+ * print arg
+ * print 'callbackend'
+ *
+ * onwindowcreate('Replace', cb)
+ * onwindowcreate('dlgFind', cbwithvarargs, 'test', 'var', 'args')
+ *
+ * click('*gedit', 'btnReplace')
+ * click('*gedit', 'btnFind')
+ *
+ * waittillguiexist('dlgFind')
+ * click('dlgFind', 'btnClose')
+ *
+ * if callbackState.isSet():
+ * print 'Waiting for callback to complete'
+ * callbackRunning.wait()
+ * print 'callbackset'
* print 'test end'
*
* </pre>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ldtp-1.7.0/python/ChangeLog new/ldtp-1.7.1/python/ChangeLog
--- old/ldtp-1.7.0/python/ChangeLog 2009-08-13 08:48:15.000000000 +0200
+++ new/ldtp-1.7.1/python/ChangeLog 2009-08-14 06:25:57.000000000 +0200
@@ -1,3 +1,8 @@
+2009-08-13 Nagappan Alagappan
+
+ * ldtp.py (onwindowcreate): Fixes bug 591764 - Var argument to
+ onwindowcreate callback function
+
2009-08-12 Arvind Patil
* ldtputils.py (activatewindow, minimizewindow, maximizewindow)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ldtp-1.7.0/python/ldtp.py new/ldtp-1.7.1/python/ldtp.py
--- old/ldtp-1.7.0/python/ldtp.py 2009-08-13 08:49:18.000000000 +0200
+++ new/ldtp-1.7.1/python/ldtp.py 2009-08-14 06:23:52.000000000 +0200
@@ -324,7 +324,7 @@
print 'TypeError', msg
return (-1, "Invalid response packet", packetId), (0, None)
-def invokecallback (windowTitle):
+def invokecallback (windowTitle, *args):
_clientFd, _ldtpUseTcp = connect2LdtpExecutionEngine ()
_sockFdPool = ldtplib.ldtplibutils.sockFdPool
@@ -352,7 +352,10 @@
# Check whether its callable
if callable(callback):
# If callable then call the function
- callback()
+ if len(args) and args[0]:
+ callback(*args[0])
+ else:
+ callback()
else:
if _ldtpDebug:
print 'callback function is not callable, ignoring'
@@ -1977,7 +1980,7 @@
logFailures ('releasecontext failed: %s' % msg.value)
raise
-def onwindowcreate (windowTitle, callbackFuncName):
+def onwindowcreate (windowTitle, callbackFuncName, *args):
""" On new window creation event, notify
If registered with same title more than once, only the last title will
be used, previously registered will be ignored
@@ -1989,7 +1992,7 @@
try:
# Since LDTP engine returns the response to the socket who initiated the
# onwindowcreate call, let us initiate the call in the new thread
- threadId = thread.start_new_thread (invokecallback, (windowTitle, ))
+ threadId = thread.start_new_thread (invokecallback, (windowTitle, args))
if _ldtpDebug:
print windowTitle
# Check for previous instance of the window title
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ldtp-1.7.0/src/ChangeLog new/ldtp-1.7.1/src/ChangeLog
--- old/ldtp-1.7.0/src/ChangeLog 2009-08-13 09:12:59.000000000 +0200
+++ new/ldtp-1.7.1/src/ChangeLog 2009-08-14 06:30:39.000000000 +0200
@@ -1,3 +1,13 @@
+2009-08-13 Nagappan Alagappan
+
+ * ldtp.c (report_window_event): Fixes bug 591753 – On window
+ callback exit ldtp crashes.
+
+ * device.c (get_keyboard_keycodes): Fixes ldtp crash when xmodmap
+ doesn't exist in path. This was a regression from the previous fix
+ of bug 590755 - Keycodes mismatch using generatekeyevent from
+ python-ldtp.
+
2009-08-12 José Luis Segura Lucas
* device.c (get_keyboard_keycodes): Fixes bug 590755, Keycodes
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ldtp-1.7.0/src/device.c new/ldtp-1.7.1/src/device.c
--- old/ldtp-1.7.0/src/device.c 2009-08-13 08:41:31.000000000 +0200
+++ new/ldtp-1.7.1/src/device.c 2009-08-14 06:23:52.000000000 +0200
@@ -452,7 +452,7 @@
int keycode;
gchar **lines;
gchar *line;
- int i;
+ int i, status;
int index = 0;
struct NonPrint_Key_Synth old_NonPrint_Key_Synth_Vals[] = {{"escape", 9}, {"esc", 9}, {"backspace", 22},
@@ -476,35 +476,40 @@
src = (char *) malloc(sizeof(char) * 100);
readed = 0;
- fd = popen("xmodmap -pke", "r");
+ fd = popen("xmodmap -pke 2>/dev/null", "r");
while ( ! feof(fd)) {
readed += fread(src + readed, 1, 100, fd);
src = (char *) realloc(src, sizeof(char)*(readed+100));
}
- pclose(fd);
+ status = pclose(fd);
- lines = g_strsplit(src, "\n", 0);
+ if (status != -1) {
+ lines = g_strsplit(src, "\n", 0);
- for (index=0; lines != NULL && strcmp(*lines, ""); lines++) {
- gchar **split;
- line = *lines;
-
- split = g_strsplit(line, "=", 2);
- keycode = atoi(split[0] + 7);
-
- if (strlen(split[1]) > 0) {
- gchar **space_split = g_strsplit(split[1], " ", 3);
- NonPrint_Key_Synth_Vals[index].sym = space_split[1];
- NonPrint_Key_Synth_Vals[index].KeyVal = keycode;
- index++;
+ for (index=0; lines != NULL && strcmp(*lines, ""); lines++) {
+ gchar **split;
+ line = *lines;
+
+ split = g_strsplit(line, "=", 2);
+ keycode = atoi(split[0] + 7);
+
+ if (strlen(split[1]) > 0) {
+ gchar **space_split = g_strsplit(split[1], " ", 3);
+ NonPrint_Key_Synth_Vals[index].sym = space_split[1];
+ NonPrint_Key_Synth_Vals[index].KeyVal = keycode;
+ index++;
+ }
}
+ } else if (src) {
+ g_free (src);
+ src = NULL;
}
int old_len = sizeof(old_NonPrint_Key_Synth_Vals) / sizeof(struct NonPrint_Key_Synth);
- for(i=0 ; index < 300 && i < old_len; index++, i++)
+ for(i = 0 ; index < 300 && i < old_len; index++, i++)
NonPrint_Key_Synth_Vals[index] = old_NonPrint_Key_Synth_Vals[i];
NonPrint_Key_Synth_Vals[index].sym = NULL;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ldtp-1.7.0/src/ldtp.c new/ldtp-1.7.1/src/ldtp.c
--- old/ldtp-1.7.0/src/ldtp.c 2009-08-13 07:43:15.000000000 +0200
+++ new/ldtp-1.7.1/src/ldtp.c 2009-08-14 06:23:52.000000000 +0200
@@ -76,16 +76,11 @@
#endif
static LDTPClientContext*
-is_window_reg_for_events (char *context, char *window_name)
+is_window_reg_for_events (char *context)
{
LDTPClientContext *cctxt = NULL;
if (event_notifier) {
cctxt = g_hash_table_find (event_notifier, search_title_based, context);
- if (cctxt && context && cctxt->req && cctxt->req->context) {
- g_print ("Registered window title: %s - %s\n", context, cctxt->req->context);
- return cctxt;
- }
- cctxt = g_hash_table_find (event_notifier, search_title_based, window_name);
if (cctxt && context && cctxt->req && cctxt->req->context)
g_print ("Registered window title: %s - %s\n", context, cctxt->req->context);
}
@@ -128,6 +123,7 @@
g_print ("Event type: %s\n", event->type);
if (g_ascii_strcasecmp ("window:create", event->type) == 0) {
uint32_t resp_size = 0;
+ gboolean flag = FALSE;
LDTPErrorCode status;
char *resp_pckt = NULL;
char *window_name = NULL;
@@ -174,38 +170,48 @@
SPI_freeString (title);
return;
}
- if ((cctxt = is_window_reg_for_events (window_name, title))) {
- /*
- Notify to client
- */
- if (!cctxt || !cctxt->resp) {
- g_print ("CCTXT is lost\n");
- g_free (window_name);
- SPI_freeString (title);
- return;
- }
+ cctxt = is_window_reg_for_events (window_name);
+ if (!cctxt) {
+ cctxt = is_window_reg_for_events (title);
+ flag = TRUE;
+ }
+ if (!cctxt || !cctxt->resp) {
+ g_print ("CCTXT is lost\n");
+ g_free (window_name);
+ SPI_freeString (title);
+ return;
+ }
+ /*
+ Notify to client
+ */
+ if (cctxt->resp->data) {
+ g_free (cctxt->resp->data);
+ cctxt->resp->data = NULL;
+ }
+ if (flag) {
+ cctxt->resp->data = g_strdup (title);
+ cctxt->resp->data_len = g_utf8_strlen (title, -1);
+ } else {
cctxt->resp->data = g_strdup (window_name);
cctxt->resp->data_len = g_utf8_strlen (window_name, -1);
- cctxt->resp->resp_status = LDTP_ERROR_SUCCESS;
+ }
+ cctxt->resp->resp_status = LDTP_ERROR_SUCCESS;
- generate_notification_packet (cctxt, &status, &resp_pckt, &resp_size);
- if (status != LDTP_ERROR_SUCCESS) {
- SPI_freeString (title);
- g_free (window_name);
- g_print ("Error generating notification\n");
- return;
- }
- if (resp_pckt)
- g_print ("Notification: %s - Len - %d", resp_pckt, resp_size);
- send_response (cctxt->sock_fd, resp_pckt, resp_size, &status);
- g_free (cctxt->resp->data);
- cctxt->resp->data = NULL;
+ generate_notification_packet (cctxt, &status, &resp_pckt, &resp_size);
+ if (status != LDTP_ERROR_SUCCESS) {
SPI_freeString (title);
g_free (window_name);
+ g_print ("Error generating notification\n");
return;
}
- g_free (window_name);
+ if (resp_pckt)
+ g_print ("Notification: %s - Len - %d", resp_pckt, resp_size);
+ send_response (cctxt->sock_fd, resp_pckt, resp_size, &status);
+ g_free (cctxt->resp->data);
+ cctxt->resp->data = NULL;
SPI_freeString (title);
+ g_free (window_name);
+ return;
} else if (g_ascii_strcasecmp ("window:close", event->type) == 0 ||
g_ascii_strcasecmp ("window:deactivate", event->type) == 0 ||
g_ascii_strcasecmp ("window:destroy", event->type) == 0) {
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org