Skip to content

Tests: make FileCheck a substitution that sanitizes the input #4187

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 11, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 8 additions & 2 deletions docs/Testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -358,10 +358,16 @@ Other substitutions:
* ``%{python}``: run the same Python interpreter that's being used to run the
current ``lit`` test.

* ``%FileCheck``: like the LLVM ``FileCheck`` utility, but occurrences of full
paths to the source and build directories in the input text are replaced with
path-independent constants.

* ``%raw-FileCheck``: the LLVM ``FileCheck`` utility.

When writing a test where output (or IR, SIL) depends on the bitness of the
target CPU, use this pattern::

// RUN: %target-swift-frontend ... | FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize %s
// RUN: %target-swift-frontend ... | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize %s

// CHECK: common line
// CHECK-32: only for 32-bit
Expand All @@ -377,7 +383,7 @@ target CPU, use this pattern::
When writing a test where output (or IR, SIL) depends on the target CPU itself,
use this pattern::

// RUN: %target-swift-frontend ... | FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-cpu %s
// RUN: %target-swift-frontend ... | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-cpu %s

// CHECK: common line
// CHECK-i386: only for i386
Expand Down
2 changes: 1 addition & 1 deletion test/1_stdlib/BridgeNonVerbatim.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// outlive the array.
//
//===----------------------------------------------------------------------===//
// RUN: %target-run-stdlib-swift %s | FileCheck %s
// RUN: %target-run-stdlib-swift %s | %FileCheck %s
// REQUIRES: executable_test
//
// REQUIRES: objc_interop
Expand Down
2 changes: 1 addition & 1 deletion test/1_stdlib/Bridgeable.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-run-simple-swift | FileCheck %s
// RUN: %target-run-simple-swift | %FileCheck %s
// REQUIRES: executable_test

// REQUIRES: objc_interop
Expand Down
6 changes: 3 additions & 3 deletions test/1_stdlib/FloatingPointIR.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: %target-build-swift -emit-ir %s | FileCheck -check-prefix=%target-cpu %s
// RUN: %target-build-swift -O -emit-ir %s | FileCheck -check-prefix=%target-cpu %s
// RUN: %target-build-swift -Ounchecked -emit-ir %s | FileCheck -check-prefix=%target-cpu %s
// RUN: %target-build-swift -emit-ir %s | %FileCheck -check-prefix=%target-cpu %s
// RUN: %target-build-swift -O -emit-ir %s | %FileCheck -check-prefix=%target-cpu %s
// RUN: %target-build-swift -Ounchecked -emit-ir %s | %FileCheck -check-prefix=%target-cpu %s

var globalFloat32 : Float32 = 0.0
var globalFloat64 : Float64 = 0.0
Expand Down
2 changes: 1 addition & 1 deletion test/1_stdlib/HeapBuffer.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-run-simple-swift | FileCheck %s
// RUN: %target-run-simple-swift | %FileCheck %s
// REQUIRES: executable_test

import Swift
Expand Down
2 changes: 1 addition & 1 deletion test/1_stdlib/ImplicitlyUnwrappedOptional.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-run-simple-swift | FileCheck %s
// RUN: %target-run-simple-swift | %FileCheck %s
// REQUIRES: executable_test

var x : Int! = .none
Expand Down
2 changes: 1 addition & 1 deletion test/1_stdlib/KVO.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-run-simple-swift | FileCheck %s
// RUN: %target-run-simple-swift | %FileCheck %s
// REQUIRES: executable_test

// REQUIRES: objc_interop
Expand Down
2 changes: 1 addition & 1 deletion test/1_stdlib/Leak.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-run-simple-swift | FileCheck %s
// RUN: %target-run-simple-swift | %FileCheck %s
// REQUIRES: leak-checker

import StdlibUnittest
Expand Down
2 changes: 1 addition & 1 deletion test/1_stdlib/Map.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
// RUN: %target-run-simple-swift | FileCheck %s
// RUN: %target-run-simple-swift | %FileCheck %s
// REQUIRES: executable_test

// Check that the generic parameters are called 'Base' and 'Element'.
Expand Down
2 changes: 1 addition & 1 deletion test/1_stdlib/NSError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// REQUIRES: objc_interop

// RUN: %target-build-swift %s 2> %t.warnings.txt
// RUN: FileCheck -check-prefix=CHECK-WARNINGS %s < %t.warnings.txt
// RUN: %FileCheck -check-prefix=CHECK-WARNINGS %s < %t.warnings.txt

