public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: dejagnu runtest and runtest.exp
@ 1997-10-13 18:42 meissner
  1997-10-15 20:16 ` Jeffrey A Law
  0 siblings, 1 reply; 16+ messages in thread
From: meissner @ 1997-10-13 18:42 UTC (permalink / raw)
  To: ian, phdm; +Cc: egcs

| > Philippe De Muyter just posted a patch
| > (< 199710131730.TAA11370@mail.macqel.be >) which should fix that, but I
| > think his patch should be changed to search PATH rather than to rely
| > on the builtin ``type'' command.
| 
| OK, here it is.  With an example it is much easier :)
| Note that I use test -x, not -f as in example Ian provided.  This should
| perhaps be fixed in configure.

If this code is going to run on really old shells, then please change the test
back to -f, as I recall, the older shells on systems such as BSD 4.2 and Ultrix
did not support the full range of test features.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: dejagnu runtest and runtest.exp
  1997-10-13 18:42 dejagnu runtest and runtest.exp meissner
@ 1997-10-15 20:16 ` Jeffrey A Law
  0 siblings, 0 replies; 16+ messages in thread
From: Jeffrey A Law @ 1997-10-15 20:16 UTC (permalink / raw)
  To: meissner; +Cc: ian, phdm, egcs

  In message < 199710140142.VAA27543@tweedledumb.cygnus.com >you write:
  > | > Philippe De Muyter just posted a patch
  > | > (< 199710131730.TAA11370@mail.macqel.be >) which should fix that, but I
  > | > think his patch should be changed to search PATH rather than to rely
  > | > on the builtin ``type'' command.
  > | 
  > | OK, here it is.  With an example it is much easier :)
  > | Note that I use test -x, not -f as in example Ian provided.  This should
  > | perhaps be fixed in configure.
  > 
  > If this code is going to run on really old shells, then please change
  > the test back to -f, as I recall, the older shells on systems such as
  > BSD 4.2 and Ultrix did not support the full range of test features.
Note, we already use -x elsewhere in runtest -- I suspect there's not
much hope for lots of code if a particular shell doesn't support -x.

jeff

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: dejagnu runtest and runtest.exp
  1997-10-18 11:38               ` Manfred Hollstein
  1997-10-19 18:00                 ` Jeffrey A Law
@ 1997-10-19 19:40                 ` Philippe De Muyter
  1 sibling, 0 replies; 16+ messages in thread
From: Philippe De Muyter @ 1997-10-19 19:40 UTC (permalink / raw)
  To: manfred; +Cc: law, ian, egcs

> 
> Philippe,  it's not  easy  with you  :-) In  fact,  you're  right, but
> dejagnu isn't  a native tool.  Of course, we   can fix this particular
> problem in dejagnu's runtest script, but, if we do not pass SHELL down
> to sub-makes life may get difficult for HP-UX users  as well - did you
> hear about the fixed 2k buffer size in that lame sh?

Sorry I wasn't precise enough : I am not against the patch to pass SHELL;
I am only against the idea to force everybody to install bash before being
able to test gcc.

> 
> Manfred
> 


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: dejagnu runtest and runtest.exp
  1997-10-18 11:38               ` Manfred Hollstein
@ 1997-10-19 18:00                 ` Jeffrey A Law
  1997-10-19 19:40                 ` Philippe De Muyter
  1 sibling, 0 replies; 16+ messages in thread
From: Jeffrey A Law @ 1997-10-19 18:00 UTC (permalink / raw)
  To: Manfred Hollstein; +Cc: phdm, ian, egcs

  In message < 199710181837.UAA17920@saturn.s-direktnet.de >you write:
  > Philippe,  it's not  easy  with you  :-) In  fact,  you're  right, but
  > dejagnu isn't  a native tool.  Of course, we   can fix this particular
  > problem in dejagnu's runtest script, but, if we do not pass SHELL down
  > to sub-makes life may get difficult for HP-UX users  as well - did you
  > hear about the fixed 2k buffer size in that lame sh?
