[all-commits] [llvm/llvm-project] 7fc871: [unittests] Use GTEST_SKIP() instead of return whe...

Paul T Robinson via All-commits all-commits at lists.llvm.org
Wed Jan 25 13:59:17 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7fc871591f1399cd88ff301ed84fa67dc3bf7a6b
      https://github.com/llvm/llvm-project/commit/7fc871591f1399cd88ff301ed84fa67dc3bf7a6b
  Author: Paul Robinson <paul.robinson at sony.com>
  Date:   2023-01-25 (Wed, 25 Jan 2023)

  Changed paths:
    M llvm/unittests/Analysis/PluginInlineAdvisorAnalysisTest.cpp
    M llvm/unittests/CodeGen/GlobalISel/CSETest.cpp
    M llvm/unittests/CodeGen/GlobalISel/ConstantFoldingTest.cpp
    M llvm/unittests/CodeGen/GlobalISel/GISelAliasTest.cpp
    M llvm/unittests/CodeGen/GlobalISel/GISelUtilsTest.cpp
    M llvm/unittests/CodeGen/GlobalISel/KnownBitsTest.cpp
    M llvm/unittests/CodeGen/GlobalISel/KnownBitsVectorTest.cpp
    M llvm/unittests/CodeGen/GlobalISel/LegalizerHelperTest.cpp
    M llvm/unittests/CodeGen/GlobalISel/LegalizerTest.cpp
    M llvm/unittests/CodeGen/GlobalISel/MachineIRBuilderTest.cpp
    M llvm/unittests/CodeGen/GlobalISel/PatternMatchTest.cpp
    M llvm/unittests/DebugInfo/LogicalView/ELFReaderTest.cpp
    M llvm/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp
    M llvm/unittests/ExecutionEngine/MCJIT/MCJITTestAPICommon.h
    M llvm/unittests/ExecutionEngine/Orc/LazyCallThroughAndReexportsTest.cpp
    M llvm/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp
    M llvm/unittests/MC/Disassembler.cpp
    M llvm/unittests/MC/DwarfLineTableHeaders.cpp
    M llvm/unittests/MC/DwarfLineTables.cpp
    M llvm/unittests/MC/MCInstPrinter.cpp
    M llvm/unittests/Object/ArchiveTest.cpp
    M llvm/unittests/Object/ELFObjectFileTest.cpp
    M llvm/unittests/Passes/PluginsTest.cpp
    M llvm/unittests/ProfileData/InstrProfTest.cpp
    M llvm/unittests/Support/CRCTest.cpp
    M llvm/unittests/Support/MemoryTest.cpp
    M llvm/unittests/Support/Path.cpp
    M llvm/unittests/Support/ThreadPool.cpp
    M llvm/unittests/Target/AMDGPU/ExecMayBeModifiedBeforeAnyUse.cpp
    M llvm/unittests/Target/ARM/InstSizes.cpp
    M llvm/unittests/Target/ARM/MachineInstrTest.cpp
    M llvm/unittests/tools/llvm-cfi-verify/FileAnalysis.cpp
    M llvm/unittests/tools/llvm-cfi-verify/GraphBuilder.cpp

  Log Message:
  -----------
  [unittests] Use GTEST_SKIP() instead of return when appropriate

Basically NFC: A TEST/TEST_F/etc that bails out early (usually because
setup failed or some other runtime condition wasn't met) generally
should use GTEST_SKIP() to report its status correctly, unless it
takes steps to report another status (e.g., FAIL()).

I did see a handful of tests show up as SKIPPED after this change,
which is not unexpected. The status seemed appropriate in all the new
cases.




More information about the All-commits mailing list