[Lldb-commits] [PATCH] D12415: Use $<TARGET_FILE:...> to get the path lf lldb in test runs.

Stephane Sezer via lldb-commits lldb-commits at lists.llvm.org
Thu Aug 27 15:55:02 PDT 2015


sas created this revision.
sas added reviewers: zturner, clayborg.
sas added a subscriber: lldb-commits.

Instead of hardcoding the path, we should use $<TARGET_FILE:...> which
works better when the output path differs, e.g. when building with MSVC.

$<TARGET_FILE:...> is expanded during the generation of the final build
files, so we can't use it in output messages/comments. This patch
modifies build messages to display the full command instead of "Testing
LLDB with ..." messages.

http://reviews.llvm.org/D12415

Files:
  test/CMakeLists.txt

Index: test/CMakeLists.txt
===================================================================
--- test/CMakeLists.txt
+++ test/CMakeLists.txt
@@ -1,13 +1,12 @@
-function(add_python_test_target name test_script args comment)
+function(add_python_test_target name test_script args)
   set(PYTHON_TEST_COMMAND
     ${PYTHON_EXECUTABLE}
     ${test_script}
     ${args}
     )
 
   add_custom_target(${name}
     COMMAND ${PYTHON_TEST_COMMAND} ${ARG_DEFAULT_ARGS}
-    COMMENT "${comment}"
     )
 endfunction()
 
@@ -35,7 +34,7 @@
 set(LLDB_TEST_COMMON_ARGS
   --arch=${LLDB_TEST_ARCH}
   --executable
-  ${CMAKE_BINARY_DIR}/bin/lldb${CMAKE_EXECUTABLE_SUFFIX}
+  $<TARGET_FILE:lldb>
   -s
   ${CMAKE_BINARY_DIR}/lldb-test-traces
   -u CXXFLAGS
@@ -63,7 +62,6 @@
 add_python_test_target(check-lldb-single
   ${LLDB_SOURCE_DIR}/test/dotest.py
   "${LLDB_TEST_COMMON_ARGS};${LLDB_TEST_USER_ARGS}"
-  "Testing LLDB with args: ${LLDB_TEST_COMMON_ARGS};${LLDB_TEST_USER_ARGS}"
   )
 
 set(LLDB_DOSEP_ARGS -o;\"-q;${LLDB_TEST_COMMON_ARGS};${LLDB_TEST_USER_ARGS}\")
@@ -73,5 +71,4 @@
 add_python_test_target(check-lldb
   ${LLDB_SOURCE_DIR}/test/dosep.py
   "${LLDB_DOSEP_ARGS}"
-  "Testing LLDB (with a separate subprocess per test)"
   )


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12415.33369.patch
Type: text/x-patch
Size: 1230 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150827/7814ce41/attachment.bin>


More information about the lldb-commits mailing list