LIT(1)

πŸ“¦ version 23.1.3, in centos-stream 9

πŸ’– lit β€” LLVM Integrated Tester πŸ’–

okay bestie, meet lit β€” the LLVM Integrated Tester. She’s the one running your LLVM and Clang style test suites, summarizing the results, and telling you where things went off the rails. πŸ’…


🌸 NAME 🌸

lit β€” LLVM Integrated Tester ✨

πŸ¦‹ SYNOPSIS πŸ¦‹

lit [options] [tests]

πŸ’œ DESCRIPTION πŸ’œ

So like, lit is a portable tool for executing LLVM and Clang style test suites, summarizing their results, and providing indication of failures. She’s designed to be a lightweight testing tool with as simple a user interface as possible. πŸŽ€

lit should be run with one or more tests to run specified on the command line. Tests can be either individual test files or directories to search for tests β€” see TEST DISCOVERY for the deets. πŸ‘‘

Each specified test will be executed (potentially concurrently), and once all tests have been run lit will print summary information on the number of tests which passed or failed β€” see TEST STATUS RESULTS. The lit program will execute with a non-zero exit code if any tests fail. 😭

By default lit will use a succinct progress display and will only print summary information for test failures. See OUTPUT OPTIONS for options controlling the lit progress display and output. ✨

lit also includes a number of options for controlling how tests are executed (specific features may depend on the particular test format). See EXECUTION OPTIONS for more information. πŸ¦‹

Finally, lit also supports additional options for only running a subset of the options specified on the command line β€” see SELECTION OPTIONS for more information. πŸ’–

lit parses options from the environment variable LIT_OPTS after parsing options from the command line. LIT_OPTS is primarily useful for supplementing or overriding the command-line options supplied to lit by check targets defined by a project’s build system. 🌈

lit can also read options from response files which are specified as inputs using the @path/to/file.rsp syntax. Arguments read from a file must be one per line and are treated as if they were in the same place as the original file referencing argument on the command line. A response file can reference other response files. 🧚

Users interested in the lit architecture or designing a lit testing implementation should see LIT INFRASTRUCTURE. πŸ’œ

🌟 GENERAL OPTIONS 🌟

  • -h, --help β€” Show the lit help message and exit. 🫢
  • --version β€” Show lit’s version number and exit. ⭐
  • -j N, --workers N β€” Run N tests in parallel. By default, this is automatically chosen to match the number of detected available CPUs. πŸ”₯
  • --config-prefix NAME β€” Search for NAME.cfg and NAME.site.cfg when searching for test suites, instead of lit.cfg and lit.site.cfg. πŸŽ€
  • -D NAME[=VALUE], --param NAME[=VALUE] β€” Add a user defined parameter NAME with the given VALUE (or the empty string if not given). The meaning and use of these parameters is test suite dependent. πŸ’…

🌈 OUTPUT OPTIONS 🌈

  • -q, --quiet β€” Suppress any output except for test failures. 🀫
  • -s, --succinct β€” Show less output, for example don’t show information on tests that pass. Also show a progress bar, unless --no-progress-bar is specified. ✨
  • -v, --verbose β€” Show more information on test failures, for example the entire test output instead of just the test result. πŸ‘‘

Each command is printed before it is executed. This can be valuable for debugging test failures, as the last printed command is the one that failed. Moreover, lit inserts 'RUN: at line N' after each command pipeline in the output to help you locate the source line of the failed command. πŸ”

  • -vv, --echo-all-commands β€” Deprecated alias for -v. πŸ’€
  • -a, --show-all β€” Enable -v, but for all tests not just failed tests. 🌸
  • -o PATH, --output PATH β€” Write test results to the provided path. πŸ“
  • --no-progress-bar β€” Do not use curses based progress bar. πŸ™ˆ
  • --min-output-interval INTERVAL β€” Only output updates to the progress bar and status line at most once per INTERVAL seconds. Has no effect if the curses based progress bar is not used. ⏱️
  • --show-excluded β€” Show excluded tests. 🚫
  • --show-skipped β€” Show skipped tests. ⏭️
  • --show-unsupported β€” Show unsupported tests. 😬
  • --show-pass β€” Show passed tests. βœ…
  • --show-flakypass β€” Show passed with retry tests. 🎒
  • --show-xfail β€” Show expectedly failed tests. πŸ’”

