0

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?

1

1 Answer 1

0

Well, what about doing something like

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.