Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port F18 unittests to gtest #995

Open
RichBarton-Arm opened this issue Feb 20, 2020 · 7 comments
Open

Port F18 unittests to gtest #995

RichBarton-Arm opened this issue Feb 20, 2020 · 7 comments

Comments

@RichBarton-Arm
Copy link
Contributor

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.

@Sameeranjoshi
Copy link
Contributor

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.

@Sameeranjoshi
Copy link
Contributor

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?

@RichBarton-Arm
Copy link
Contributor Author

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
Copy link
Contributor

@RichBarton-Arm
Copy link
Contributor Author

@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.

@banach-space
Copy link
Collaborator

A fresh patch in this direction: https://reviews.llvm.org/D97403

Thank you @ashermancinelli!

banach-space pushed a commit to llvm/llvm-project that referenced this issue Mar 29, 2021
Better document each test in output formatting tests. Use GTest primitives and infrastructure in same
spirit as [[ https://reviews.llvm.org/D97403 | D97403 ]]. [[ flang-compiler/f18#995 (comment) | See legacy github issue linked here ]] for additional context. Reorganize long test cases to be more readable.

Reviewed By: awarzynski, klausler

Differential Revision: https://reviews.llvm.org/D98303
MatteCarra pushed a commit to MatteCarra/llvm-project that referenced this issue Mar 30, 2021
Better document each test in output formatting tests. Use GTest primitives and infrastructure in same
spirit as [[ https://reviews.llvm.org/D97403 | D97403 ]]. [[ flang-compiler/f18#995 (comment) | See legacy github issue linked here ]] for additional context. Reorganize long test cases to be more readable.

Reviewed By: awarzynski, klausler

Differential Revision: https://reviews.llvm.org/D98303
arichardson pushed a commit to CTSRD-CHERI/llvm-project that referenced this issue Apr 19, 2021
Better document each test in output formatting tests. Use GTest primitives and infrastructure in same
spirit as [[ https://reviews.llvm.org/D97403 | D97403 ]]. [[ flang-compiler/f18#995 (comment) | See legacy github issue linked here ]] for additional context. Reorganize long test cases to be more readable.

Reviewed By: awarzynski, klausler

Differential Revision: https://reviews.llvm.org/D98303
@banach-space
Copy link
Collaborator

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 :)

mem-frob pushed a commit to draperlaboratory/hope-llvm-project that referenced this issue Oct 7, 2022
Better document each test in output formatting tests. Use GTest primitives and infrastructure in same
spirit as [[ https://reviews.llvm.org/D97403 | D97403 ]]. [[ flang-compiler/f18#995 (comment) | See legacy github issue linked here ]] for additional context. Reorganize long test cases to be more readable.

Reviewed By: awarzynski, klausler

Differential Revision: https://reviews.llvm.org/D98303
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants