From f74ea2dc7994b4867f7ab45169e1b2422072cc92 Mon Sep 17 00:00:00 2001 From: Yuriy Kolerov Date: Thu, 28 Jul 2016 20:57:09 +0300 Subject: [PATCH] Allow setting an arbitary value for blddirffi in testsuite It is useful when tests are executed not from build directory. So the path of the build directory may be passed through site.exp or runtest. Signed-off-by: Yuriy Kolerov --- testsuite/lib/libffi.exp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/testsuite/lib/libffi.exp b/testsuite/lib/libffi.exp index de91e3b..6e5f7a4 100644 --- a/testsuite/lib/libffi.exp +++ b/testsuite/lib/libffi.exp @@ -102,11 +102,14 @@ proc libffi-init { args } { global ld_library_path global compiler_vendor - set blddirffi [pwd]/.. + if ![info exists blddirffi] { + set blddirffi [pwd]/.. + } + verbose "libffi $blddirffi" # Which compiler are we building with? - set tmp [grep ../config.log "^ax_cv_c_compiler_vendor.*$"] + set tmp [grep "$blddirffi/config.log" "^ax_cv_c_compiler_vendor.*$"] regexp -- {^[^=]*=(.*)$} $tmp nil compiler_vendor if { [string match $compiler_vendor "gnu"] } {