gprofng: Set LD_LIBRARY_PATH, GPROFNG_SYSCONFDIR for all tests

Message ID 20230825150703.3414527-1-vladimir.mezentsev@oracle.com
State New
Headers
Series gprofng: Set LD_LIBRARY_PATH, GPROFNG_SYSCONFDIR for all tests |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_binutils_check--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_binutils_check--master-arm success Testing passed
linaro-tcwg-bot/tcwg_binutils_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 success Testing passed

Commit Message

Vladimir Mezentsev Aug. 25, 2023, 3:07 p.m. UTC
  From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>

Several gprofng tests failed when we built but didn't install gprofng.
We set LD_LIBRARY_PATH, GPROFNG_SYSCONFDIR to find our libraries and
configuration file.
These variables must be set for all gprofng tests.

gprofng/ChangeLog
2023-08-24  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	* testsuite/config/default.exp: Set LD_LIBRARY_PATH, GPROFNG_SYSCONFDIR.
	* testsuite/lib/Makefile.skel: Move LD_LIBRARY_PATH and
	GPROFNG_SYSCONFDIR setting in testsuite/config/default.exp.
---
 gprofng/testsuite/config/default.exp | 4 ++++
 gprofng/testsuite/lib/Makefile.skel  | 5 -----
 2 files changed, 4 insertions(+), 5 deletions(-)
  

Patch

diff --git a/gprofng/testsuite/config/default.exp b/gprofng/testsuite/config/default.exp
index 1c862d54592..f23cb811fce 100644
--- a/gprofng/testsuite/config/default.exp
+++ b/gprofng/testsuite/config/default.exp
@@ -36,6 +36,10 @@  if { "$CHECK_TARGET" == "check-install" } {
     set ::env(GPROFNG) "$PREFIX/bin/gprofng"
 } else {
     set ::env(GPROFNG) "$BUILDDIR/src/gprofng"
+    set ::env(LD_LIBRARY_PATH) "$BUILDDIR/src"
+
+    # Set GPROFNG_SYSCONFDIR to find out gprofng.rc:
+    set ::env(GPROFNG_SYSCONFDIR) "$srcdir/../src"
 }
 
 set TEST_TIMEOUT 300
diff --git a/gprofng/testsuite/lib/Makefile.skel b/gprofng/testsuite/lib/Makefile.skel
index 5a30966c1cd..9ccc0340c10 100644
--- a/gprofng/testsuite/lib/Makefile.skel
+++ b/gprofng/testsuite/lib/Makefile.skel
@@ -39,11 +39,6 @@  DISPLAY	    = $(GPROFNG) display text
 EXPERIMENT  = test.er
 DISPLAY_LOG = display.log
 
-export LD_LIBRARY_PATH := $(BUILDDIR)/src
-
-# Set GPROFNG_SYSCONFDIR to find out gprofng.rc:
-export GPROFNG_SYSCONFDIR := $(srcdir)/../../../src
-
 .PHONY: all collect compare clobber clean
 
 all: compare