I've been working with hpux full time for the last 5 years, the
only time I've seen folks run into the "2k buffer size" problem is
with configure scripts -- I haven't seen any problems with Makefiles
and such.



jeff

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: dejagnu runtest and runtest.exp
  1997-10-18  5:56             ` Philippe De Muyter
@ 1997-10-18 11:38               ` Manfred Hollstein
  1997-10-19 18:00                 ` Jeffrey A Law
  1997-10-19 19:40                 ` Philippe De Muyter
  0 siblings, 2 replies; 16+ messages in thread
From: Manfred Hollstein @ 1997-10-18 11:38 UTC (permalink / raw)
  To: phdm; +Cc: law, ian, egcs

On Sat, 18 October 1997, 14:55:39, phdm@mail.macqel.be wrote:

    >     So, with the patch to runtest to search PATH the patch to pass
    >     SHELL down through FLAGS_TO_PASS shouldn't be needed?
    >     
    >     Sorry if I'm being dense, but I want to make sure this problem
    >     gets addressed correctly and I'm not aware of all the issues.
    >     
    >     jeff
    >     
    > Sorry for being so  late; I had   to enjoy a management  training last
    > week :-)
    > 
    > I still think the SHELL patch is needed. What about if someone passes
    > 
    >   RUNTEST=/anywhere/in/the/NFS/tree/runtest
    > 
    
    Well, you'll get $0 set to /anywhere/in/the/NFS/tree/runtest
    and the PATH scan will not be used.
    
    > on  the  make command  line, which actually  is a  test version (e.g.)
    > only. BUT, it doesn't even appear in any $PATH directory or (worse) in
    > a directory *after*    the official (another)  runtest  version. Which
    > dejagnu config files will then be used?
    > 
    > I think  with this  in  background, the $PATH   hack isn't a  reliable
    > solution, obviously; on  systems with such lame  sh's we should  add a
    > strong advice like:
    > 
    >    If your /bin/sh is a very old (and lame) one, which e.g. doesn't
    >    set $0 for shell scripts to the appropriate value (i.e. the full
    >    pathname), you actually should use GNU bash if you intend to run
    >    make check on your particular target platform!
    > 
    > Do you agree?
    > 
    No.  If we want many testers, it must be possible to test with
    the native tools the user got with his OS.

Philippe,  it's not  easy  with you  :-) In  fact,  you're  right, but
dejagnu isn't  a native tool.  Of course, we   can fix this particular
problem in dejagnu's runtest script, but, if we do not pass SHELL down
to sub-makes life may get difficult for HP-UX users  as well - did you
hear about the fixed 2k buffer size in that lame sh?

Manfred

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: dejagnu runtest and runtest.exp
  1997-10-18  0:28           ` Manfred Hollstein
@ 1997-10-18  5:56             ` Philippe De Muyter
  1997-10-18 11:38               ` Manfred Hollstein
  0 siblings, 1 reply; 16+ messages in thread
From: Philippe De Muyter @ 1997-10-18  5:56 UTC (permalink / raw)
  To: manfred; +Cc: law, ian, egcs

>     So, with the patch to runtest to search PATH the patch to pass
>     SHELL down through FLAGS_TO_PASS shouldn't be needed?
>     
>     Sorry if I'm being dense, but I want to make sure this problem
>     gets addressed correctly and I'm not aware of all the issues.
>     
>     jeff
>     
> Sorry for being so  late; I had   to enjoy a management  training last
> week :-)
> 
> I still think the SHELL patch is needed. What about if someone passes
> 
>   RUNTEST=/anywhere/in/the/NFS/tree/runtest
> 

Well, you'll get $0 set to /anywhere/in/the/NFS/tree/runtest
and the PATH scan will not be used.

> on  the  make command  line, which actually  is a  test version (e.g.)
> only. BUT, it doesn't even appear in any $PATH directory or (worse) in
> a directory *after*    the official (another)  runtest  version. Which
> dejagnu config files will then be used?
> 
> I think  with this  in  background, the $PATH   hack isn't a  reliable
> solution, obviously; on  systems with such lame  sh's we should  add a
> strong advice like:
> 
>    If your /bin/sh is a very old (and lame) one, which e.g. doesn't
>    set $0 for shell scripts to the appropriate value (i.e. the full
>    pathname), you actually should use GNU bash if you intend to run
>    make check on your particular target platform!
> 
> Do you agree?
> 
No.  If we want many testers, it must be possible to test with
the native tools the user got with his OS.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: dejagnu runtest and runtest.exp
  1997-10-15 20:16         ` Jeffrey A Law
