@@ -54,7 +54,6 @@ KNOWN_SETTINGS=(
54
54
cmark-build-type " Debug" " the CMake build variant for CommonMark (Debug, RelWithDebInfo, Release, MinSizeRel). Defaults to Debug."
55
55
lldb-extra-cmake-args " " " extra command line args to pass to lldb cmake"
56
56
lldb-test-cc " " " CC to use for building LLDB testsuite test inferiors. Defaults to just-built, in-tree clang. If set to 'host-toolchain', sets it to same as host-cc."
57
- lldb-test-with-curses " " " run test lldb test runner using curses terminal control"
58
57
lldb-test-swift-only " 0" " when running lldb tests, only include Swift-specific tests"
59
58
lldb-no-debugserver " " " delete debugserver after building it, and don't try to codesign it"
60
59
lldb-use-system-debugserver " " " don't try to codesign debugserver, and use the system's debugserver instead"
@@ -2982,42 +2981,23 @@ for host in "${ALL_HOSTS[@]}"; do
2982
2981
lldb_build_dir=$( build_directory ${host} lldb)
2983
2982
swift_build_dir=$( build_directory ${host} swift)
2984
2983
module_cache=" ${build_dir} /module-cache"
2985
-
2986
2984
lldb_executable=" ${lldb_build_dir} " /bin/lldb
2987
2985
results_dir=" ${lldb_build_dir} /test-results"
2988
2986
2989
- # Handle test results formatter
2990
- if [[ " ${LLDB_TEST_WITH_CURSES} " ]]; then
2991
- # Setup the curses results formatter.
2992
- LLDB_FORMATTER_OPTS=" \
2993
- --results-formatter lldbsuite.test_event.formatter.curses.Curses \
2994
- --results-file /dev/stdout"
2995
- else
2996
- LLDB_FORMATTER_OPTS=" \
2997
- --results-formatter lldbsuite.test_event.formatter.xunit.XunitFormatter \
2998
- --results-file ${results_dir} /results.xml \
2999
- -O--xpass=success \
3000
- -O--xfail=success"
3001
- # Setup the xUnit results formatter.
3002
- if [[ " $( uname -s) " != " Darwin" ]] ; then
3003
- # On non-Darwin, we ignore skipped tests entirely
3004
- # so that they don't pollute our xUnit results with
3005
- # non-actionable content.
3006
- LLDB_FORMATTER_OPTS=" ${LLDB_FORMATTER_OPTS} -O-ndsym -O-rdebugserver -O-rlibc\\\\ +\\\\ + -O-rlong.running -O-rbenchmarks -O-rrequires.one?.of.darwin"
3007
- fi
3008
- fi
2987
+ LLDB_FORMATTER_OPTS=" --results-formatter lldbsuite.test_event.formatter.xunit.XunitFormatter \
2988
+ --results-file ${results_dir} /results.xml \
2989
+ -O--xpass=success \
2990
+ -O--xfail=success"
3009
2991
3010
- # Optionally specify a test subdirectory and category filters.
3011
- # Watchpoint testing is currently disabled: see rdar://38566150.
3012
- if [[ " $( true_false ${LLDB_TEST_SWIFT_ONLY} ) " == " TRUE" ]]; then
3013
- LLDB_TEST_SUBDIR_CLAUSE=" --test-subdir lang/swift"
3014
- LLDB_TEST_CATEGORIES=" --skip-category=watchpoint --skip-category=dwo"
3015
- else
3016
- LLDB_TEST_SUBDIR_CLAUSE=" "
3017
- LLDB_TEST_CATEGORIES=" --skip-category=watchpoint"
2992
+ # Setup the xUnit results formatter.
2993
+ if [[ " $( uname -s) " != " Darwin" ]] ; then
2994
+ # On non-Darwin, we ignore skipped tests entirely
2995
+ # so that they don't pollute our xUnit results with
2996
+ # non-actionable content.
2997
+ LLDB_FORMATTER_OPTS=" ${LLDB_FORMATTER_OPTS} -O-ndsym -O-rdebugserver -O-rlibc\\\\ +\\\\ + -O-rlong.running -O-rbenchmarks -O-rrequires.one?.of.darwin"
3018
2998
fi
3019
2999
3020
- # figure out which C/C++ compiler we should use for building test inferiors.
3000
+ # Figure out which C/C++ compiler we should use for building test inferiors.
3021
3001
if [[ " ${LLDB_TEST_CC} " == " host-toolchain" ]]; then
3022
3002
# Use the host toolchain: i.e. the toolchain specified by HOST_CC
3023
3003
LLDB_DOTEST_CC_OPTS=" -C ${HOST_CC} "
@@ -3029,13 +3009,6 @@ for host in "${ALL_HOSTS[@]}"; do
3029
3009
LLDB_DOTEST_CC_OPTS=" -C $( build_directory $LOCAL_HOST llvm) " /bin/clang
3030
3010
fi
3031
3011
3032
- # If we need to use the system debugserver, do so explicitly.
3033
- if [[ " $( uname -s) " == " Darwin" && " ${LLDB_USE_SYSTEM_DEBUGSERVER} " ]] ; then
3034
- LLDB_TEST_DEBUG_SERVER=" --server $( xcode-select -p) /../SharedFrameworks/LLDB.framework/Resources/debugserver --out-of-tree-debugserver"
3035
- else
3036
- LLDB_TEST_DEBUG_SERVER=" "
3037
- fi
3038
-
3039
3012
# Options to find the just-built libddispatch and Foundation.
3040
3013
if [[ " $( uname -s) " == " Darwin" || " ${SKIP_BUILD_FOUNDATION} " ]] ; then
3041
3014
DOTEST_EXTRA=" "
@@ -3054,23 +3027,29 @@ for host in "${ALL_HOSTS[@]}"; do
3054
3027
DOTEST_EXTRA=" ${DOTEST_EXTRA} -Xlinker -rpath -Xlinker ${LIBDISPATCH_BUILD_DIR} "
3055
3028
DOTEST_EXTRA=" ${DOTEST_EXTRA} -Xlinker -rpath -Xlinker ${FOUNDATION_BUILD_DIR} "
3056
3029
fi
3057
- call mkdir -p " ${results_dir} "
3058
3030
3059
- # Prefer to use lldb-dotest, as building it guarantees that we build all
3060
- # test dependencies. Ultimately we want to delete as much lldb-specific logic
3061
- # from this file as possible and just have a single call to lldb-dotest.
3031
+ call mkdir -p " ${results_dir} "
3032
+ LLVM_LIT_ARG=" ${LLVM_LIT_ARGS} --xunit-xml-output=${results_dir} /results.xml"
3062
3033
3063
3034
if [[ " ${ENABLE_ASAN} " ]] ; then
3064
3035
# Limit the number of parallel tests
3065
3036
LLVM_LIT_ARGS=" ${LLVM_LIT_ARGS} -j $( sysctl hw.physicalcpu | awk -v N=${BUILD_JOBS} ' { print (N < $2) ? N : $2 }' ) "
3066
3037
fi
3067
3038
3039
+ # Watchpoint testing is currently disabled: see rdar://38566150.
3040
+ LLDB_TEST_CATEGORIES=" --skip-category=watchpoint"
3041
+
3068
3042
if [[ " $( true_false ${LLDB_TEST_SWIFT_ONLY} ) " == " TRUE" ]]; then
3069
3043
LLVM_LIT_ARGS=" ${LLVM_LIT_ARGS} --filter=[sS]wift"
3044
+ LLDB_TEST_CATEGORIES=" ${LLDB_TEST_CATEGORIES} --skip-category=dwo"
3070
3045
fi
3071
3046
3047
+ # Construct dotest arguments.
3048
+ DOTEST_ARGS=" --build-dir ${lldb_build_dir} /lldb-test-build.noindex ${LLDB_TEST_SUBDIR_CLAUSE} ${LLDB_TEST_CATEGORIES} -t -E \" ${DOTEST_EXTRA} \" "
3049
+
3072
3050
# Record the times test took and report the slowest.
3073
3051
LLVM_LIT_ARGS=" ${LLVM_LIT_ARGS} -v --time-tests"
3052
+
3074
3053
with_pushd ${lldb_build_dir} \
3075
3054
call ${NINJA_BIN} -j ${BUILD_JOBS} unittests/LLDBUnitTests
3076
3055
with_pushd ${lldb_build_dir} \
@@ -3079,17 +3058,18 @@ for host in "${ALL_HOSTS[@]}"; do
3079
3058
call " ${llvm_build_dir} /bin/llvm-lit" \
3080
3059
" ${lldb_build_dir} /lit" \
3081
3060
${LLVM_LIT_ARGS} \
3082
- --xunit-xml-output= ${results_dir} /results.xml \
3083
- --param dotest-args= " --build-dir ${lldb_build_dir} /lldb-test-build.noindex ${LLDB_TEST_SUBDIR_CLAUSE} ${LLDB_TEST_CATEGORIES} -t -E \" ${DOTEST_EXTRA} \" "
3061
+ --param dotest-args= " ${DOTEST_ARGS} "
3062
+
3084
3063
if [[ -x " ${LLDB_TEST_SWIFT_COMPATIBILITY} " ]] ; then
3085
3064
echo " Running LLDB swift compatibility tests against" \
3086
3065
" ${LLDB_TEST_SWIFT_COMPATIBILITY} "
3066
+ DOTEST_ARGS=" ${DOTEST_ARGS} -G swift-history --swift-compiler \" ${LLDB_TEST_SWIFT_COMPATIBILITY} \" "
3087
3067
with_pushd ${results_dir} \
3088
3068
call " ${llvm_build_dir} /bin/llvm-lit" \
3089
3069
" ${lldb_build_dir} /lit" \
3090
3070
${LLVM_LIT_ARGS} \
3091
- --xunit-xml-output= ${results_dir} /results.xml \
3092
- --param dotest-args= " --build-dir ${lldb_build_dir} /lldb-test-build.noindex ${LLDB_TEST_SUBDIR_CLAUSE} ${LLDB_TEST_CATEGORIES} -G swift-history --swift-compiler \" ${LLDB_TEST_SWIFT_COMPATIBILITY} \" -t -E \" ${DOTEST_EXTRA} \" " -- filter=compat
3071
+ --param dotest-args= " ${DOTEST_ARGS} " \
3072
+ --filter=compat
3093
3073
fi
3094
3074
continue
3095
3075
;;
0 commit comments