import StdlibUnittest

Expand Down
2 changes: 1 addition & 1 deletion test/1_stdlib/NSObject.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-run-simple-swift | FileCheck %s
// RUN: %target-run-simple-swift | %FileCheck %s
// REQUIRES: executable_test

// REQUIRES: objc_interop
Expand Down
2 changes: 1 addition & 1 deletion test/1_stdlib/NSUndoManager.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// TODO: Relies on AnyObject lvalues <rdar://problem/17755906>
// R/UN: %target-run-simple-swift | FileCheck %s
// R/UN: %target-run-simple-swift | %FileCheck %s
// RUN: not %target-build-swift -parse
// REQUIRES: executable_test

Expand Down
2 changes: 1 addition & 1 deletion test/1_stdlib/NewString.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-run-stdlib-swift | FileCheck %s
// RUN: %target-run-stdlib-swift | %FileCheck %s
// REQUIRES: executable_test

// REQUIRES: objc_interop
Expand Down
2 changes: 1 addition & 1 deletion test/1_stdlib/NewStringAppending.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-run-stdlib-swift | FileCheck %s
// RUN: %target-run-stdlib-swift | %FileCheck %s
// REQUIRES: executable_test
//
// Parts of this test depend on memory allocator specifics. The test
Expand Down
2 changes: 1 addition & 1 deletion test/1_stdlib/Nil.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-run-simple-swift | FileCheck %s
// RUN: %target-run-simple-swift | %FileCheck %s
// REQUIRES: executable_test

// FIXME: rdar://problem/19648117 Needs splitting objc parts out
Expand Down
2 changes: 1 addition & 1 deletion test/1_stdlib/Reflection.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: rm -rf %t && mkdir %t
// RUN: %target-build-swift -parse-stdlib %s -module-name Reflection -o %t/a.out
// RUN: %S/timeout.sh 360 %target-run %t/a.out | FileCheck %s
// RUN: %S/timeout.sh 360 %target-run %t/a.out | %FileCheck %s
// REQUIRES: executable_test
// FIXME: timeout wrapper is necessary because the ASan test runs for hours

Expand Down
2 changes: 1 addition & 1 deletion test/1_stdlib/Reflection_jit.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Test Reflection.swift in JIT mode.
// RUN: %target-jit-run -parse-stdlib %S/Reflection.swift -- %S/Inputs/shuffle.jpg | FileCheck %S/Reflection.swift
// RUN: %target-jit-run -parse-stdlib %S/Reflection.swift -- %S/Inputs/shuffle.jpg | %FileCheck %S/Reflection.swift

// REQUIRES: swift_interpreter
2 changes: 1 addition & 1 deletion test/1_stdlib/Reflection_objc.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// RUN: %target-clang %S/Inputs/Mirror/Mirror.mm -c -o %t/Mirror.mm.o -g
// RUN: %target-build-swift -parse-stdlib %s -module-name Reflection -I %S/Inputs/Mirror/ -Xlinker %t/Mirror.mm.o -o %t/a.out
// RUN: %S/timeout.sh 360 %target-run %t/a.out %S/Inputs/shuffle.jpg | FileCheck %s
// RUN: %S/timeout.sh 360 %target-run %t/a.out %S/Inputs/shuffle.jpg | %FileCheck %s
// REQUIRES: executable_test
// FIXME: timeout wrapper is necessary because the ASan test runs for hours

Expand Down
2 changes: 1 addition & 1 deletion test/1_stdlib/SegmentAlignment.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// RUN: rm -rf %t && mkdir -p %t
// RUN: xcrun -sdk %target-sdk-name %clang -c -arch %target-cpu %s -o %t/SegmentAlignment.o
// RUN: %target-build-swift %S/Inputs/SegmentAlignment.swift -Xlinker %t/SegmentAlignment.o -o %t/a.out
// RUN: %target-run %t/a.out | FileCheck %s
// RUN: %target-run %t/a.out | %FileCheck %s
// REQUIRES: executable_test
// REQUIRES: CPU=armv7

Expand Down
2 changes: 1 addition & 1 deletion test/1_stdlib/StringReallocation.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-run-simple-swift | FileCheck %s
// RUN: %target-run-simple-swift | %FileCheck %s
// REQUIRES: executable_test