@ 1997-10-18  0:28           ` Manfred Hollstein
  1997-10-18  5:56             ` Philippe De Muyter
  0 siblings, 1 reply; 16+ messages in thread
From: Manfred Hollstein @ 1997-10-18  0:28 UTC (permalink / raw)
  To: law; +Cc: ian, phdm, egcs

On Wed, 15 October 1997, 21:17:20, law@hurl.cygnus.com wrote:

    
      In message < 199710131816.OAA06348@subrogation.cygnus.com >you write:
      >    Date: Mon, 13 Oct 1997 12:06:48 -0600
      >    From: Jeffrey A Law <law@cygnus.com>
      > 
      >      In message < 199710111653.SAA00464@saturn.s-direktnet.de >you write:
      >      >     Wed Oct  8 12:40:14 1997  Manfred Hollstein US/EC4 60/1/110 #402
      > 83  <ma
      >      > nfred@lts.sel.alcatel.de>
      >      >     
      >      >     	* config.shared (FLAGS_TO_PASS): Add SHELL.
      >    Is this still needed after installing Ian's patch?
      > 
      > Yes, this is to work around the problem that runtest is invoked with
      > $0 set to simply "runtest" without including a patch.
    So, with the patch to runtest to search PATH the patch to pass
    SHELL down through FLAGS_TO_PASS shouldn't be needed?
    
    Sorry if I'm being dense, but I want to make sure this problem
    gets addressed correctly and I'm not aware of all the issues.
    
    jeff
    
Sorry for being so  late; I had   to enjoy a management  training last
week :-)

I still think the SHELL patch is needed. What about if someone passes

  RUNTEST=/anywhere/in/the/NFS/tree/runtest

on  the  make command  line, which actually  is a  test version (e.g.)
only. BUT, it doesn't even appear in any $PATH directory or (worse) in
a directory *after*    the official (another)  runtest  version. Which
dejagnu config files will then be used?

I think  with this  in  background, the $PATH   hack isn't a  reliable
solution, obviously; on  systems with such lame  sh's we should  add a
strong advice like:

   If your /bin/sh is a very old (and lame) one, which e.g. doesn't
   set $0 for shell scripts to the appropriate value (i.e. the full
   pathname), you actually should use GNU bash if you intend to run
   make check on your particular target platform!

Do you agree?

Manfred

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: dejagnu runtest and runtest.exp
  1997-10-13 13:41       ` Ian Lance Taylor
  1997-10-13 15:02         ` Philippe De Muyter
@ 1997-10-15 20:16         ` Jeffrey A Law
  1997-10-18  0:28           ` Manfred Hollstein
  1 sibling, 1 reply; 16+ messages in thread
From: Jeffrey A Law @ 1997-10-15 20:16 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: manfred, phdm, egcs

  In message < 199710131816.OAA06348@subrogation.cygnus.com >you write:
  >    Date: Mon, 13 Oct 1997 12:06:48 -0600
  >    From: Jeffrey A Law <law@cygnus.com>
  > 
  >      In message < 199710111653.SAA00464@saturn.s-direktnet.de >you write:
  >      >     Wed Oct  8 12:40:14 1997  Manfred Hollstein US/EC4 60/1/110 #402
  > 83  <ma
  >      > nfred@lts.sel.alcatel.de>
  >      >     
  >      >     	* config.shared (FLAGS_TO_PASS): Add SHELL.
  >    Is this still needed after installing Ian's patch?
  > 
  > Yes, this is to work around the problem that runtest is invoked with
  > $0 set to simply "runtest" without including a patch.