πŸš€ EXECUTION OPTIONS πŸš€

  • --gtest-sharding β€” Enable sharding for GoogleTest format. 🧩
  • --no-gtest-sharding β€” Disable sharding for GoogleTest format. 🧩
  • --path PATH β€” Specify an additional PATH to use when searching for executables in tests. πŸ›£οΈ
  • --vg β€” Run individual tests under valgrind (using the memcheck tool). The --error-exitcode argument for valgrind is used so that valgrind failures will cause the program to exit with a non-zero status. ⚠️

When this option is enabled, lit will also automatically provide a "valgrind" feature that can be used to conditionally disable (or expect failure in) certain tests. πŸ’€

  • --vg-leak β€” When --vg is used, enable memory leak checks. When this option is enabled, lit will also automatically provide a "vg_leak" feature that can be used to conditionally disable (or expect failure in) certain tests. 🫧
  • --vg-arg ARG β€” When --vg is used, specify an additional argument to pass to valgrind itself. 🧰
  • --no-execute β€” Don’t execute any tests (assume that they pass). πŸ«₯
  • --xunit-xml-output XUNIT_XML_OUTPUT β€” Write XUnit-compatible XML test reports to the specified file. πŸ“„
  • --report-failures-only β€” Only include failures (see TEST STATUS RESULTS) in the report. πŸ’”
  • --resultdb-output RESULTDB_OUTPUT β€” Write LuCI ResultDB compatible JSON to the specified file. πŸ—‚οΈ
  • --time-trace-output TIME_TRACE_OUTPUT β€” Write Chrome tracing compatible JSON to the specified file. πŸ”₯
  • --timeout MAXINDIVIDUALTESTTIME β€” Maximum time to spend running a single test (in seconds). 0 means no time limit. [Default: 0] ⏳
  • --timeout N β€” Spend at most N seconds (approximately) running each individual test. 0 means no time limit, and 0 is the default. Note that this is not an alias for --max-time; the two are different kinds of maximums. πŸ˜΅β€πŸ’«
  • --max-failures MAX_FAILURES β€” Stop execution after the given number of failures. πŸ›‘
  • --max-retries-per-test N β€” Retry running failed tests at most N times. Out of the following options to rerun failed tests the --max-retries-per-test is the only one that doesn’t require a change in the test scripts or the test config: πŸ”
    • --max-retries-per-test lit option
    • config.test_retry_attempts test suite option
    • ALLOW_RETRIES: annotation in test script

Any option in the list above overrules its predecessor. πŸ‘‘

  • --allow-empty-runs β€” Do not fail the run if all tests are filtered out. 🫢
  • --per-test-coverage β€” Emit the necessary test coverage data, divided per test case (involves setting a unique value to LLVM_PROFILE_FILE for each RUN). The coverage data files will be emitted in the directory specified by config.test_exec_root. πŸ“Š
  • --ignore-fail β€” Exit with status zero even if some tests fail. 😌
  • --skip-test-time-recording β€” Do not track elapsed wall time for each test. ⏱️
  • --time-tests[=N|all] β€” Track the wall time individual tests take to execute and include the results in the summary output. This is useful for determining which tests in a test suite take the most time to execute. When enabled, lit prints a slowest-test list and a histogram over all timed tests. The slowest-test list defaults to the 20 slowest tests, but can be limited with =N or expanded to every timed test with =all. The headings report how many tests are listed, for example Slowest Tests (N of M): and Test Times (M):. 🐌✨

✨ SELECTION OPTIONS ✨

