Skip to content

Commit 7aaa565

Browse files
committed
[build-script] On buildbots, pass in the -v command into lit instead of -sv.
This enables you to know what tests actually ran instead of just the number of tests that ran. This helps identify: 1. Tests that are not running, but /should/ be running. 2. Tests that are XFAILED or DISABLED but should not be.
1 parent 29baf48 commit 7aaa565

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

utils/build-presets.ini

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ tvos
2626
watchos
2727
test
2828
validation-test
29+
lit-args=-v
2930

3031
dash-dash
3132

@@ -201,6 +202,7 @@ skip-test-watchos-host
201202
[preset: buildbot_incremental_base]
202203
test
203204
validation-test
205+
lit-args=-v
204206

205207
dash-dash
206208

@@ -449,6 +451,7 @@ build-subdir=buildbot_incremental_llvmonly
449451
release-debug
450452
assertions
451453
test=0
454+
lit-args=-v
452455

453456
dash-dash
454457

@@ -613,6 +616,7 @@ test
613616
validation-test
614617
long-test
615618
foundation
619+
lit-args=-v
616620

617621
dash-dash
618622

@@ -672,6 +676,7 @@ assertions
672676
release
673677
test
674678
validation-test
679+
lit-args=-v
675680

676681
dash-dash
677682

utils/build-script

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -796,6 +796,9 @@ class BuildScriptInvocation(object):
796796
if args.dry_run:
797797
impl_args += ["--dry-run"]
798798

799+
if args.lit_args:
800+
impl_args += ["--llvm-lit-args=%s" % args.lit_args]
801+
799802
# Compute the set of host-specific variables, which we pass through to
800803
# the build script via environment variables.
801804
host_specific_variables = self.compute_host_specific_variables()
@@ -1947,6 +1950,12 @@ details of the setups of other systems or automated environments.""")
19471950
"--skip-test-optimized",
19481951
action=arguments.action.unavailable)
19491952

1953+
parser.add_argument(
1954+
"--lit-args",
1955+
help="lit args to use when testing",
1956+
metavar="LITARGS",
1957+
default="-sv")
1958+
19501959
args = migration.parse_args(parser, sys.argv[1:])
19511960

19521961
if args.build_script_impl_args:

utils/build-script-impl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ KNOWN_SETTINGS=(
225225
# TODO: Remove this some time later.
226226
user-config-args "" "**Renamed to --extra-cmake-options**: User-supplied arguments to cmake when used to do configuration."
227227
only-execute "all" "Only execute the named action (see implementation)"
228+
llvm-lit-args "" "If set, override the lit args passed to LLVM"
228229
)
229230

230231
# Centralized access point for traced command invocation.
@@ -651,6 +652,15 @@ function set_build_options_for_host() {
651652
-DSWIFT_HOST_VARIANT_SDK="${SWIFT_HOST_VARIANT_SDK}"
652653
-DSWIFT_HOST_VARIANT_ARCH="${SWIFT_HOST_VARIANT_ARCH}"
653654
)
655+
656+
if [[ "${LLVM_LIT_ARGS}" ]]; then
657+
llvm_cmake_options+=(
658+
-DLLVM_LIT_ARGS="${LLVM_LIT_ARGS}"
659+
)
660+
swift_cmake_options+=(
661+
-DLLVM_LIT_ARGS="${LLVM_LIT_ARGS}"
662+
)
663+
fi
654664
}
655665

656666
function configure_default_options() {

0 commit comments

Comments
 (0)