From: Paul Park Date: Mon, 19 Jun 1995 17:39:38 +0000 (+0000) Subject: Fix LD_LIBRARY_PATH in setup_root_shell() X-Git-Tag: krb5-1.0-beta6~1720 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=78dbedf77ee372639dd668077f44dfad48fb0c6c;p=krb5.git Fix LD_LIBRARY_PATH in setup_root_shell() git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6093 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/tests/dejagnu/config/ChangeLog b/src/tests/dejagnu/config/ChangeLog index 525b4ad86..99c33b766 100644 --- a/src/tests/dejagnu/config/ChangeLog +++ b/src/tests/dejagnu/config/ChangeLog @@ -1,4 +1,7 @@ +Mon Jun 19 13:38:27 EDT 1995 Paul Park (pjpark@mit.edu) + * default.exp - Fix setup_root_shell() with LD_LIBRARY_PATH. + Thu Jun 15 18:13:55 EDT 1995 Paul Park (pjpark@mit.edu) * default.exp - Setup and use LD_LIBRARY_PATH, in case we were built with shared libraries. diff --git a/src/tests/dejagnu/config/default.exp b/src/tests/dejagnu/config/default.exp index 1389ad50a..07bbc7bfa 100644 --- a/src/tests/dejagnu/config/default.exp +++ b/src/tests/dejagnu/config/default.exp @@ -312,7 +312,13 @@ proc setup_kerberos_env { } { verbose "KERBEROS_SERVER=$env(KERBEROS_SERVER)" # Tell the dynamic loader where to get our shared libraries - set env(LD_LIBRARY_PATH) "$SHLIBDIR" + if [info exists env(LD_LIBRARY_PATH)] { + set oldpath $env(LD_LIBRARY_PATH) + set env(LD_LIBRARY_PATH) "$SHLIBDIR $env(LD_LIBRARY_PATH)" + } else { + catch "unset oldpath" + set env(LD_LIBRARY_PATH) "$SHLIBDIR" + } verbose "LD_LIBRARY_PATH=$env(LD_LIBRARY_PATH)" return 1 } @@ -964,6 +970,7 @@ proc setup_root_shell { testname } { global rlogin_pid global tmppwd global env + global SHLIBDIR # Make sure we are using the original values of the environment # variables. This means that the caller must call @@ -971,6 +978,16 @@ proc setup_root_shell { testname } { restore_kerberos_env + # Tell the dynamic loader where to get our shared libraries + if [info exists env(LD_LIBRARY_PATH)] { + set oldpath $env(LD_LIBRARY_PATH) + set env(LD_LIBRARY_PATH) "$SHLIBDIR $env(LD_LIBRARY_PATH)" + } else { + catch "unset oldpath" + set env(LD_LIBRARY_PATH) "$SHLIBDIR" + } + verbose "LD_LIBRARY_PATH=$env(LD_LIBRARY_PATH)" + if ![get_hostname] { return 0 } @@ -1077,6 +1094,13 @@ proc setup_root_shell { testname } { } } + # Restore old setting of LD_LIBRARY_PATH + if [info exists oldpath] { + set env(LD_LIBRARY_PATH) $oldpath + catch "unset oldpath" + } else { + catch "unset env(LD_LIBRARY_PATH)" + } expect_after return 1