So, with the patch to runtest to search PATH the patch to pass
SHELL down through FLAGS_TO_PASS shouldn't be needed?

Sorry if I'm being dense, but I want to make sure this problem
gets addressed correctly and I'm not aware of all the issues.

jeff


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: dejagnu runtest and runtest.exp
  1997-10-13 15:02         ` Philippe De Muyter
@ 1997-10-15 20:14           ` Jeffrey A Law
  0 siblings, 0 replies; 16+ messages in thread
From: Jeffrey A Law @ 1997-10-15 20:14 UTC (permalink / raw)
  To: Philippe De Muyter; +Cc: Ian Lance Taylor, egcs mailing list

  In message < 199710132059.WAA11827@mail.macqel.be >you write:
  > OK, here it is.  With an example it is much easier :)
  > Note that I use test -x, not -f as in example Ian provided.  This should
  > perhaps be fixed in configure.
  > 
  > Mon Oct 13 19:15:41 1997  Philippe De Muyter  <phdm@macqel.be>
  > 
  > 	* runtest (mypath): Scan $PATH to set mypath if $0 does not give it.
Thanks.  I've installed this patch.

jeff

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: dejagnu runtest and runtest.exp
  1997-10-13 13:41       ` Ian Lance Taylor
@ 1997-10-13 15:02         ` Philippe De Muyter
  1997-10-15 20:14           ` Jeffrey A Law
  1997-10-15 20:16         ` Jeffrey A Law
  1 sibling, 1 reply; 16+ messages in thread
From: Philippe De Muyter @ 1997-10-13 15:02 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: egcs mailing list

> Philippe De Muyter just posted a patch
> (< 199710131730.TAA11370@mail.macqel.be >) which should fix that, but I
> think his patch should be changed to search PATH rather than to rely
> on the builtin ``type'' command.

OK, here it is.  With an example it is much easier :)
Note that I use test -x, not -f as in example Ian provided.  This should
perhaps be fixed in configure.

Mon Oct 13 19:15:41 1997  Philippe De Muyter  <phdm@macqel.be>

	* runtest (mypath): Scan $PATH to set mypath if $0 does not give it.

--- ./dejagnu/runtest	Mon Oct 13 22:45:59 1997
+++ ./dejagnu/runtest	Mon Oct 13 22:44:12 1997
@@ -7,13 +7,30 @@
 #
 # Get the execution path to this script and the current directory.
 #
-execpath=`echo ${0-.} | sed  -e 's@/[^/]*$@@'`
+mypath=${0-.}
+if expr ${mypath} : '.*/.*' > /dev/null
+then
+    :
+else
+    IFS="${IFS= 	}"; save_ifs="$IFS"; IFS="${IFS}:"
+    for dir in $PATH
+    do
+	test -z "$dir" && dir=.
+	if test -x $dir/$mypath
+	then
+	    mypath=$dir/$mypath
+	    break
+	fi
+    done
+    IFS="$save_ifs"
+fi
+execpath=`echo ${mypath} | sed  -e 's@/[^/]*$@@'`
 # rootme=`pwd`
 
 #
 # get the name by which runtest was invoked and extract the config triplet
 #
-runtest=`echo ${0-.} | sed -e 's@^.*/@@'`
+runtest=`echo ${mypath} | sed -e 's@^.*/@@'`
 target=`echo $runtest | sed -e 's/-runtest$//'`
 if [ "$target" != runtest ] ; then
     target="--target ${target}"

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: dejagnu runtest and runtest.exp
  1997-10-10  9:08 ` Ian Lance Taylor
  1997-10-11 10:12   ` Manfred Hollstein
