tags:

views:

27

answers:

1

I have a series of blackbox tests made from shell scripts (Similar to that of the tests for GNU Hello).

I am trying to get it to generate the flat-profile automatically if the gmon.out is found (and it will be if the project was configured with --enable-prof).

The problem is that the tests are in a different directory then the executable itself, and even though the executable is in the PATH, gprof is unable to located the executable.

Is it possible to somehow force gprof to search the path for the executable or something similar?

A: 

Well, what about doing something like

cd "$(dirname $(which myprg))"
test_it()
cd -
Martin Kopta