// CHECK-NOT: Reallocations exceeded 30
Expand Down
4 changes: 2 additions & 2 deletions test/1_stdlib/UIViewControllerAdditions.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RxUN: %target-build-swift -g %s -o %t/ViewControllerAdditions.out
// RxUN: %target-run %t/ViewControllerAdditions.out %S/Inputs/UIViewControllerAdditions | FileCheck %s
// RUN: %target-run-simple-swift %S/Inputs/UIViewControllerAdditions | FileCheck %s
// RxUN: %target-run %t/ViewControllerAdditions.out %S/Inputs/UIViewControllerAdditions | %FileCheck %s
// RUN: %target-run-simple-swift %S/Inputs/UIViewControllerAdditions | %FileCheck %s
// REQUIRES: executable_test

// REQUIRES: OS=ios
Expand Down
2 changes: 1 addition & 1 deletion test/1_stdlib/VarArgs.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-run-stdlib-swift -parse-stdlib %s | FileCheck %s
// RUN: %target-run-stdlib-swift -parse-stdlib %s | %FileCheck %s
// REQUIRES: executable_test

import Swift
Expand Down
2 changes: 1 addition & 1 deletion test/1_stdlib/integer_conversions.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-run-simple-swift | FileCheck %s
// RUN: %target-run-simple-swift | %FileCheck %s
// REQUIRES: executable_test

var a : Int
Expand Down
2 changes: 1 addition & 1 deletion test/1_stdlib/sort_integers.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-run-simple-swift | FileCheck %s
// RUN: %target-run-simple-swift | %FileCheck %s
// REQUIRES: executable_test

// Generate all possible permutes.
Expand Down
2 changes: 1 addition & 1 deletion test/AutolinkExtract/empty.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %target-swiftc_driver -c %s -o %t
// RUN: %target-swift-autolink-extract %t -o - | FileCheck --check-prefix CHECK-%target-object-format %s
// RUN: %target-swift-autolink-extract %t -o - | %FileCheck --check-prefix CHECK-%target-object-format %s

// REQUIRES: autolink-extract

Expand Down
2 changes: 1 addition & 1 deletion test/AutolinkExtract/empty_archive.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// RUN: %target-swiftc_driver -c %s -o %t
// RUN: rm -f %t.a
// RUN: llvm-ar cr %t.a %t
// RUN: %target-swift-autolink-extract %t.a -o - | FileCheck --check-prefix CHECK-%target-object-format %s
// RUN: %target-swift-autolink-extract %t.a -o - | %FileCheck --check-prefix CHECK-%target-object-format %s

// REQUIRES: autolink-extract

Expand Down
2 changes: 1 addition & 1 deletion test/AutolinkExtract/error_no_inputs.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %target-swiftc_driver -c %s -o %t
// RUN: not %target-swift-autolink-extract 2>&1 | FileCheck %s
// RUN: not %target-swift-autolink-extract 2>&1 | %FileCheck %s

// REQUIRES: autolink-extract

Expand Down
2 changes: 1 addition & 1 deletion test/AutolinkExtract/import.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// RUN: mkdir -p %t
// RUN: %target-swiftc_driver -emit-library -emit-module -emit-module-path %t/empty.swiftmodule -module-name empty -module-link-name empty %S/empty.swift
// RUN: %target-swiftc_driver -c %s -I %t -o %t/import_experimental.o
// RUN: %target-swift-autolink-extract %t/import_experimental.o -o - | FileCheck --check-prefix CHECK-%target-object-format %s
// RUN: %target-swift-autolink-extract %t/import_experimental.o -o - | %FileCheck --check-prefix CHECK-%target-object-format %s

// REQUIRES: autolink-extract

Expand Down
2 changes: 1 addition & 1 deletion test/AutolinkExtract/import_archive.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// RUN: %target-swiftc_driver -emit-library -emit-module -emit-module-path %t/empty.swiftmodule -module-name empty -module-link-name empty %S/empty.swift
// RUN: %target-swiftc_driver -c %s -I %t -o %t/import_experimental.o
// RUN: llvm-ar cr %t/import_experimental.a %t/import_experimental.o
// RUN: %target-swift-autolink-extract %t/import_experimental.a -o - | FileCheck --check-prefix CHECK-%target-object-format %s
// RUN: %target-swift-autolink-extract %t/import_experimental.a -o - | %FileCheck --check-prefix CHECK-%target-object-format %s

// REQUIRES: autolink-extract

