blob: 854e267a2d0180e1cf7517e29d09c639a0bd37e2 [file] [log] [blame]
# Check that we properly rebuild when the Swift compiler changes.
#
# RUN: rm -rf %t.build
# RUN: mkdir -p %t.build
# RUN: touch %t.build/input
# RUN: sed -e "s#SOURCEDIR#%S#g" -e "s#TMPDIR#%t#g" < %s > %t.build/build.swift-build
# RUN: %{swift-build-tool} -v --chdir %t.build > %t.out
# RUN: %{FileCheck} --check-prefix=CHECK-INITIAL --input-file %t.out %s
#
# CHECK-INITIAL: {{.*}}/pseudo-swiftc
# Check that the next build is null.
#
# RUN: %{swift-build-tool} -v --chdir %t.build > %t.out
# RUN: echo "END-OF-INPUT" >> %t.out
# RUN: %{FileCheck} --check-prefix=CHECK-NULL --input-file %t.out %s
#
# CHECK-NULL-NOT: swiftc
# Tell the swift-compiler to change its version (via environment)
#
# RUN: env PSEUDO_SWIFT_VERSION=99.99 %{swift-build-tool} -v --chdir %t.build > %t.out
# RUN: echo "END-OF-INPUT" >> %t.out
# RUN: %{FileCheck} --check-prefix=CHECK-REBUILD --input-file %t.out %s
#
# CHECK-REBUILD: {{.*}}/pseudo-swiftc
# Check one more null build.
#
# RUN: env PSEUDO_SWIFT_VERSION=99.99 %{swift-build-tool} -v --chdir %t.build > %t.out
# RUN: echo "END-OF-INPUT" >> %t.out
# RUN: %{FileCheck} --check-prefix=CHECK-REBUILD-NULL --input-file %t.out %s
#
# CHECK-REBUILD-NULL-NOT: {{.*}}/pseudo-swiftc
client:
name: swift-build
targets:
"": ["<output>"]
commands:
C1:
tool: swift-compiler
outputs: ["<output>"]
executable: SOURCEDIR/Inputs/pseudo-swiftc
module-name: Foo
sources: input.swift
objects: output.o
temps-path: temps