@ 1997-10-13 15:02   ` Philippe De Muyter
  1 sibling, 0 replies; 16+ messages in thread
From: Philippe De Muyter @ 1997-10-13 15:02 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: egcs

> 
> On many systems, if a shell script is invoked because it is found on
> PATH, $0 is set with the PATH element prepended to the script name.

Well, for me this is not true with ksh on AIX or on sysV68.  Perhaps, as
Manfred Hollstein suggested does this work only with bash.

> Evidently that is not true on your system.
> 
> I think that if runtest finds that $0 is just "runtest", it should
> look through PATH looking for itself.
> 

Here is a possible patch to do that :

Mon Oct 13 19:15:41 1997  Philippe De Muyter  <phdm@macqel.be>

	* runtest (mypath): Use `type' to set mypath if $0 does not give it.

--- ./dejagnu/runtest   Mon Oct 13 19:11:47 1997
+++ ./dejagnu/runtest	Mon Oct 13 17:15:48 1997
@@ -7,13 +7,26 @@
 #
 # Get the execution path to this script and the current directory.
 #
-execpath=`echo ${0-.} | sed  -e 's@/[^/]*$@@'`
+mypath=${0-.}
+if expr ${mypath} : '.*/.*' > /dev/null
+then
+	:
+else
+	# I don't know if `type' is very portable, but it must only work
+	# for shells that do not set $0 to the full path of this script
+	# The hard way would be to parse $PATH and use test -x $path/$mypath
+	mypath=`type "$mypath"`
+	# The following extracts the full pathname from
+	# "xxx is .* /full/path/to/xxx" or "xxx is .* (/full/path/to/xxx)"
+	mypath=`expr "$mypath" : '.* (*\(.*[^)]\))*'`
+fi
+execpath=`echo ${mypath} | sed  -e 's@/[^/]*$@@'`
 # rootme=`pwd`
 
 #
 # get the name by which runtest was invoked and extract the config triplet
 #
-runtest=`echo ${0-.} | sed -e 's@^.*/@@'`
+runtest=`echo ${mypath} | sed -e 's@^.*/@@'`
 target=`echo $runtest | sed -e 's/-runtest$//'`
 if [ "$target" != runtest ] ; then
     target="--target ${target}"


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: dejagnu runtest and runtest.exp
  1997-10-13 11:05     ` Jeffrey A Law
@ 1997-10-13 13:41       ` Ian Lance Taylor
  1997-10-13 15:02         ` Philippe De Muyter
  1997-10-15 20:16         ` Jeffrey A Law
  0 siblings, 2 replies; 16+ messages in thread
From: Ian Lance Taylor @ 1997-10-13 13:41 UTC (permalink / raw)
  To: law; +Cc: manfred, phdm, egcs

   Date: Mon, 13 Oct 1997 12:06:48 -0600
   From: Jeffrey A Law <law@cygnus.com>

     In message < 199710111653.SAA00464@saturn.s-direktnet.de >you write:
     >     Wed Oct  8 12:40:14 1997  Manfred Hollstein US/EC4 60/1/110 #40283  <ma
     > nfred@lts.sel.alcatel.de>
     >     
     >     	* config.shared (FLAGS_TO_PASS): Add SHELL.
   Is this still needed after installing Ian's patch?

Yes, this is to work around the problem that runtest is invoked with
$0 set to simply "runtest" without including a patch.

Philippe De Muyter just posted a patch
(< 199710131730.TAA11370@mail.macqel.be >) which should fix that, but I
think his patch should be changed to search PATH rather than to rely
on the builtin ``type'' command.  There are examples of how to search
PATH in the top level configure script; here is one:

	  IFS="${IFS=	}"; save_ifs="$IFS"; IFS="${IFS}:"
	  for dir in $PATH; do
	    test -z "$dir" && dir=.
	    if test -f $dir/$prog; then
	      CONFIG_SHELL=$dir/$prog
	      export CONFIG_SHELL
	      break
	    fi
	  done
	  IFS="$save_ifs"

