From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2041) id 8FEC338560A9; Thu, 7 Jul 2022 22:51:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8FEC338560A9 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: fix regression in testing for not yet installed version X-Act-Checkin: binutils-gdb X-Git-Author: Vladimir Mezentsev X-Git-Refname: refs/heads/master X-Git-Oldrev: c0abbd96b4dc45249daffbd2b00dfa46cf3fd5aa X-Git-Newrev: 5236c98902ecdcdc043ccaa7ead08e85e478fd65 Message-Id: <20220707225133.8FEC338560A9@sourceware.org> Date: Thu, 7 Jul 2022 22:51:33 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jul 2022 22:51:33 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D5236c98902ec= dcdc043ccaa7ead08e85e478fd65 commit 5236c98902ecdcdc043ccaa7ead08e85e478fd65 Author: Vladimir Mezentsev Date: Thu Jul 7 13:20:39 2022 -0700 gprofng: fix regression in testing for not yet installed version =20 gprofng/ChangeLog 2022-07-07 Vladimir Mezentsev =20 * src/Settings.cc (Settings::read_rc): Read environment variable GPROFNG_SYSCONFDIR. * testsuite/lib/Makefile.skel: Export GPROFNG_SYSCONFDIR. * testsuite/gprofng.display/display.exp: Shorten the list of te= sts. Diff: --- gprofng/src/Settings.cc | 5 ++++- gprofng/testsuite/gprofng.display/display.exp | 22 ++++------------------ gprofng/testsuite/lib/Makefile.skel | 3 +++ 3 files changed, 11 insertions(+), 19 deletions(-) diff --git a/gprofng/src/Settings.cc b/gprofng/src/Settings.cc index 39cb806dd4e..572997f8a88 100644 --- a/gprofng/src/Settings.cc +++ b/gprofng/src/Settings.cc @@ -407,7 +407,10 @@ Settings::read_rc (bool ipc_or_rdt_mode) free (rc_path); =20 // Read system-wide file - rc_path =3D dbe_sprintf (NTXT ("%s/gprofng.rc"), SYSCONFDIR); + const char *sysconfdir =3D getenv("GPROFNG_SYSCONFDIR"); + if (sysconfdir =3D=3D NULL) + sysconfdir =3D SYSCONFDIR; + rc_path =3D dbe_sprintf (NTXT ("%s/gprofng.rc"), sysconfdir); if (access (rc_path, R_OK | F_OK) !=3D 0) { StringBuilder sb; diff --git a/gprofng/testsuite/gprofng.display/display.exp b/gprofng/testsu= ite/gprofng.display/display.exp index dfb383e9fc6..8ba03935867 100644 --- a/gprofng/testsuite/gprofng.display/display.exp +++ b/gprofng/testsuite/gprofng.display/display.exp @@ -30,38 +30,24 @@ switch $pltf { # dir cflags gprofflags Others set table { {"jsynprog" "-g -Wall" "-p on -j on"} - {"mttest" "" ""} - {"mttest" "-g -Wall" "-p on"} {"mttest" "-g -O0" "-p on"} - {"mttest" "-g -O" "-p on"} - {"mttest" "-g -O" "-h on"} - {"mttest" "-g -O" "-h on"} - {"mttest" "-g -O" "-p on -h on"} - {"synprog" "" ""} - {"synprog" "-g" "-p on"} + {"mttest" "-g -O0" "-p on -h on"} {"synprog" "-g -O0" "-p on"} - {"synprog" "-g -O" "-p on"} - {"synprog" "-g" "-p on -h on"} - {"synprog" "-g -O0" "-p on -h on"} - {"synprog" "-g -O" "-p on -h on"} + {"synprog" "-g -O0" "-p on -h on"} } } aarch64 { set table { {"jsynprog" "-g -Wall" "-p on -j on"} - {"mttest" "" ""} - {"mttest" "-g -Wall" "-p on"} {"mttest" "-g -O0" "-p on"} - {"mttest" "-g -O" "-p on"} - {"synprog" "" ""} - {"synprog" "-g" "-p on"} - {"synprog" "-g -O" "-p on"} + {"synprog" "-g -O0" "-p on"} } } default { # Columns in the table represent: # dir cflags gprofflags Others set table { + {"jsynprog" "" ""} {"mttest" "" ""} {"synprog" "" ""} } diff --git a/gprofng/testsuite/lib/Makefile.skel b/gprofng/testsuite/lib/Ma= kefile.skel index 7810ba7ed7a..157f6f60c84 100644 --- a/gprofng/testsuite/lib/Makefile.skel +++ b/gprofng/testsuite/lib/Makefile.skel @@ -42,6 +42,9 @@ DISPLAY_LOG =3D display.log gprofng_dir :=3D $(shell dirname $$(find ../root -name libgprofng.so.0 | h= ead -1)) export LD_LIBRARY_PATH :=3D $(gprofng_dir):$(gprofng_dir)/.. =20 +# Set GPROFNG_SYSCONFDIR to find out gprofng.rc: +export GPROFNG_SYSCONFDIR :=3D $(srcdir)/../../../src + .PHONY: all collect compare clobber clean =20 all: compare