Okay so by default, lit is a whole strategist πŸ’… β€” it runs the failing tests first, then does the rest in descending execution time order so the concurrency stays optimized. Iconic behavior. But if you wanna switch up the order, you use the --order option, no big deal.

The timing data lives in the test_exec_root in a file called .lit_test_times.txt. If that file isn't there, then lit goes and checks the test_source_root for it, so clean builds can optionally get that little speed boost. πŸš€

  • --max-tests N β€” run at most N tests and then dip. That's it, that's the whole thing.
  • --max-time N β€” spend at most N seconds (approximately, bestie, approximately) running tests and then terminate. And btw, this is not an alias for --timeout β€” those are two totally different kinds of maximums, don't get it twisted. πŸ™ˆ
  • --order {lexical,random,smart} β€” this one defines the order the tests run in. The supported values are:
    • lexical β€” tests run in lexical order according to the test file path. Use this when you want that predictable test order vibe. πŸŽ€
    • random β€” tests run in random order. Chaos. Love that for you. 🎲
    • smart β€” tests that failed previously run first, then all the remaining tests, everything in descending execution time order. This is the default because it optimizes concurrency. Main character energy fr fr. πŸ‘‘
  • --shuffle β€” run the tests in a random order, not failing/slowest first. ⚠️ Deprecated β€” use --order instead.
  • -i, --incremental β€” run failed tests first. ⚠️ DEPRECATED: use --order=smart.
  • --filter REGEXP β€” only run the tests whose name matches the regular expression you gave in REGEXP. You can also use the environment variable LIT_FILTER instead of this option, which is especially useful in environments where the call to lit is issued indirectly. iykyk.
  • --filter-out REGEXP β€” filter out the tests whose name matches the regular expression in REGEXP. The environment variable LIT_FILTER_OUT can also be used in place of this option, again super useful when lit gets called indirectly. ✨
  • --filter-failed β€” only run tests that previously failed. Newly added tests that haven't been run yet are not included. Sorry, newbies. 🫢
  • --xfail LIST β€” treat the tests whose name is in the semicolon separated list LIST as XFAIL. This is lowkey helpful when you don't wanna modify the test suite. The environment variable LIT_XFAIL can also be used in place of this option, which is especially useful in environments where the call to lit is issued indirectly.

A test name can be specified as a file name relative to the test suite directory. For example:

LIT_XFAIL="affinity/kmp-hw-subset.c;offloading/memory_manager.cpp"

In this case, all of the following tests are treated as XFAIL:

libomp :: affinity/kmp-hw-subset.c
libomptarget :: nvptx64-nvidia-cuda :: offloading/memory_manager.cpp
libomptarget :: x86_64-pc-linux-gnu :: offloading/memory_manager.cpp

Alternatively, a test name can be specified as the full test name reported in LIT output. For example, we can adjust the previous example so we don't treat the nvptx64-nvidia-cuda version of offloading/memory_manager.cpp as XFAIL:

LIT_XFAIL="affinity/kmp-hw-subset.c;libomptarget :: x86_64-pc-linux-gnu :: offloading/memory_manager.cpp"
  • --xfail-not LIST β€” do not treat the specified tests as XFAIL. The environment variable LIT_XFAIL_NOT can also be used in place of this option. The syntax is the same as for --xfail and LIT_XFAIL. And listen β€” --xfail-not and LIT_XFAIL_NOT always override all other XFAIL specifications, including an --xfail that appears later on the command line. The primary purpose is to suppress an XPASS result without modifying a test case that uses the XFAIL directive. The way that it just overrides everything? Obsessed. πŸ’…
  • --unsupported LIST β€” treat the tests whose name is in the semicolon separated list LIST as UNSUPPORTED. Helpful when you don't wanna modify the test suite. The environment variable LIT_UNSUPPORTED can also be used in place of this option, which is especially useful in environments where the call to lit is issued indirectly.