Expand Down
6 changes: 3 additions & 3 deletions test/AutolinkExtract/linker-order.ll
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
; RUN: llc -mtriple armv7--linux-gnueabihf -filetype obj -o - %s | %target-swift-autolink-extract -o - - | FileCheck %s
; RUN: llc -mtriple x86_64--windows-gnu -filetype obj -o - %s | %target-swift-autolink-extract -o - - | FileCheck %s
; RUN: llc -mtriple x86_64--windows-cygnus -filetype obj -o - %s | %target-swift-autolink-extract -o - - | FileCheck %s
; RUN: llc -mtriple armv7--linux-gnueabihf -filetype obj -o - %s | %target-swift-autolink-extract -o - - | %FileCheck %s
; RUN: llc -mtriple x86_64--windows-gnu -filetype obj -o - %s | %target-swift-autolink-extract -o - - | %FileCheck %s
; RUN: llc -mtriple x86_64--windows-cygnus -filetype obj -o - %s | %target-swift-autolink-extract -o - - | %FileCheck %s
; REQUIRES: autolink-extract

; Ensure that the options in the object file preserve ordering. The linker
Expand Down
2 changes: 1 addition & 1 deletion test/ClangModules/CoreGraphics_test.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-swift-frontend -target x86_64-apple-macosx10.11 -emit-ir -O %s | FileCheck %s
// RUN: %target-swift-frontend -target x86_64-apple-macosx10.11 -emit-ir -O %s | %FileCheck %s

// Test some imported CG APIs
import CoreGraphics
Expand Down
8 changes: 4 additions & 4 deletions test/ClangModules/MixedSource/Xcc_include.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk) -Xcc -include -Xcc %S/Inputs/Xcc_include.h -parse %s 2>&1 | FileCheck -check-prefix=CHECK-INCLUDE-ONLY %s
// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk) -Xcc -include -Xcc %S/Inputs/Xcc_include.h -parse %s 2>&1 | %FileCheck -check-prefix=CHECK-INCLUDE-ONLY %s

// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk) -Xcc -include -Xcc %S/Inputs/Xcc_include.h -import-objc-header %S/../../Inputs/empty.swift -parse %s 2>&1 | FileCheck -check-prefix=CHECK-INCLUDE-PLUS-BRIDGING %s
// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk) -Xcc -include -Xcc %S/Inputs/Xcc_include.h -import-objc-header %S/../../Inputs/empty.swift -parse %s 2>&1 | %FileCheck -check-prefix=CHECK-INCLUDE-PLUS-BRIDGING %s

// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk) -Xcc -include -Xcc %S/Inputs/Xcc_include.h -F %S/Inputs/mixed-target/ -module-name Mixed -import-underlying-module -parse %s -disable-objc-attr-requires-foundation-module 2>&1 | FileCheck -check-prefix=CHECK-INCLUDE-FRAMEWORK %s
// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk) -Xcc -include -Xcc %S/Inputs/Xcc_include.h -F %S/Inputs/mixed-target/ -module-name Mixed -import-underlying-module -parse %s -disable-objc-attr-requires-foundation-module 2>&1 | %FileCheck -check-prefix=CHECK-INCLUDE-FRAMEWORK %s

// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk) -Xcc -include -Xcc %S/Inputs/this_header_does_not_exist.h -parse %s 2>&1 | FileCheck -check-prefix=CHECK-INCLUDE-MISSING %s
// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk) -Xcc -include -Xcc %S/Inputs/this_header_does_not_exist.h -parse %s 2>&1 | %FileCheck -check-prefix=CHECK-INCLUDE-MISSING %s

// REQUIRES: objc_interop

Expand Down
10 changes: 5 additions & 5 deletions test/ClangModules/MixedSource/broken-bridging-header.swift
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
// RUN: rm -rf %t && mkdir -p %t
// RUN: not %target-swift-frontend -parse %S/../../Inputs/empty.swift -import-objc-header %t/fake.h 2>&1 | FileCheck -check-prefix=MISSING-HEADER %s
// RUN: not %target-swift-frontend -parse %S/../../Inputs/empty.swift -import-objc-header %t/fake.h 2>&1 | %FileCheck -check-prefix=MISSING-HEADER %s

// RUN: cp %S/Inputs/error-on-define.h %t
// RUN: not %target-swift-frontend -parse %S/../../Inputs/empty.swift -import-objc-header %t/error-on-define.h 2>&1 | FileCheck -check-prefix=MISSING-OTHER-HEADER %s
// RUN: not %target-swift-frontend -parse %S/../../Inputs/empty.swift -import-objc-header %t/error-on-define.h 2>&1 | %FileCheck -check-prefix=MISSING-OTHER-HEADER %s

