aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2018-07-28 11:09:23 +0000
committerDimitry Andric <dim@FreeBSD.org>2018-07-28 11:09:23 +0000
commitf73363f1dd94996356cefbf24388f561891acf0b (patch)
treee3c31248bdb36eaec5fd833490d4278162dba2a0 /utils
parent160ee69dd7ae18978f4068116777639ea98dc951 (diff)
downloadsrc-f73363f1dd94996356cefbf24388f561891acf0b.tar.gz
src-f73363f1dd94996356cefbf24388f561891acf0b.zip
Vendor import of lldb trunk r338150:vendor/lldb/lldb-trunk-r338150
Notes
Notes: svn path=/vendor/lldb/dist/; revision=336823 svn path=/vendor/lldb/lldb-trunk-r338150/; revision=336824; tag=vendor/lldb/lldb-trunk-r338150
Diffstat (limited to 'utils')
-rw-r--r--utils/lldb-dotest/CMakeLists.txt22
-rwxr-xr-xutils/lldb-dotest/lldb-dotest.in16
2 files changed, 38 insertions, 0 deletions
diff --git a/utils/lldb-dotest/CMakeLists.txt b/utils/lldb-dotest/CMakeLists.txt
new file mode 100644
index 000000000000..f1d85a4a6c81
--- /dev/null
+++ b/utils/lldb-dotest/CMakeLists.txt
@@ -0,0 +1,22 @@
+# Make lldb-dotest a custom target.
+add_custom_target(lldb-dotest)
+add_dependencies(lldb-dotest ${LLDB_TEST_DEPS})
+
+get_property(LLDB_DOTEST_ARGS GLOBAL PROPERTY LLDB_DOTEST_ARGS_PROPERTY)
+
+# Generate wrapper for each build mode.
+if(NOT "${CMAKE_CFG_INTDIR}" STREQUAL ".")
+ foreach(LLVM_BUILD_MODE ${CMAKE_CONFIGURATION_TYPES})
+ string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} LLDB_DOTEST_DIR ${LLVM_RUNTIME_OUTPUT_INTDIR})
+ string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} LLDB_DOTEST_ARGS "${LLDB_DOTEST_ARGS}")
+ configure_file(
+ lldb-dotest.in
+ ${LLDB_DOTEST_DIR}/lldb-dotest
+ )
+ endforeach()
+else()
+ configure_file(
+ lldb-dotest.in
+ ${LLVM_RUNTIME_OUTPUT_INTDIR}/lldb-dotest
+ )
+endif()
diff --git a/utils/lldb-dotest/lldb-dotest.in b/utils/lldb-dotest/lldb-dotest.in
new file mode 100755
index 000000000000..c6cd8cbe746c
--- /dev/null
+++ b/utils/lldb-dotest/lldb-dotest.in
@@ -0,0 +1,16 @@
+#!/usr/bin/env python
+import subprocess
+import sys
+
+dotest_path = '@LLDB_SOURCE_DIR@/test/dotest.py'
+dotest_args_str = '@LLDB_DOTEST_ARGS@'
+
+if __name__ == '__main__':
+ wrapper_args = sys.argv[1:]
+ dotest_args = dotest_args_str.split(';')
+ # Build dotest.py command.
+ cmd = [dotest_path, '-q']
+ cmd.extend(dotest_args)
+ cmd.extend(wrapper_args)
+ # Invoke dotest.py and return exit code.
+ sys.exit(subprocess.call(cmd))