Files
swift-mirror/validation-test/BuildSystem/extractsymbols-dry-run-does-not-fail.test
Eric Miotto b903a6cc65 Put symbol generation logic under test
...before adding the logic to filter paths

In particular:
* print the list of files that `cpio` copies, so we can test explicitly
  which files end up in the symroot (and also see those when asking for
  a toolchain in PR testing)
* use `find` instead of `grep` to filter files we want symbols generated
  for -- this is to avoid the script failing when there are no symbol to
  process, especially in lit tests
* remove an unnecessary check for `swift-api-digester` -- this is now a
  symlink to `swift-frontend` and we only process regular files.

Supports rdar://76865276
2021-05-12 09:52:30 -07:00

25 lines
1.0 KiB
Plaintext

# REQUIRES: standalone_build
# REQUIRES: OS=macosx
# As a result of incremental changes,
# in dry-run mode the symbol extraction
# still runs some real commands against the installation
# and symbol directories (e.g. find and cpio)
# This test explictly checks that such commands
# do not cause build-script to fail when run
# against empty directories (which is the typical
# scenario in dry-run)
# RUN: %empty-directory(%t)
# RUN: mkdir -p %t
# RUN: mkdir -p %t/destdir
# RUN: mkdir -p %t/symroot/macosx-%target-cpu
# RUN: SWIFT_BUILD_ROOT=%t %swift_src_root/utils/build-script-impl --dry-run --build-dir=%t/build --workspace=%swift_src_root/.. --cmake %cmake --only-execute macosx-%target-cpu-extractsymbols --host-cc /usr/bin/true --darwin-install-extract-symbols=1 --host-target=macosx-%target-cpu --install-symroot=%t/symroot --install-destdir=%t/destdir --build-jobs=1 2>&1 | %FileCheck %s
# CHECK: --- Extracting symbols ---
# CHECK-NOT: {{^}}echo dsymutil
# CHECK-NOT: {{^[^\+].*}}strip
# CHECK-NOT: {{^[^\+].*}}codesign