public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Fix all PATH problems in testsuite/gdb.perf/
@ 2021-09-24 16:44 Pedro Alves
  0 siblings, 0 replies; only message in thread
From: Pedro Alves @ 2021-09-24 16:44 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=fbfdbdab95001d4a543598a3caa0e0f01e05b83f

commit fbfdbdab95001d4a543598a3caa0e0f01e05b83f
Author: Pedro Alves <pedro@palves.net>
Date:   Mon Jun 21 22:25:58 2021 +0100

    Fix all PATH problems in testsuite/gdb.perf/
    
    Currently "make check-perf" triggers ~40 PATH messages in gdb.sum:
    
      ...
      PATH: gdb.perf/backtrace.exp: python sys.path.insert(0, os.path.abspath("/home/pedro/rocm/gdb/build/gdb/../../src/gdb/testsuite/gdb.perf/lib"))
      PATH: gdb.perf/backtrace.exp: python exec (open ('/home/pedro/rocm/gdb/build/gdb/testsuite/outputs/gdb.perf/backtrace/backtrace.py').read ())
      ...
    
    This commit fixes them.  E.g. before/after gdb.sum diff:
    
     -PASS: gdb.perf/backtrace.exp: python import os, sys
     -PASS: gdb.perf/backtrace.exp: python sys.path.insert(0, os.path.abspath("/home/pedro/rocm/gdb/build-master/gdb/../../src/gdb/testsuite/gdb.perf/lib"))
     -PATH: gdb.perf/backtrace.exp: python sys.path.insert(0, os.path.abspath("/home/pedro/rocm/gdb/build-master/gdb/../../src/gdb/testsuite/gdb.perf/lib"))
     -PASS: gdb.perf/backtrace.exp: python exec (open ('/home/pedro/rocm/gdb/build-master/gdb/testsuite/outputs/gdb.perf/backtrace/backtrace.py').read ())
     -PATH: gdb.perf/backtrace.exp: python exec (open ('/home/pedro/rocm/gdb/build-master/gdb/testsuite/outputs/gdb.perf/backtrace/backtrace.py').read ())
     +PASS: gdb.perf/backtrace.exp: setup perftest: python import os, sys
     +PASS: gdb.perf/backtrace.exp: setup perftest: python sys.path.insert(0, os.path.abspath("${srcdir}/gdb.perf/lib"))
     +PASS: gdb.perf/backtrace.exp: setup perftest: python exec (open ('${srcdir}/gdb.perf/backtrace.py').read ())
    
    gdb/testsuite/
    yyyy-mm-dd  Pedro Alves  <pedro@palves.net>
    
            * lib/perftest.exp (PerfTest::_setup_perftest): Use
            with_test_prefix.  Add explicit test names to python invocations,
            with "$srcdir" not expanded.
    
    Change-Id: I50a31b04b7abdea754139509e4a34ae9263118a4

Diff:
---
 gdb/testsuite/lib/perftest.exp | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/gdb/testsuite/lib/perftest.exp b/gdb/testsuite/lib/perftest.exp
index de995188090..205bcb5f0e3 100644
--- a/gdb/testsuite/lib/perftest.exp
+++ b/gdb/testsuite/lib/perftest.exp
@@ -25,9 +25,15 @@ namespace eval PerfTest {
 	set remote_python_file [gdb_remote_download host ${srcdir}/${subdir}/${testfile}.py]
 
 	# Set sys.path for module perftest.
-	gdb_test_no_output "python import os, sys"
-	gdb_test_no_output "python sys.path.insert\(0, os.path.abspath\(\"${srcdir}/${subdir}/lib\"\)\)"
-	gdb_test_no_output "python exec (open ('${remote_python_file}').read ())"
+	with_test_prefix "setup perftest" {
+	    gdb_test_no_output "python import os, sys"
+	    gdb_test_no_output \
+		"python sys.path.insert\(0, os.path.abspath\(\"${srcdir}/${subdir}/lib\"\)\)" \
+		"python sys.path.insert\(0, os.path.abspath\(\"\${srcdir}/${subdir}/lib\"\)\)"
+	    gdb_test_no_output \
+		"python exec (open ('${remote_python_file}').read ())" \
+		"python exec (open ('\${srcdir}/${subdir}/${testfile}.py').read ())"
+	}
     }
 
     # A private method to do some cleanups when performance test is


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-09-24 16:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-24 16:44 [binutils-gdb] Fix all PATH problems in testsuite/gdb.perf/ Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).