[PATCH] D76829: [lit] Introduce setup and teardown routines

Sergej Jaskiewicz via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 26 01:35:32 PDT 2020


broadwaylamb created this revision.
broadwaylamb added reviewers: ldionne, ddunbar, yln, delcypher, dexonsmith.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This patch adds a new feature to lit. We can now define `setup` and `teardown` routines that will be run before the whole test suite starts and after it completes, respectively.

The primary use case for this feature is running std::filesystem tests in libc++ on a remote target. There, we need to copy test inputs to the target machine via SSH, run the tests on those inputs, and then, after all the tests have been run, we need to remove those test inputs from the target machine.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D76829

Files:
  llvm/utils/lit/lit/LitConfig.py
  llvm/utils/lit/lit/run.py
  llvm/utils/lit/tests/Inputs/setup-teardown/lit.cfg
  llvm/utils/lit/tests/Inputs/setup-teardown/test1.txt
  llvm/utils/lit/tests/Inputs/setup-teardown/test2.txt
  llvm/utils/lit/tests/setup-teardown.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76829.252765.patch
Type: text/x-patch
Size: 4566 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200326/2dddb867/attachment-0001.bin>


More information about the llvm-commits mailing list