From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6101 invoked by alias); 16 Jan 2003 02:05:46 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 6022 invoked from network); 16 Jan 2003 02:05:44 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 16 Jan 2003 02:05:44 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h0G1bNB05511 for ; Wed, 15 Jan 2003 20:37:23 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h0G25ia29913 for ; Wed, 15 Jan 2003 21:05:44 -0500 Received: from localhost.redhat.com (romulus-int.sfbay.redhat.com [172.16.27.46]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h0G25h313652 for ; Wed, 15 Jan 2003 21:05:43 -0500 Received: by localhost.redhat.com (Postfix, from userid 469) id 51549FF79; Wed, 15 Jan 2003 21:10:04 -0500 (EST) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15910.5244.45739.864752@localhost.redhat.com> Date: Thu, 16 Jan 2003 02:05:00 -0000 To: gdb-patches@sources.redhat.com Cc: carlton@math.stanford.edu Subject: [PATCH] Make tests more flexible X-SW-Source: 2003-01/txt/msg00590.txt.bz2 David, try this, if it works for you I'll check it in as obvious. Elena 2003-01-15 Elena Zannoni * gdb.base/until.exp: Set variable 'srcfile' differently, to allow for different test tree configurations. Update some tescases accordingly. * gdb.base/advance.exp: Ditto. Index: advance.exp =================================================================== RCS file: /cvs/uberbaum/gdb/testsuite/gdb.base/advance.exp,v retrieving revision 1.1 diff -u -p -r1.1 advance.exp --- advance.exp 15 Jan 2003 14:25:11 -0000 1.1 +++ advance.exp 16 Jan 2003 02:02:23 -0000 @@ -24,11 +24,11 @@ if $tracelevel then { } set testfile advance -set srcfile ${srcdir}/${subdir}/${testfile}.c +set srcfile ${testfile}.c set binfile ${objdir}/${subdir}/${testfile} remote_exec build "rm -f ${binfile}" -if { [gdb_compile "${srcfile}" "${binfile}" executable {debug}] != "" } { +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." } Index: until.exp =================================================================== RCS file: /cvs/uberbaum/gdb/testsuite/gdb.base/until.exp,v retrieving revision 1.1 diff -u -p -r1.1 until.exp --- until.exp 15 Jan 2003 14:25:10 -0000 1.1 +++ until.exp 16 Jan 2003 02:04:54 -0000 @@ -24,11 +24,11 @@ if $tracelevel then { } set testfile break -set srcfile ${srcdir}/${subdir}/${testfile}.c +set srcfile ${testfile}.c set binfile ${objdir}/${subdir}/${testfile} remote_exec build "rm -f ${binfile}" -if { [gdb_compile "${srcfile}" "${binfile}" executable {debug}] != "" } { +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." } @@ -63,7 +63,7 @@ delete_breakpoints # frame. # gdb_test "until 99" \ - "factorial.*value=720.*at ${srcfile}:99.*return \\(value\\)." \ + "factorial.*value=720.*at.*${srcfile}:99.*return \\(value\\)." \ "until factorial, recursive function" # Run to a function called by main @@ -76,6 +76,6 @@ delete_breakpoints # stop at main, the caller, where we put the 'guard' breakpoint. # gdb_test "until marker3" \ - "$hex in main.*argc.*argv.*envp.*at ${srcfile}:82.*marker2 \\(43\\)." \ + "$hex in main.*argc.*argv.*envp.*at.*${srcfile}:82.*marker2 \\(43\\)." \ "until func, not called by current frame"