The syntax for specifying test names is the same as for --xfail and LIT_XFAIL. A test name can be given as a file name relative to the test suite directory, or as the full test name reported in LIT output.

  • --unsupported-not LIST β€” do not treat the specified tests as UNSUPPORTED. The environment variable LIT_UNSUPPORTED_NOT can also be used in place of this option. The syntax is the same as for --unsupported and LIT_UNSUPPORTED. --unsupported-not and LIT_UNSUPPORTED_NOT always override all other UNSUPPORTED specifications, including an --unsupported appearing later on the command line. Same override energy, different status. πŸ’€
  • --exclude-xfail β€” XFAIL tests won't be run, unless they're listed in the --xfail-not (or LIT_XFAIL_NOT) lists.
  • --num-shards M β€” divide the set of selected tests into M equal-sized subsets or "shards", and run only one of them. Must be used with the --run-shard=N option, which selects which shard to actually run. The environment variable LIT_NUM_SHARDS can also be used in place of this option. These two options give you a coarse mechanism for partitioning large testsuites, for parallel execution on separate machines (say, in a big testing farm). 🚜
  • --run-shard N β€” select which shard to run, assuming the --num-shards=M option was provided. The two options must be used together, and the value of N must be in the range 1..M. The environment variable LIT_RUN_SHARD can also be used in place of this option.

🌸 ADDITIONAL OPTIONS 🌸

  • --debug β€” run lit in debug mode, for debugging configuration issues and lit itself. Detective mode. πŸ•΅οΈ
  • --show-suites β€” list the discovered test suites and exit.
  • --show-tests β€” list all of the discovered tests and exit.
  • --show-used-features β€” show all features used in the test suite (in XFAIL, UNSUPPORTED and REQUIRES) and exit.
  • --update-tests β€” pass failing tests to functions in the lit_config.test_updaters list, to check whether any of them know how to update the test and make it pass. Basically "hey, can anyone fix this?" energy. πŸ”§

πŸ’– EXIT STATUS πŸ’–

lit will exit with an exit code of 1 if there are any failures (peep TEST STATUS RESULTS) and --ignore-fail has not been passed. Otherwise, it exits with status 0. Other exit codes are used for non-test-related failures β€” like, say, a user error or an internal program error. Not everything's about the tests, bestie. 😭


πŸ¦‹ TEST DISCOVERY πŸ¦‹

The inputs you pass to lit can be individual tests, or entire directories or hierarchies of tests to run. When lit starts up, the very first thing it does is convert those inputs into a complete list of tests to run β€” that's test discovery, and it's literally step one. ✨

In the lit model, every test must exist inside some test suite. lit resolves the inputs specified on the command line to test suites by searching upwards from the input path until it finds a lit.cfg or lit.site.cfg file. These files are both the marker of test suites and configuration files that lit loads so it understands how to find and run the tests inside that suite.

Once lit has mapped the inputs into test suites, it traverses the list of inputs, adding tests for individual files and recursively searching for tests in directories. 🧚

This behavior makes it easy to specify a subset of tests to run, while still letting the test suite configuration control exactly how tests are interpreted. Plus, lit always identifies tests by the test suite they're in, and their relative path inside the test suite. For appropriately configured projects, that means lit gives you convenient, flexible support for out-of-tree builds. Slay. πŸŽ€


⭐ TEST STATUS RESULTS ⭐

Each test ultimately produces one of the following eight results:

  • PASS β€” the test succeeded. πŸŽ‰
  • FLAKYPASS β€” the test succeeded after being re-run more than once. This only applies to tests containing an ALLOW_RETRIES: annotation. It's giving "idk what happened but it works now." πŸŒ€
  • XFAIL β€” the test failed, but that's expected. Used for test formats that allow you to say a test doesn't currently work, but you still wanna leave it in the test suite.
  • XPASS β€” the test succeeded, but it was expected to fail. Used for tests that were specified as expected to fail but are now succeeding (generally because the feature they test was broken and has since been fixed). Glow-up moment. πŸ’…
  • FAIL β€” the test failed. πŸ’€
  • UNRESOLVED β€” the test result could not be determined. For example, this happens when the test couldn't be run, the test itself is invalid, or the test was interrupted. 😭
  • UNSUPPORTED β€” the test isn't supported in this environment. Used by test formats that can report unsupported tests.
  • TIMEOUT β€” the test was run, but it timed out before it could complete. ⏰

