Skip to content

Commit f4f61d2

Browse files
authored
Merge pull request swiftlang#78530 from xymus/local-cache-for-appkit
Tests: Use a local cache for many tests importing AppKit
2 parents 53280d7 + 11c448d commit f4f61d2

10 files changed

+21
-11
lines changed

test/Interpreter/SDK/Cocoa_transitive.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// RUN: %target-build-swift %s
1+
// RUN: %empty-directory(%t/cache)
2+
// RUN: %target-build-swift %s -module-cache-path %t/cache
23
// REQUIRES: executable_test
34

45
// FIXME: iOS does not have Cocoa.framework

test/Interpreter/SDK/GLKit_parse.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// RUN: %target-build-swift -typecheck %s -Xfrontend -verify
1+
// RUN: %empty-directory(%t/cache)
2+
// RUN: %target-build-swift -typecheck %s -Xfrontend -verify -module-cache-path %t/cache
23
// REQUIRES: executable_test
34

45
// REQUIRES: objc_interop

test/Interpreter/SDK/NSApplicationMain.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// RUN: %target-build-swift -typecheck %s
1+
// RUN: %empty-directory(%t/cache)
2+
// RUN: %target-build-swift -typecheck %s -module-cache-path %t/cache
23
// REQUIRES: executable_test
34
// REQUIRES: OS=macosx
45

test/Interpreter/SDK/c_pointers.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-build-swift %s -o %t/a.out
2+
// RUN: %empty-directory(%t/cache)
3+
// RUN: %target-build-swift %s -o %t/a.out -module-cache-path %t/cache
34
// RUN: %target-codesign %t/a.out
45
// RUN: %target-run %t/a.out | %FileCheck %s
56
// REQUIRES: executable_test

test/Interpreter/SDK/objc_factory_method.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-build-swift -module-name FactoryTest %s -o %t/a.out
2+
// RUN: %empty-directory(%t/cache)
3+
// RUN: %target-build-swift -module-name FactoryTest %s -o %t/a.out -module-cache-path %t/cache
34
// RUN: %target-codesign %t/a.out
45
// RUN: %target-run %t/a.out | %FileCheck %s
56
// REQUIRES: executable_test

test/Interpreter/SDK/object_literals.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
// RUN: %empty-directory(%t)
2+
// RUN: %empty-directory(%t/cache)
23
// RUN: %empty-directory(%t/Test.app/Contents/MacOS)
34
// RUN: cp -r %S/Inputs/object_literals-Resources %t/Test.app/Contents/Resources
4-
// RUN: %target-build-swift %s -o %t/Test.app/Contents/MacOS/main
5+
// RUN: %target-build-swift %s -o %t/Test.app/Contents/MacOS/main -module-cache-path %t/cache
56
// RUN: %target-codesign %t/Test.app/Contents/MacOS/main
67
// RUN: %target-run %t/Test.app/Contents/MacOS/main %t/Test.app/Contents/Resources/*
78

test/Interpreter/SDK/submodules_smoke_test.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
// RUN: %target-build-swift -typecheck %s -Xfrontend -verify -Xfrontend -verify-ignore-unknown
2-
// RUN: %target-build-swift -emit-ir -g %s -DNO_ERROR > /dev/null
1+
// RUN: %empty-directory(%t/cache)
2+
// RUN: %target-build-swift -typecheck %s -Xfrontend -verify -Xfrontend -verify-ignore-unknown -module-cache-path %t/cache
3+
// RUN: %target-build-swift -emit-ir -g %s -DNO_ERROR -module-cache-path %t/cache > /dev/null
34
// REQUIRES: executable_test
45

56
// REQUIRES: objc_interop

test/Migrator/remove_override.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// REQUIRES: OS=macosx
22
// RUN: %empty-directory(%t)
3-
// RUN: %target-swift-frontend -c -update-code -swift-version 4 -disable-migrator-fixits -primary-file %s -emit-migrated-file-path %t/remove_override.result.swift -o %t/rename-func-decl.swift.remap %api_diff_data_dir
3+
// RUN: %empty-directory(%t/cache)
4+
// RUN: %target-swift-frontend -c -update-code -swift-version 4 -disable-migrator-fixits -primary-file %s -emit-migrated-file-path %t/remove_override.result.swift -o %t/rename-func-decl.swift.remap %api_diff_data_dir -module-cache-path %t/cache
45
// RUN: diff -u %S/remove_override.swift.expected %t/remove_override.result.swift
56

67
import AppKit

test/Migrator/remove_override.swift.expected

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// REQUIRES: OS=macosx
22
// RUN: %empty-directory(%t)
3-
// RUN: %target-swift-frontend -c -update-code -swift-version 4 -disable-migrator-fixits -primary-file %s -emit-migrated-file-path %t/remove_override.result.swift -o %t/rename-func-decl.swift.remap %api_diff_data_dir
3+
// RUN: %empty-directory(%t/cache)
4+
// RUN: %target-swift-frontend -c -update-code -swift-version 4 -disable-migrator-fixits -primary-file %s -emit-migrated-file-path %t/remove_override.result.swift -o %t/rename-func-decl.swift.remap %api_diff_data_dir -module-cache-path %t/cache
45
// RUN: diff -u %S/remove_override.swift.expected %t/remove_override.result.swift
56

67
import AppKit

test/stdlib/Reflection_objc.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
// RUN: %empty-directory(%t)
2+
// RUN: %empty-directory(%t/cache)
23
//
34
// RUN: %target-clang %S/Inputs/Mirror/Mirror.mm -c -o %t/Mirror.mm.o -g
45
// Note: explicitly link the CoreGraphics overlay because does not get autolinked
56
// and it is needed for conformances on macOS < 15.
6-
// RUN: %target-build-swift -parse-stdlib %s -module-name Reflection -I %S/Inputs/Mirror/ -Xlinker %t/Mirror.mm.o -o %t/a.out -lswiftCoreGraphics
7+
// RUN: %target-build-swift -parse-stdlib %s -module-name Reflection -I %S/Inputs/Mirror/ -Xlinker %t/Mirror.mm.o -o %t/a.out -lswiftCoreGraphics -module-cache-path %t/cache
78
// RUN: %target-codesign %t/a.out
89
// RUN: %target-run %t/a.out %S/Inputs/shuffle.jpg | %FileCheck %s
910

0 commit comments

Comments
 (0)