// RUN: cp %S/Inputs/error-on-define-impl.h %t
// RUN: not %target-swift-frontend -parse %S/../../Inputs/empty.swift -import-objc-header %t/error-on-define.h -Xcc -DERROR 2>&1 | FileCheck -check-prefix=HEADER-ERROR %s
// RUN: not %target-swift-frontend -parse %S/../../Inputs/empty.swift -import-objc-header %t/error-on-define.h -Xcc -DERROR 2>&1 | %FileCheck -check-prefix=HEADER-ERROR %s


// RUN: %target-swift-frontend -emit-module -o %t -module-name HasBridgingHeader %S/../../Inputs/empty.swift -import-objc-header %t/error-on-define.h

// RUN: %target-swift-frontend -parse %s -I %t -Xcc -DERROR -verify -show-diagnostics-after-fatal
// RUN: not %target-swift-frontend -parse %s -I %t -Xcc -DERROR 2>&1 | FileCheck -check-prefix=HEADER-ERROR %s
// RUN: not %target-swift-frontend -parse %s -I %t -Xcc -DERROR 2>&1 | %FileCheck -check-prefix=HEADER-ERROR %s

// RUN: rm %t/error-on-define-impl.h
// RUN: %target-swift-frontend -parse %s -I %t -verify -show-diagnostics-after-fatal
// RUN: not %target-swift-frontend -parse %s -I %t 2>&1 | FileCheck -check-prefix=MISSING-OTHER-HEADER %s
// RUN: not %target-swift-frontend -parse %s -I %t 2>&1 | %FileCheck -check-prefix=MISSING-OTHER-HEADER %s

// REQUIRES: objc_interop

Expand Down
6 changes: 3 additions & 3 deletions test/ClangModules/MixedSource/broken-modules.swift
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// RUN: rm -rf %t && mkdir -p %t
// RUN: not %target-swift-frontend -parse %s -I %S/Inputs/broken-modules/ -enable-source-import -show-diagnostics-after-fatal 2> %t/err.txt
// RUN: FileCheck -check-prefix CHECK -check-prefix CLANG-CHECK %s < %t/err.txt
// RUN: %FileCheck -check-prefix CHECK -check-prefix CLANG-CHECK %s < %t/err.txt

// RUN: not %target-swift-frontend -parse %s -import-objc-header %S/Inputs/broken-modules/BrokenClangModule.h -enable-source-import 2> %t/err.bridging-header.txt
// RUN: FileCheck -check-prefix CHECK-BRIDGING-HEADER -check-prefix CLANG-CHECK %s < %t/err.bridging-header.txt
// RUN: %FileCheck -check-prefix CHECK-BRIDGING-HEADER -check-prefix CLANG-CHECK %s < %t/err.bridging-header.txt

// RUN: not %target-swift-frontend -parse %s -import-objc-header %S/../../Inputs/empty.swift 2>&1 | FileCheck -check-prefix=EMPTY-HEADER %s
// RUN: not %target-swift-frontend -parse %s -import-objc-header %S/../../Inputs/empty.swift 2>&1 | %FileCheck -check-prefix=EMPTY-HEADER %s

// REQUIRES: objc_interop

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -I %S/../Inputs/custom-modules -I %t -parse %s -verify

// RUN: rm %t/mixed-target/header.h
// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk) -I %t -I %S/../Inputs/custom-modules -parse %s 2>&1 | FileCheck %s -check-prefix=USE-SERIALIZED-HEADER
// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk) -I %t -I %S/../Inputs/custom-modules -parse %s 2>&1 | %FileCheck %s -check-prefix=USE-SERIALIZED-HEADER

// XFAIL: linux

Expand Down
4 changes: 2 additions & 2 deletions test/ClangModules/MixedSource/mixed-target-using-module.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -F %S/Inputs/mixed-target/ -module-name Mixed -import-underlying-module -parse %s -verify -disable-objc-attr-requires-foundation-module
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -F %S/Inputs/mixed-target/ -module-name Mixed -import-underlying-module -emit-ir %S/../../Inputs/empty.swift - | FileCheck -check-prefix=CHECK-AUTOLINK %s
// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk) -F %S/Inputs/mixed-target/ -module-name WrongName -import-underlying-module -parse %s -disable-objc-attr-requires-foundation-module 2>&1 | FileCheck -check-prefix=CHECK-WRONG-NAME %s
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -F %S/Inputs/mixed-target/ -module-name Mixed -import-underlying-module -emit-ir %S/../../Inputs/empty.swift - | %FileCheck -check-prefix=CHECK-AUTOLINK %s
// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk) -F %S/Inputs/mixed-target/ -module-name WrongName -import-underlying-module -parse %s -disable-objc-attr-requires-foundation-module 2>&1 | %FileCheck -check-prefix=CHECK-WRONG-NAME %s