Unresolved (UNRESOLVED), timed out (TIMEOUT), failed (FAIL) and unexpectedly passed (XPASS) tests are all considered failures.

Depending on the test format, tests may produce additional information about their status (generally only for failures). Check the OUTPUT OPTIONS section for more on that. πŸ‘€


🌈 LIT INFRASTRUCTURE 🌈

This section describes the lit testing architecture for users who are interested in creating a new lit testing implementation, or extending an existing one. Nerd alert and I mean that as the highest compliment. 🫢

lit proper is primarily an infrastructure for discovering and running arbitrary tests, and for exposing a single convenient interface to those tests. lit itself doesn't actually know how to run tests β€” that logic is defined by test suites.

πŸŽ€ TEST SUITES πŸŽ€

As described in TEST DISCOVERY, tests are always located inside a test suite. Test suites serve to define the format of the tests they contain, the logic for finding those tests, and any additional information needed to run them.

lit identifies test suites as directories containing lit.cfg or lit.site.cfg files (see also --config-prefix). Test suites are initially discovered by recursively searching up the directory hierarchy for all the input files passed on the command line. You can use --show-suites to display the discovered test suites at startup. ✨

Once a test suite is discovered, its config file is loaded. Config files themselves are Python modules which will be executed. When the config file runs, two important global variables are predefined:

  • lit_config β€” the global lit configuration object (a LitConfig instance), which defines the builtin test formats, global configuration parameters, and other helper routines for implementing test configurations.
  • name [required] β€” the name of the test suite, bestie. It's what shows up in reports and diagnostics, so like… make it cute but make it accurate πŸ’…
  • test_format [required] β€” the test format object that's gonna discover and run the tests in this suite. Lowkey usually this is one of the builtin test formats you can grab from the lit.formats module.
  • test_source_root β€” the filesystem path to the test suite root. For out-of-dir builds, this is the directory that gets scanned for tests πŸ‘€
  • test_exec_root β€” for out-of-dir builds, the path to the test suite root inside the object directory. This is where tests actually run and where the temporary output files get placed πŸ—‚οΈ
  • environment β€” a dictionary representing the environment to use when executing tests in the suite 🌱
  • standalone_tests β€” when true, marks a directory whose tests are expected to be run standalone. Test discovery is disabled for that directory. Also, lit.suffixes and lit.excludes must be empty when this variable is true β€” no cap, that's a hard requirement 🚨
  • suffixes β€” for lit test formats that scan directories for tests, this is a list of suffixes used to identify test files. Used by: ShTest.
  • substitutions β€” for lit test formats that substitute variables into a test script, this is the list of substitutions to perform. Used by: ShTest.
  • unsupported β€” marks an unsupported directory, and literally all tests inside it get reported as unsupported. Used by: ShTest.
  • parent β€” the parent configuration, i.e. the config object for the directory containing the test suite… or None if there isn't one 🫠
  • root β€” the root configuration. That's the top-most lit configuration in the whole project, the main character of the config chain πŸ‘‘
  • pipefail β€” so normally a test using a shell pipe fails if any of the commands on the pipe fail. If that's not the vibe you want, setting this variable to false makes the test fail only if the last command in the pipe fails πŸ”—
  • available_features β€” a set of features that can be used in XFAIL, REQUIRES, and UNSUPPORTED directives ✨

✨ TEST DISCOVERY ✨

okay so once the test suites are located, lit recursively traverses the source directory β€” following test_source_root btw β€” looking for tests πŸ•΅οΈβ€β™€οΈ

