summaryrefslogtreecommitdiffstats
path: root/llvm/utils/lit/CMakeLists.txt
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2017-07-31 18:45:44 +0000
committerReid Kleckner <rnk@google.com>2017-07-31 18:45:44 +0000
commit1b4e9ae3840143927b298ec38175e9fb994d18da (patch)
tree736b7d045df706384563204660ecc0e2af429790 /llvm/utils/lit/CMakeLists.txt
parent56f5f17349bc12c7375cef65172a0c78d96ac442 (diff)
downloadbcm5719-llvm-1b4e9ae3840143927b298ec38175e9fb994d18da.tar.gz
bcm5719-llvm-1b4e9ae3840143927b298ec38175e9fb994d18da.zip
[lit] Avoid copying llvm/utils/lit/tests/Inputs with lit site configs
Summary: This is an alternative solution to running the lit test suite on bots without polluting the source directory. Each input test suite gets an auto-generated site config in the build directory that points back to the test input source directory. This adds some cmake comlexity, but now we don't need to remove and re-copy the test input directory before every test. Reviewers: delcypher, modocache Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D36026 llvm-svn: 309602
Diffstat (limited to 'llvm/utils/lit/CMakeLists.txt')
-rw-r--r--llvm/utils/lit/CMakeLists.txt27
1 files changed, 0 insertions, 27 deletions
diff --git a/llvm/utils/lit/CMakeLists.txt b/llvm/utils/lit/CMakeLists.txt
deleted file mode 100644
index d1b91a0c8d1..00000000000
--- a/llvm/utils/lit/CMakeLists.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-# The configured file is not placed in the correct location
-# until the tests are run as we need to copy it into
-# a copy of the tests folder
-configure_file("tests/lit.site.cfg.in" "lit.site.cfg" @ONLY)
-
-# Lit's test suite creates output files next to the sources which makes the
-# source tree dirty. This is undesirable because we do out of source builds.
-# To work around this the tests and the configuration file are copied into the
-# build directory just before running them. The tests are not copied over at
-# configure time (i.e. `file(COPY ...)`) because this could lead to stale
-# tests being run.
-add_custom_target(prepare-check-lit
- COMMAND ${CMAKE_COMMAND} -E remove_directory "${CMAKE_CURRENT_BINARY_DIR}/tests"
- COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/tests" "${CMAKE_CURRENT_BINARY_DIR}/tests"
- COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg" "${CMAKE_CURRENT_BINARY_DIR}/tests"
- COMMENT "Preparing lit tests"
-)
-
-# Add rules for lit's own test suite
-add_lit_testsuite(check-lit "Running lit's tests"
- ${CMAKE_CURRENT_BINARY_DIR}
- DEPENDS "FileCheck" "not" "prepare-check-lit"
-)
-
-# For IDEs
-set_target_properties(check-lit PROPERTIES FOLDER "Tests")
-set_target_properties(prepare-check-lit PROPERTIES FOLDER "Tests")
OpenPOWER on IntegriCloud