This is the mail archive of the 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]

Re: Understand GCC test process

On 7 October 2015 at 12:38, Sabrina Souto wrote:
> Hi,
> I'm needing to analyze the execution flow of a test, but don't
> understand how the test drivers, e.g., gcc-dg.exp or dg.exp, access
> the source code of GCC. When a test starts, what is the first function
> that is called? How can I know that?

The first function is main(), because the tests just run the compiler.
DejaGnu doesn't access the source code of GCC, it just runs the
compiler executable.

> On another note, I observed the execution traces of some tests from
> gcc.dg testsuite and I realized that more than 60% of the called
> functions are common to all traces of all testes. So, I would like to
> confirm if that happens because the drive is the same (dg.exp)? or if
> there is a common process across all tests.
> Does anyone can clarify the test process of GCC?

At a very high level, DejaGnu just finds a list of test files to be
tested, and then runs the compiler on each of them and checks the
result (does the compiler exit cleanly? Does it produce errors? If it
produces errors, does the test file have directives saying errors are
expected? If errors are expected, do the actual errors match the
expected ones?)

Information on running the tests is at

Information on the content of tests is at

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