From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27352 invoked by alias); 20 Apr 2009 17:13:23 -0000 Received: (qmail 27342 invoked by uid 22791); 20 Apr 2009 17:13:23 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_36,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 20 Apr 2009 17:13:19 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n3KHDDF4003415; Mon, 20 Apr 2009 13:13:13 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n3KHDCix000717; Mon, 20 Apr 2009 13:13:12 -0400 Received: from opsy.redhat.com (vpn-12-214.rdu.redhat.com [10.11.12.214]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n3KHDBeo022508; Mon, 20 Apr 2009 13:13:12 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id BFAEC37829A; Mon, 20 Apr 2009 11:13:10 -0600 (MDT) To: Thiago Jung Bauermann Cc: gdb-patches ml Subject: Re: [rfa][testsuite] Consolidade Python test functions in lib/gdb.exp. References: <1240154454.19777.39.camel@localhost.localdomain> From: Tom Tromey Reply-To: tromey@redhat.com Date: Mon, 20 Apr 2009 17:13:00 -0000 In-Reply-To: <1240154454.19777.39.camel@localhost.localdomain> (Thiago Jung Bauermann's message of "Sun\, 19 Apr 2009 12\:20\:54 -0300") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-04/txt/msg00517.txt.bz2 >>>>> "Thiago" == Thiago Jung Bauermann writes: Thiago> This is a cleanup on the testcases in gdb.python. Currently, Thiago> they define the same test functions in each .exp. I put them Thiago> in lib/gdb.exp instead. It looks like the GDB style is to put specific support functions into a new file, e.g., "mi-support.exp". So perhaps we should add "python-support.exp"... WDYT? Thiago> +# Return 1 if Python scripting is supported in GDB, 0 if not. Thiago> +proc python_supported { } { Thiago> + global gdb_prompt I think this proc should do the test only once per runtest invocation, and just return a cached result in subsequent calls. Otherwise this looks reasonable to me. Tom