This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: dejagnu runtest and runtest.exp


   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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]