Open RichBarton-Arm opened 4 years ago
Hi @RichBarton-Arm is someone working on this currently? I was in need of at least a basic framework for adding FIR gtest. By basic I mean the Cmake file changes, so we can run at least a single test.
This ticket seems like we need a port of all unittests/ files into a gtest based framework, but given that there is no unittest framework using gtest, should we have that first?
Hi @Sameeranjoshi Currently there is nobody working on this so it is up for grabs. Adding the gtest framework with a single test would definitely be a good start. We could then work on migration across from ctest to gtest once we have a target to aim at. Please feel free to claim it and move it to in progress.
@Sameeranjoshi has committed https://reviews.llvm.org/D80377 which puts the infrastructure in place. All new tests can be added as gtest tests. We now need to port the existing tests over to this format.
A fresh patch in this direction: https://reviews.llvm.org/D97403
Thank you @ashermancinelli!
https://reviews.llvm.org/D105315 concludes the porting of flang/unittests/Runtime
. Massive thank you to @ashermancinelli for the enormous effort!
We still need to port flang/unittests/Decimal
and flang/unittests/Evaluate
. Please volunteer :)
After #941 is complete, F18 will have a directory unittests that contain tests written in C++ that wrap various internals of F18's runtime or shared utilities in a test harness and test them. This is supported by some custom test harness code.
LLVM projects use the gtest framework for tests of this type. See https://github.com/llvm/llvm-project/tree/master/clang/unittests for an example of this.
The F18 tests need to be ported to also use this framework.