gprofng: run tests without installation

gprofng/ChangeLog
2022-10-10  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	PR gprofng/29107
	* testsuite/config/default.exp: Set up environment to run gprofng tests
	without installation.
	* testsuite/lib/Makefile.skel: Likewise.
	* testsuite/lib/display-lib.exp: Likewise.
This commit is contained in:
Vladimir Mezentsev 2022-10-10 12:57:19 -07:00
parent f6c874187a
commit a665c4d5c6
3 changed files with 6 additions and 5 deletions

View File

@ -32,7 +32,9 @@ if {![info exists CFLAGS]} {
set CFLAGS "-g -O2"
}
# Make a temporary install dir to run gprofng from, and point at it
remote_exec host "sh -c \"rm -rf tmpdir; mkdir -p tmpdir; $MAKE -C .. install-gprofng program_transform_name= DESTDIR=`pwd`/tmpdir/root\""
# Create directories where gprofng can find libraries and binaries:
remote_exec host "sh -c \"rm -rf tmpdir; mkdir -p tmpdir\""
remote_exec host "sh -c \"mkdir -p lib; rm -f lib/gprofng; ln -s ../libcollector/.libs lib/gprofng\""
remote_exec host "sh -c \"rm -f bin; ln -s src bin\""
load_lib display-lib.exp

View File

@ -39,8 +39,7 @@ DISPLAY = $(GPROFNG) display text
EXPERIMENT = test.er
DISPLAY_LOG = display.log
gprofng_dir := $(shell dirname $$(find ../root -name libgprofng.so.0 | head -1))
export LD_LIBRARY_PATH := $(gprofng_dir):$(gprofng_dir)/..
export LD_LIBRARY_PATH := $(BUILDDIR)/src
# Set GPROFNG_SYSCONFDIR to find out gprofng.rc:
export GPROFNG_SYSCONFDIR := $(srcdir)/../../../src

View File

@ -58,7 +58,7 @@ proc run_display_test { dir cflags gprofflags } {
set tdir "tmpdir/$testdir"
send_log "create dir: $tdir\n"
set output [run_native_host_cmd "mkdir -p $tdir"]
set gprofng [exec find $BUILDDIR/tmpdir -type f -name gprofng -perm -u+x | head -1]
set gprofng $BUILDDIR/src/gprofng
set fd [open "$tdir/rules.txt" "w"]
switch -regexp -- $testdir {