[PATCH] D77184: Make it possible for lit.site.cfg to contain relative paths, and use it for llvm and clang

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 31 16:34:03 PDT 2020


thakis created this revision.
thakis added a reviewer: ldionne.
Herald added subscribers: danielkiss, dexonsmith, kristof.beyls, mgorny.

Currently, all generated lit.site.cfg files contain absolute paths.

This makes it impossible to build on one machine, and then transfer the build output
to another machine for test execution. Being able to do this is useful for several use cases:

1. When running tests on an ARM machine, it would be possible to build on a fast x86 machine and then copy build artifacts over after building.

2. It allows running several test suites (clang, llvm, lld) on 3 different machines, reducing test time from sum(each test suite time) to max(each test suite time).

This patch makes it possible to pass a list of variables that should be relative in the
generated lit.site.cfg.py file to configure_lit_site_cfg(). The lit.site.cfg.py.in file needs
to call `path()` on these variables, so that the paths are converted to absolute form
at lit start time.

The testers would have to have an LLVM checkout at the same revision, and the build
dir would have to be at the same relative path as on the builder.

This does not yet cover how to figure out which files to copy from the builder machine
to the tester machines. (One idea is to look at the `--graphviz=test.dot` output and
copy all inputs of the `check-llvm` target.)


https://reviews.llvm.org/D77184

Files:
  clang/test/CMakeLists.txt
  clang/test/Unit/lit.site.cfg.py.in
  clang/test/lit.site.cfg.py.in
  llvm/cmake/modules/AddLLVM.cmake
  llvm/test/CMakeLists.txt
  llvm/test/Unit/lit.site.cfg.py.in
  llvm/test/lit.site.cfg.py.in

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77184.254033.patch
Type: text/x-patch
Size: 11043 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200331/d380dadd/attachment.bin>


More information about the llvm-commits mailing list