Ian

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: dejagnu runtest and runtest.exp
  1997-10-11 10:12   ` Manfred Hollstein
@ 1997-10-13 11:05     ` Jeffrey A Law
  1997-10-13 13:41       ` Ian Lance Taylor
  0 siblings, 1 reply; 16+ messages in thread
From: Jeffrey A Law @ 1997-10-13 11:05 UTC (permalink / raw)
  To: Manfred Hollstein; +Cc: phdm, ian, egcs

  In message < 199710111653.SAA00464@saturn.s-direktnet.de >you write:
  >     Wed Oct  8 12:40:14 1997  Manfred Hollstein US/EC4 60/1/110 #40283  <ma
  > nfred@lts.sel.alcatel.de>
  >     
  >     	* config.shared (FLAGS_TO_PASS): Add SHELL.
Is this still needed after installing Ian's patch?

jeff

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: dejagnu runtest and runtest.exp
  1997-10-10  9:08 ` Ian Lance Taylor
@ 1997-10-11 10:12   ` Manfred Hollstein
  1997-10-13 11:05     ` Jeffrey A Law
  1997-10-13 15:02   ` Philippe De Muyter
  1 sibling, 1 reply; 16+ messages in thread
From: Manfred Hollstein @ 1997-10-11 10:12 UTC (permalink / raw)
  To: phdm; +Cc: ian, egcs

On Fri, 10 October 1997, 12:08:28, ian@cygnus.com wrote:

       Date: Fri, 10 Oct 1997 13:17:24 +0200 (MET DST)
       From: "Philippe De Muyter" <phdm@mail.macqel.be>
    
       That is not true; runtest.exp exists and is located in /usr/local/share/dejagnu,
       but runtest does not find it because it does not look there !!!
       I can see runtest trying to find its installation directory by looking
       at $0, but as it is invoked as runtest, $0 is merely runtest; that
       is not very useful.  Why does it not look directly in a hard-coded
       directory written in runtest script at instatllation time ?
    
    On many systems, if a shell script is invoked because it is found on
    PATH, $0 is set with the PATH element prepended to the script name.
    Evidently that is not true on your system.
    
    I think that if runtest finds that $0 is just "runtest", it should
    look through PATH looking for itself.
    
    A hard coded data directory could be another backup to search.  In
    general, though, I think it's best to avoid hard coded paths when
    possible, since it makes it difficult to move the installed
    directories to another disk or another machine.
    
Ian is right. I sent a small patch that fixes this problem. But you
should have an installed bash handy for this to work.

On Wed, 8 October 1997, 13:46:46, manfred@ks.sel.alcatel.de wrote:

    Hi there,
    
    running make check on a system whose /bin/sh doesn't set $0 to a shell
    script's full pathname, runtest will not be able find runtest.exp, and
    hence the check will fail.   Setting SHELL=/anywhere/bash doesn't help
    either, because the  libraries/.../Makefiles don't  add SHELL=$(SHELL)
    to FLAGS_TO_PASS.
    
    Wed Oct  8 12:40:14 1997  Manfred Hollstein US/EC4 60/1/110 #40283  <manfred@lts.sel.alcatel.de>
    
    	* config.shared (FLAGS_TO_PASS): Add SHELL.
    
    *** egcs-970929/libio/config.shared.orig	Wed Oct  8 13:41:51 1997
    --- egcs-970929/libio/config.shared	Mon Oct  6 09:14:53 1997
    *************** if [ "${SUBDIRS}" != "" ] ; then
    *** 207,212 ****
    --- 207,213 ----
        echo '# overrides thouh $(MAKE)) but may be needed by older versions.'
        echo ''
        echo 'FLAGS_TO_PASS= \'
    +   echo '	"SHELL=$(SHELL)" \'
        echo '	"INSTALL=$(INSTALL)" \'
        echo '	"INSTALL_DATA=$(INSTALL_DATA)" \'
        echo '	"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \'

-- 
 Manfred Hollstein       If you have any questions about GNU software:
 Hindenburgstr. 13/1                   < mailto:manfred@s-direktnet.de >
 75446 Wiernsheim, FRG  < http://www.s-direktnet.de/HomePages/manfred/ >
 PGP key:    < http://www.s-direktnet.de/HomePages/manfred/manfred.asc >

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: dejagnu runtest and runtest.exp
  1997-10-10  8:51 Philippe De Muyter
@ 1997-10-10  9:08 ` Ian Lance Taylor
  1997-10-11 10:12   ` Manfred Hollstein
  1997-10-13 15:02   ` Philippe De Muyter
  0 siblings, 2 replies; 16+ messages in thread
