From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2041) id 511433858C2D; Tue, 11 Oct 2022 07:18:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 511433858C2D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1665472688; bh=BHLE2ls020EPHVPPGWWXGdDtjzdvZNNFVQ7FWtlkTko=; h=From:To:Subject:Date:From; b=mYXhiMXG7AhjrDEYekl3mAikyfFy1EaNQkiQegNd/7997RyfrC6R1Mx6insd9TVHf skksJg4KCA3Ns9A7pB6n5DtSU5spPJ9aXXUsGm/yu1XY6esMSeI6yCE26QGL3zMPfd FWPrTI/dOtO6hLIpZmzJqF05g2a7UjYw1UJPr3as= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Vladimir Mezentsev To: bfd-cvs@sourceware.org, gdb-cvs@sourceware.org Subject: [binutils-gdb] gprofng: run tests without installation X-Act-Checkin: binutils-gdb X-Git-Author: Vladimir Mezentsev X-Git-Refname: refs/heads/master X-Git-Oldrev: f6c874187a5a8b6f7108fff3b668395de45f9904 X-Git-Newrev: a665c4d5c6e1d23d31ac434949b9243025496aef Message-Id: <20221011071808.511433858C2D@sourceware.org> Date: Tue, 11 Oct 2022 07:18:08 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Da665c4d5c6e1= d23d31ac434949b9243025496aef commit a665c4d5c6e1d23d31ac434949b9243025496aef Author: Vladimir Mezentsev Date: Mon Oct 10 12:57:19 2022 -0700 gprofng: run tests without installation =20 gprofng/ChangeLog 2022-10-10 Vladimir Mezentsev =20 PR gprofng/29107 * testsuite/config/default.exp: Set up environment to run gprof= ng tests without installation. * testsuite/lib/Makefile.skel: Likewise. * testsuite/lib/display-lib.exp: Likewise. Diff: --- gprofng/testsuite/config/default.exp | 6 ++++-- gprofng/testsuite/lib/Makefile.skel | 3 +-- gprofng/testsuite/lib/display-lib.exp | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/gprofng/testsuite/config/default.exp b/gprofng/testsuite/confi= g/default.exp index 6fde0a1223f..b9513aefc0f 100644 --- a/gprofng/testsuite/config/default.exp +++ b/gprofng/testsuite/config/default.exp @@ -32,7 +32,9 @@ if {![info exists CFLAGS]} { set CFLAGS "-g -O2" } =20 -# 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 .. inst= all-gprofng program_transform_name=3D DESTDIR=3D`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 ../libcol= lector/.libs lib/gprofng\"" +remote_exec host "sh -c \"rm -f bin; ln -s src bin\"" =20 load_lib display-lib.exp diff --git a/gprofng/testsuite/lib/Makefile.skel b/gprofng/testsuite/lib/Ma= kefile.skel index 157f6f60c84..035d320f35f 100644 --- a/gprofng/testsuite/lib/Makefile.skel +++ b/gprofng/testsuite/lib/Makefile.skel @@ -39,8 +39,7 @@ DISPLAY =3D $(GPROFNG) display text EXPERIMENT =3D test.er DISPLAY_LOG =3D display.log =20 -gprofng_dir :=3D $(shell dirname $$(find ../root -name libgprofng.so.0 | h= ead -1)) -export LD_LIBRARY_PATH :=3D $(gprofng_dir):$(gprofng_dir)/.. +export LD_LIBRARY_PATH :=3D $(BUILDDIR)/src =20 # Set GPROFNG_SYSCONFDIR to find out gprofng.rc: export GPROFNG_SYSCONFDIR :=3D $(srcdir)/../../../src diff --git a/gprofng/testsuite/lib/display-lib.exp b/gprofng/testsuite/lib/= display-lib.exp index 38ecb8d258e..d103f0fe247 100644 --- a/gprofng/testsuite/lib/display-lib.exp +++ b/gprofng/testsuite/lib/display-lib.exp @@ -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 =20 set fd [open "$tdir/rules.txt" "w"] switch -regexp -- $testdir {