[LLVMdev] Need advise on adding tests - Was: Re: ARM MC .s status?

Jason Kim jasonwkim at google.com
Thu Sep 16 17:05:56 PDT 2010


Hi everyone,

I am trying to get up to speed on the MC object file emission for ARM,
the first cut being for ELF, and the testing required for that.

Obviously, we want the tests for the .o emission to ultimately test
the entire .ll -> many llvm passes -> .bc -> .o, but as a first cut,
my instinct tells me that a simple .cpp unit tests that directly
invokes the MC code to generate (and self-check) the ARM ELF might be
the way to go, but I am wondering where the best place for something
like this is? I.e. From what I can tell, in the test-suite, even
single file .c files are (according to the readme at least) are run as
integration tests that compare llvm .bc / lli output to th eoutput of
a native compile ...

The testing document in llvm.org only talk about pretty heavy weight
integration tests (Tcl + FileCheck, .cpp -> (many compilers  ...)
which is fine, but, but as a sanity check, I can't seem to find an
example of a test.cpp file that invokes a certain subset of LLVM API,
and self-checks the result - Or is the heavyweight "compile a .cpp
file and cross check LLVM-clang's output to gcc" the only way
something like this supported?

Thanks,

-Jason.
-jason



More information about the llvm-dev mailing list