[lit] Provide extension API for custom result categoriesThe lnt test suite defines custom result codes [1]. Support those viaan extension API instead of "by accident", which should offer theadva
[lit] Provide extension API for custom result categoriesThe lnt test suite defines custom result codes [1]. Support those viaan extension API instead of "by accident", which should offer theadvantage of properly handling them when we print test results.[1] https://reviews.llvm.org/D77986Reviewed By: MeinersburDifferential Revision: https://reviews.llvm.org/D78164
show more ...
[lit] Fix test that relied on "single process" modeThe shtest-inject test relied on being executed in "single process" modeand started to fail with a `PicklingError` after it was removed:``` Ca
[lit] Fix test that relied on "single process" modeThe shtest-inject test relied on being executed in "single process" modeand started to fail with a `PicklingError` after it was removed:``` Can't pickle <class 'lit.TestingConfig.CustomFormat'>: attribute lookup lit.TestingConfig.CustomFormat failed```This happened because the test config has to be serialized to the workerprocess, but apparently the `CustomFormat` class defined inline is notserializable.This change allows passing the tested functionality (preamble_commands)directly to `lit.formats.ShTest` so we can use it directly in the test.
[lit] Allow passing extra commands to executeShTestThis allows creating custom test formats on top of `executeShTest` thatinject commands at the beginning of the file being parsed, withoutrequiri
[lit] Allow passing extra commands to executeShTestThis allows creating custom test formats on top of `executeShTest` thatinject commands at the beginning of the file being parsed, withoutrequiring these commands to physically appear in the test file itself.For example, one could define a test format that prints out additionaldebug information at the beginning of each test. More realistically,this has been used to define custom test formats like one that supportscompilation failure tests (e.g. with the extension `compile.fail.cpp`)by injecting a command that calls the compiler on the file itself andexpects it to fail.Without this change, the only alternative is to create a temporary filewith the same content as the original test, then prepend the desired`// RUN:` lines to that file, and call `executeShTest` on that fileinstead. This is both slow and cumbersome to do.Differential Revision: https://reviews.llvm.org/D76290