Fix all PATH problems in testsuite/gdb.perf/
authorPedro Alves <pedro@palves.net>
Mon, 21 Jun 2021 21:25:58 +0000 (22:25 +0100)
committerPedro Alves <pedro@palves.net>
Fri, 24 Sep 2021 16:35:37 +0000 (17:35 +0100)
commitfbfdbdab95001d4a543598a3caa0e0f01e05b83f
treeca4dcb538051d3d4c894f8493f9c02e231d1ad1d
parentd8767a720e889b4b90f2a8a60a43d9fd400f4478
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
gdb/testsuite/lib/perftest.exp