[PATCH] D97566: [WIP][RGT] Rotten Green Test checking for LLVM and Clang unittests

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 26 10:33:41 PST 2021


probinson created this revision.
probinson added reviewers: MaskRay, dblaikie.
Herald added a subscriber: mgrang.
probinson requested review of this revision.
Herald added projects: clang, LLVM.
Herald added a subscriber: cfe-commits.

This is an enhancement of the 'googletest' support code, to report
test assertions (EXPECT_* and ASSERT_* macros) that are not executed.
An un-executed assertion looks like it tests something, and passes (so
is "green") but actually does nothing (so is "rotten").

Due to the number of false positives (for example, all DISABLED tests
will be reported as rotten), running the unittests under lit will
*not* report rotten tests; however, running a unittest program
manually (not under lit) will report these by default.

The RGT support has been tried on Linux using both Clang and GCC as
build compilers, and on Windows with MSVC.  MachO has not been tried.

The intent is to clean up more of the false positives before seeking
to commit the RGT support.  Some of this work has been done already.

This is a Work-In-Progress, not ready for final review, but it seems
mature enough to present to the community in its current form.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D97566

Files:
  clang/test/Unit/lit.cfg.py
  clang/unittests/ASTMatchers/ASTMatchersInternalTest.cpp
  clang/unittests/Tooling/Syntax/MutationsTest.cpp
  llvm/test/Unit/lit.cfg.py
  llvm/unittests/Support/ProgramTest.cpp
  llvm/utils/unittest/googletest/include/gtest/gtest.h
  llvm/utils/unittest/googletest/include/gtest/gtest_pred_impl.h
  llvm/utils/unittest/googletest/include/gtest/internal/gtest-internal.h
  llvm/utils/unittest/googletest/include/gtest/internal/rgt.h
  llvm/utils/unittest/googletest/src/gtest-all.cc
  llvm/utils/unittest/googletest/src/gtest-internal-inl.h
  llvm/utils/unittest/googletest/src/gtest.cc
  llvm/utils/unittest/googletest/src/rgt.cc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97566.326730.patch
Type: text/x-patch
Size: 29366 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210226/da06d629/attachment.bin>


More information about the llvm-commits mailing list