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]
Other format: [Raw text]

running bprob.exp tests in a cross-testing environment


While testing a cross-compiler, I had to track down a handful of
failures in gcc.misc-tests/bprob.exp and g++.dg/bprop/bprob.exp.  The
test harness was reporting that the .gcda data files were not being
created after running the instrumented test case.

After some digging, I managed to work out why: the gcov runtime code
wants to create the .gcda file in the same directory that the object
file was created on the build system.  Unless the same directory
structure exists on the target, the gcov runtime code just skips writing
out the data file on exit.

I see a couple of solutions, but would like to discuss them here before
working on a patch:

1. have the bprob.exp test driver create the appropriate directory
   tree on the target (and remove it when finished); or

2. set GCOV_PREFIX when running the test case so that the home
   directory on the target is prefixed.  The test harness would
   need to also prefix the .gcda filename when fetching the data
   file from the target.

Thoughts?

Ben


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