Reducing testcase sets using GCC
Peter Watkins
peter_watkins@mentor.com
Thu Feb 17 17:17:00 GMT 2011
Our company has a suite of testcases we run before checking in code.
We'd like to reduce the number of tescases we have to run by running
only the testcases affected by the source code changes the developer
made. We have code coverage data for each testcase in the form of
functions covered. i.e. each testcase knows which C++ functions in our
product get called when the testcase executes.
I'm trying to determine which functions got changed in our product based
on the changes a developer made to the source code. So given foo-new.cxx
and foo-old.cxx, I'd like to know which functions are different between
these two.
Presently I'm planning on comparing pre-processed copies of the two
version. i.e. diff foo-new.i foo-old.i. Then from the diff, I'll try to
determine which functions are changed. However I'm not familiar with
GCC's plethora of options and debug outputs.
Does GCC provide an easy way of telling if a function or symbol changed
between two versions of a source file? Has anyone else faced the problem
of reducing a set of testcases given a set of source code changes? How
did you solve the problem?
Thanks,
Peter
More information about the Gcc-help
mailing list