From: Ian Lance Taylor @ 1997-10-10  9:08 UTC (permalink / raw)
  To: phdm; +Cc: egcs

   Date: Fri, 10 Oct 1997 13:17:24 +0200 (MET DST)
   From: "Philippe De Muyter" <phdm@mail.macqel.be>

   That is not true; runtest.exp exists and is located in /usr/local/share/dejagnu,
   but runtest does not find it because it does not look there !!!
   I can see runtest trying to find its installation directory by looking
   at $0, but as it is invoked as runtest, $0 is merely runtest; that
   is not very useful.  Why does it not look directly in a hard-coded
   directory written in runtest script at instatllation time ?

On many systems, if a shell script is invoked because it is found on
PATH, $0 is set with the PATH element prepended to the script name.
Evidently that is not true on your system.

I think that if runtest finds that $0 is just "runtest", it should
look through PATH looking for itself.

A hard coded data directory could be another backup to search.  In
general, though, I think it's best to avoid hard coded paths when
possible, since it makes it difficult to move the installed
directories to another disk or another machine.

Ian

^ permalink raw reply	[flat|nested] 16+ messages in thread

* dejagnu runtest and runtest.exp
@ 1997-10-10  8:51 Philippe De Muyter
  1997-10-10  9:08 ` Ian Lance Taylor
  0 siblings, 1 reply; 16+ messages in thread
From: Philippe De Muyter @ 1997-10-10  8:51 UTC (permalink / raw)
  To: egcs mailing list

I have recently installed the last dejagnu snapshot (using the patches I
have posted and moving manually data files from /usr/local/share to
/usr/local/share/dejagnu where they ought to be), but running runtest
still fails with :

	ERROR: runtest.exp does not exist.

That is not true; runtest.exp exists and is located in /usr/local/share/dejagnu,
but runtest does not find it because it does not look there !!!
I can see runtest trying to find its installation directory by looking
at $0, but as it is invoked as runtest, $0 is merely runtest; that
is not very useful.  Why does it not look directly in a hard-coded
directory written in runtest script at instatllation time ?

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~1997-10-19 19:40 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-10-13 18:42 dejagnu runtest and runtest.exp meissner
1997-10-15 20:16 ` Jeffrey A Law
  -- strict thread matches above, loose matches on Subject: below --
1997-10-10  8:51 Philippe De Muyter
1997-10-10  9:08 ` Ian Lance Taylor
1997-10-11 10:12   ` Manfred Hollstein
1997-10-13 11:05     ` Jeffrey A Law
1997-10-13 13:41       ` Ian Lance Taylor
1997-10-13 15:02         ` Philippe De Muyter
1997-10-15 20:14           ` Jeffrey A Law
1997-10-15 20:16         ` Jeffrey A Law
1997-10-18  0:28           ` Manfred Hollstein
1997-10-18  5:56             ` Philippe De Muyter
1997-10-18 11:38               ` Manfred Hollstein
1997-10-19 18:00                 ` Jeffrey A Law
1997-10-19 19:40                 ` Philippe De Muyter
1997-10-13 15:02   ` Philippe De Muyter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).