From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2740 invoked by alias); 20 Nov 2011 09:20:31 -0000 Received: (qmail 2730 invoked by uid 22791); 20 Nov 2011 09:20:30 -0000 X-SWARE-Spam-Status: No, hits=-3.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-vw0-f41.google.com (HELO mail-vw0-f41.google.com) (209.85.212.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 20 Nov 2011 09:20:16 +0000 Received: by vbbfq11 with SMTP id fq11so1780601vbb.0 for ; Sun, 20 Nov 2011 01:20:16 -0800 (PST) Received: by 10.224.17.148 with SMTP id s20mr3990189qaa.55.1321780816000; Sun, 20 Nov 2011 01:20:16 -0800 (PST) MIME-Version: 1.0 Received: by 10.224.17.148 with SMTP id s20mr3990181qaa.55.1321780815881; Sun, 20 Nov 2011 01:20:15 -0800 (PST) Received: by 10.224.6.76 with HTTP; Sun, 20 Nov 2011 01:20:15 -0800 (PST) In-Reply-To: References: Date: Sun, 20 Nov 2011 09:20:00 -0000 Message-ID: Subject: Re: Problem writing python tests without installing From: Doug Evans To: pmuldoon@redhat.com Cc: Robert Lupton the Good , gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2011-11/txt/msg00100.txt.bz2 On Thu, Nov 10, 2011 at 7:54 AM, Phil Muldoon wrote: > Robert Lupton the Good writes: > >> When running the testsuite, the python files that are sourced are appare= ntly e.g. >> =A0 =A0 =A0 gdb/testsuite/../data-directory/python/gdb/printing.py >> rather than >> =A0 =A0 =A0 gdb/python/lib/gdb/printing.py >> although the binary is as expected gdb/gdb > > Right, but you don't have to do 'make install' to get data-directory. > >> >> The files appear to be installed by "make install". =A0This is another >> manifestation of the problem that you cannot apparently work on the >> gdb python code without first installing it (away from it's cvs home >> -- but that can be faked with a link...) > > I work with Python every day and I don't have this issue. =A0The files are > correctly sourced from ../data-dictionary. > > I could not find the gdb.printing test in my output, but this works fine: > > python >>Sending "import gdb.command.prompt" to gdb > Looking to match ""[\r\n]*()[\r\n]+(\(gdb\) | *>)$"" > Message is "prompt substitution readline - import gdb.command.prompt" > board_info host exists name > > FWIW GDB is spawned in the test as: > > Spawning /home/pmuldoon/bugs/setex/obj/gdb/testsuite/../../gdb/gdb -nw -n= x -data-directory /home/pmuldoon/bugs/setex/obj/gdb/testsuite/../data-direc= tory > >> Is there a proper way to work around this? > > There's not enough information on your install/setup to diagnose the > issue. How did you configure the build? Yeah, I suspect the problem is either an absence of "-data-directory ..." when starting gdb, or not doing a "make" after editing a .py file (*1). [And if you add new .py files, remember to mention them in data-directory/Makefile.in] --- (*1) Since .py files aren't "compiled" having to do a "make" may be unexpected, but it's ultimately easier to stage them in $build/data-directory rather than trying to fetch them from the the source tree.