When lit enters a sub-directory, the first thing it does is check whether a nested test suite is defined in that directory. If yes? It loads that test suite recursively. If no? It instantiates a local test config for the directory instead (peep LOCAL CONFIGURATION FILES below, iykyk) πŸ’œ

Tests are identified by the test suite they're contained within, plus the relative path inside that suite. And here's the tea 🍡 β€” that relative path might not point to an actual file on disk. Some test formats (hi GoogleTest πŸ‘‹) define "virtual tests", which have a path containing both the path to the actual test file and a subpath to identify the virtual test. Not me finding that iconic πŸ”₯


🌸 LOCAL CONFIGURATION FILES 🌸

When lit loads a subdirectory in a test suite, it instantiates a local test configuration by cloning the configuration for the parent directory β€” and the root of this whole configuration chain will always be a test suite, periodt πŸ’…

Once the test configuration is cloned, lit checks for a lit.local.cfg file in the subdirectory. If it's there, that file gets loaded and can be used to specialize the configuration for each individual directory πŸŽ€

This facility is literally perfect for defining subdirectories of optional tests, or for changing other configuration parameters β€” for example, to change the test format, or the suffixes which identify test files πŸ¦‹

πŸ” SUBSTITUTIONS πŸ”

okay so this is the part that makes lit actually useful bestie πŸ’… β€” you can substitute patterns inside RUN commands. and it hands you a whole base set of substitutions for free, all defined in TestRunner.py:

  • %s β€” source path, aka the path to the file you're currently running πŸŽ€
  • %S β€” source dir, aka the directory of the file you're currently running
  • %p β€” literally the same thing as %S
  • %{pathsep} β€” path separator
  • %{fs-src-root} β€” the root component of file system paths that point to the LLVM checkout
  • %{fs-tmp-root} β€” the root component of file system paths that point to the test's temporary directory
  • %{fs-sep} β€” file system path separator
  • %t β€” a path unique to the test (and yes you may use it to make files or directories 🫢)
  • %basename_t β€” the last path component of %t but without the .tmp extension. deprecated, use %{t:stem} instead ⚠️
  • %% β€” a literal %
  • %/s β€” %s but \ is replaced by /
  • %/S β€” %S but \ is replaced by /
  • %/p β€” %p but \ is replaced by /
  • %/t β€” %t but \ is replaced by /
  • %{s:basename} β€” the last path component of %s
  • %{s:stem} β€” the last path component of %s but with the last extension removed
  • %{t:stem} β€” the last path component of %t but without the .tmp extension (it's an alias for %basename_t)
  • %{s:real} β€” %s after expanding all symbolic links and substitute drives
  • %{S:real} β€” %S after expanding all symbolic links and substitute drives
  • %{p:real} β€” %p after expanding all symbolic links and substitute drives
  • %{t:real} β€” %t after expanding all symbolic links and substitute drives
  • %{/s:real} β€” %/s after expanding all symbolic links and substitute drives
  • %{/S:real} β€” %/S after expanding all symbolic links and substitute drives
  • %{/p:real} β€” %/p after expanding all symbolic links and substitute drives
  • %{/t:real} β€” %/t after expanding all symbolic links and substitute drives
  • %{/s:regex_replacement} β€” %/s but escaped for use in the replacement of a s@@@ command in sed ✨
  • %{/S:regex_replacement} β€” %/S but escaped for use in the replacement of a s@@@ command in sed
  • %{/p:regex_replacement} β€” %/p but escaped for use in the replacement of a s@@@ command in sed
  • %{/t:regex_replacement} β€” %/t but escaped for use in the replacement of a s@@@ command in sed
  • %:s β€” on Windows, %/s but a : is removed if it's the second character. otherwise, %s but with a single leading / removed
  • %:S β€” on Windows, %/S but a : is removed if it's the second character. otherwise, %S but with a single leading / removed
  • %:p β€” on Windows, %/p but a : is removed if it's the second character. otherwise, %p but with a single leading

…and that last substitution finishes up with / removed, bestie β€” don't ask, it just does. πŸ’…

  • %:t β€” on Windows, this is %/t but with the : deleted if it happens to be the second character. Otherwise, it's %t but with a single leading / removed. 🩷
  • %{readfile:<filename>} β€” literally just reads the file you name. πŸ“„

Other substitutions exist too β€” they're all variations on this base set, and each test module can define even more substitution patterns of its own. Peep the modules' LOCAL CONFIGURATION FILES. πŸ‘€

Want the deep lore on substitutions? It lives in the LLVM Testing Infrastructure Guide. Go read it, it's giving textbook. πŸ“š


πŸ“Š TEST RUN OUTPUT FORMAT πŸ“Š

The output lit spits out for a test run conforms to the schema below β€” in both short and verbose modes (though in short mode, no PASS lines show up, so don't @ me when you don't see them πŸ™ˆ). This schema was chosen so it's relatively easy for a machine to reliably parse (think buildbot log scraping, bestie), and so other tools can generate it too. ✨

Every test result is expected to show up on a line matching:

<result code>: <test name> (<progress info>)

Where <result-code> is a standard test result like PASS, FAIL, XFAIL, XPASS, UNRESOLVED, or UNSUPPORTED. The performance result codes IMPROVED and REGRESSED are allowed too. πŸ†

The <test name> field can be any arbitrary string, as long as it contains no newline. πŸ“

The <progress info> field can report progress stuff like (1/300), or it can be empty β€” but even when it's empty, the parentheses are required. No skipping them, periodt. πŸŽ€

If a test is allowed retries (see the ALLOW_RETRIES: annotation) and it needed more than one attempt to succeed, then <progress info> gets extended with this info:

, <num_attempts_made> of <max_allowed_attempts> attempts

Each test result may also include extra (multiline) log info, formatted like this:

<log delineator> TEST '(<test name>)' <trailing delineator>
... log message ...
<log delineator>

Where <test name> should be the name of a preceding reported test, <log delineator> is a string of * characters at least four characters long (the recommended length is 20), and <trailing delineator> is an arbitrary (unparsed) string. ⭐

Here's an example test run output with four tests β€” A, B, C, and D β€” plus a log message for the failing test C: 😭

PASS: A (1 of 4)
PASS: B (2 of 4)
FAIL: C (3 of 4)
******************** TEST 'C' FAILED ********************
Test 'C' failed as a result of exit code 1.
********************
PASS: D (4 of 4)

🌸 DEFAULT FEATURES 🌸

For convenience, lit automatically adds available_features for some common use cases. So thoughtful of her. 🫢

lit adds a feature based on the operating system being built on β€” for example: system-darwin, system-linux, etc. lit also automatically adds a feature based on the current architecture β€” for example target-x86_64, target-aarch64, etc. πŸ–₯️

When you build with sanitizers enabled, lit automatically adds the short name of the sanitizer β€” for example: asan, tsan, etc. 🧼

Want the full list of features that can be added? See llvm/utils/lit/lit/llvm/config.py. iykyk. πŸ“‚


πŸ§ͺ LIT EXAMPLE TESTS πŸ§ͺ

The lit distribution ships with several example implementations of test suites in the ExampleTests directory. Go poke at them, they're literally right there. πŸ‘‘πŸ¦‹


πŸ‘€ SEE ALSO πŸ‘€


πŸ’– AUTHOR πŸ’–

Maintained by the LLVM Team (https://llvm.org/). 🫑


2003-2026, LLVM Project


and that's the whole page, bestie β€” you ate. πŸŽ€βœ¨

This gorgeous thing is lit, version 23, dated 2026-10-06. Go run some tests, slay, and remember: no cap, the parentheses are always required. πŸ’…πŸŒˆπŸ«Ά

πŸ“¦ where this page comes from