Skip to content

Commit 0675da8

Browse files
authored
[test] pass host-target to build-script... (#37488)
... in tests related to symbol generation. This is to ensure that the dry run invocations of `build-script` use the same value as `%target-cpu` and prevent failures when running validation tests for an architecture different from the current one. Addresses rdar://78141544
1 parent 7910254 commit 0675da8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

validation-test/BuildSystem/dsymutil_jobs.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# RUN: mkdir -p %t
55
# RUN: mkdir -p %t/destdir
66
# RUN: mkdir -p %t/symroot/macosx-%target-cpu
7-
# RUN: SKIP_XCODE_VERSION_CHECK=1 SWIFT_BUILD_ROOT=%t %swift_src_root/utils/build-script --dry-run --darwin-install-extract-symbols --dsymutil-jobs 5 --cmake %cmake --install-symroot=%t/symroot --install-destdir=%t/destdir --toolchain-prefix= 2>&1 | %FileCheck %s
7+
# RUN: SKIP_XCODE_VERSION_CHECK=1 SWIFT_BUILD_ROOT=%t %swift_src_root/utils/build-script --dry-run --host-target=macosx-%target-cpu --darwin-install-extract-symbols --dsymutil-jobs 5 --cmake %cmake --install-symroot=%t/symroot --install-destdir=%t/destdir --toolchain-prefix= 2>&1 | %FileCheck %s
88

99
# CHECK: --- Extracting symbols ---
1010
# CHECK: { "command": "dsymutil", "start": "

validation-test/BuildSystem/extractsymbols-darwin-symroot-path-filters.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@
2929
# ensure build-script pass the argument to build-script-impl
3030
# RUN: %empty-directory(%t/symroot)
3131
# RUN: mkdir -p %t/symroot/macosx-%target-cpu
32-
# RUN: SKIP_XCODE_VERSION_CHECK=1 SWIFT_BUILD_ROOT=%t %swift_src_root/utils/build-script --dry-run --cmake %cmake --darwin-install-extract-symbols=1 --install-destdir=%t/destdir --toolchain-prefix="" --install-symroot=%t/symroot --darwin-symroot-path-filters="/lib/ /swift-demangle" --jobs=1 2>&1 | tee %t/build-script-output.txt
32+
# RUN: SKIP_XCODE_VERSION_CHECK=1 SWIFT_BUILD_ROOT=%t %swift_src_root/utils/build-script --dry-run --cmake %cmake --darwin-install-extract-symbols=1 --install-destdir=%t/destdir --toolchain-prefix="" --install-symroot=%t/symroot --darwin-symroot-path-filters="/lib/ /swift-demangle" --jobs=1 --host-target=macosx-%target-cpu 2>&1 | tee %t/build-script-output.txt
3333
# RUN: %FileCheck --input-file=%t/build-script-output.txt %s
3434
# RUN: %FileCheck --input-file=%t/build-script-output.txt --check-prefixes CHECK-SKIPPED %s
3535

3636
# ensure we get all the values if we specify the flag multiple times
3737
# RUN: %empty-directory(%t/symroot)
3838
# RUN: mkdir -p %t/symroot/macosx-%target-cpu
39-
# RUN: SKIP_XCODE_VERSION_CHECK=1 SWIFT_BUILD_ROOT=%t %swift_src_root/utils/build-script --dry-run --cmake %cmake --darwin-install-extract-symbols=1 --install-destdir=%t/destdir --toolchain-prefix="" --install-symroot=%t/symroot --darwin-symroot-path-filters="/lib/" --darwin-symroot-path-filters="/swift-demangle" --jobs=1 2>&1 | tee %t/build-script-output.txt
39+
# RUN: SKIP_XCODE_VERSION_CHECK=1 SWIFT_BUILD_ROOT=%t %swift_src_root/utils/build-script --dry-run --cmake %cmake --darwin-install-extract-symbols=1 --install-destdir=%t/destdir --toolchain-prefix="" --install-symroot=%t/symroot --darwin-symroot-path-filters="/lib/" --darwin-symroot-path-filters="/swift-demangle" --jobs=1 --host-target=macosx-%target-cpu 2>&1 | tee %t/build-script-output.txt
4040
# RUN: %FileCheck --input-file=%t/build-script-output.txt %s
4141
# RUN: %FileCheck --input-file=%t/build-script-output.txt --check-prefixes CHECK-SKIPPED %s
4242

0 commit comments

Comments
 (0)