// REQUIRES: objc_interop

Expand Down
2 changes: 1 addition & 1 deletion test/ClangModules/attr-swift_name.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -I %S/Inputs/custom-modules -Xcc -w -parse %s 2>&1 | FileCheck %s
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -I %S/Inputs/custom-modules -Xcc -w -parse %s 2>&1 | %FileCheck %s

// REQUIRES: objc_interop

Expand Down
4 changes: 2 additions & 2 deletions test/ClangModules/attr-swift_private.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
// RUN: %build-clang-importer-objc-overlays

// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource -I %t) -I %S/Inputs/custom-modules -parse %s -verify
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource -I %t) -I %S/Inputs/custom-modules -emit-ir %s -D IRGEN | FileCheck %s
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource -I %t) -I %S/Inputs/custom-modules -emit-ir %s -D IRGEN | %FileCheck %s

// RUN: %target-swift-ide-test(mock-sdk: %clang-importer-sdk-nosource -I %t) -I %S/Inputs/custom-modules -print-module -source-filename="%s" -module-to-print SwiftPrivateAttr > %t.txt
// RUN: FileCheck -check-prefix=GENERATED-NEGATIVE %s < %t.txt
// RUN: %FileCheck -check-prefix=GENERATED-NEGATIVE %s < %t.txt
// RUN: diff -U3 %S/Inputs/SwiftPrivateAttr.txt %t.txt

// Look for identifiers with "Priv" in them that haven't been prefixed.
Expand Down
8 changes: 4 additions & 4 deletions test/ClangModules/autolinking.swift
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// RUN: rm -rf %t
// RUN: mkdir -p %t
// RUN: %target-swift-frontend %s -sdk %S/Inputs -I %S/Inputs/custom-modules -emit-ir -o %t/without-adapter.ll
// RUN: FileCheck %s < %t/without-adapter.ll
// RUN: %FileCheck %s < %t/without-adapter.ll

// RUN: %target-swift-frontend -emit-module %S/Inputs/adapter.swift -sdk %S/Inputs -module-link-name SwiftAdapter -module-name ClangModuleWithAdapter -I %S/Inputs/custom-modules -o %t
// RUN: %target-swift-frontend %s -sdk %S/Inputs -I %S/Inputs/custom-modules -I %t -emit-ir -o %t/with-adapter.ll
// RUN: FileCheck %s < %t/with-adapter.ll
// RUN: FileCheck --check-prefix=CHECK-WITH-SWIFT %s < %t/with-adapter.ll
// RUN: %FileCheck %s < %t/with-adapter.ll
// RUN: %FileCheck --check-prefix=CHECK-WITH-SWIFT %s < %t/with-adapter.ll

// RUN: %target-swift-frontend %s -sdk %S/Inputs -I %S/Inputs/custom-modules -emit-ir -disable-autolink-framework LinkFramework -o %t/with-disabled.ll
// RUN: FileCheck --check-prefix=CHECK-WITH-DISABLED %s < %t/with-disabled.ll
// RUN: %FileCheck --check-prefix=CHECK-WITH-DISABLED %s < %t/with-disabled.ll

// Linux uses a different autolinking mechanism, based on
// swift-autolink-extract. This file tests the Darwin mechanism.
Expand Down
2 changes: 1 addition & 1 deletion test/ClangModules/availability_implicit_macosx.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %swift -parse -verify -target x86_64-apple-macosx10.51 %clang-importer-sdk -I %S/Inputs/custom-modules %s %S/Inputs/availability_implicit_macosx_other.swift
// RUN: not %swift -parse -target x86_64-apple-macosx10.51 %clang-importer-sdk -I %S/Inputs/custom-modules %s %S/Inputs/availability_implicit_macosx_other.swift 2>&1 | FileCheck %s '--implicit-check-not=<unknown>:0'
// RUN: not %swift -parse -target x86_64-apple-macosx10.51 %clang-importer-sdk -I %S/Inputs/custom-modules %s %S/Inputs/availability_implicit_macosx_other.swift 2>&1 | %FileCheck %s '--implicit-check-not=<unknown>:0'

// REQUIRES: OS=macosx

Expand Down
Loading