Skip to content

Commit 0625081

Browse files
authored
Merge pull request #21272 from compnerd/interpreter
2 parents 4f0f11f + f138f50 commit 0625081

6 files changed

+57
-57
lines changed

test/ParseableInterface/ModuleCache/module-cache-diagnostics.swift

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,51 +20,51 @@
2020
//
2121
// Setup phase 2: build modules, pushing timestamps of inputs and intermediates into the past as we go.
2222
//
23-
// RUN: %S/Inputs/make-old.py %t/leaf.swift %t/other.swift
23+
// RUN: %{python} %S/Inputs/make-old.py %t/leaf.swift %t/other.swift
2424
// RUN: %target-swift-frontend -I %t -emit-parseable-module-interface-path %t/LeafModule.swiftinterface -module-name LeafModule %t/leaf.swift -emit-module -o /dev/null
25-
// RUN: %S/Inputs/make-old.py %t/LeafModule.swiftinterface
25+
// RUN: %{python} %S/Inputs/make-old.py %t/LeafModule.swiftinterface
2626
// RUN: %target-swift-frontend -I %t -module-cache-path %t/modulecache -enable-parseable-module-interface -emit-parseable-module-interface-path %t/OtherModule.swiftinterface -module-name OtherModule %t/other.swift -emit-module -o /dev/null
27-
// RUN: %S/Inputs/make-old.py %t/modulecache/LeafModule-*.swiftmodule %t/OtherModule.swiftinterface
27+
// RUN: %{python} %S/Inputs/make-old.py %t/modulecache/LeafModule-*.swiftmodule %t/OtherModule.swiftinterface
2828
// RUN: %target-swift-frontend -I %t -module-cache-path %t/modulecache -enable-parseable-module-interface -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s
29-
// RUN: %S/Inputs/make-old.py %t/modulecache/OtherModule-*.swiftmodule
29+
// RUN: %{python} %S/Inputs/make-old.py %t/modulecache/OtherModule-*.swiftmodule
3030
//
3131
//
3232
// Actual test: add an inlinable func with an unused var to LeafModule.swiftinterface (which should emit a warning); check we do get a rebuild, but no warning.
3333
//
34-
// RUN: %S/Inputs/check-is-old.py %t/OtherModule.swiftinterface %t/LeafModule.swiftinterface
35-
// RUN: %S/Inputs/check-is-old.py %t/modulecache/OtherModule-*.swiftmodule %t/modulecache/LeafModule-*.swiftmodule
34+
// RUN: %{python} %S/Inputs/check-is-old.py %t/OtherModule.swiftinterface %t/LeafModule.swiftinterface
35+
// RUN: %{python} %S/Inputs/check-is-old.py %t/modulecache/OtherModule-*.swiftmodule %t/modulecache/LeafModule-*.swiftmodule
3636
// RUN: echo "@inlinable func foo() { var x = 10 }" >>%t/LeafModule.swiftinterface
37-
// RUN: %S/Inputs/make-old.py %t/LeafModule.swiftinterface
38-
// RUN: %S/Inputs/check-is-old.py %t/LeafModule.swiftinterface
37+
// RUN: %{python} %S/Inputs/make-old.py %t/LeafModule.swiftinterface
38+
// RUN: %{python} %S/Inputs/check-is-old.py %t/LeafModule.swiftinterface
3939
// RUN: rm %t/TestModule.swiftmodule
4040
// RUN: %target-swift-frontend -I %t -module-cache-path %t/modulecache -enable-parseable-module-interface -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s >%t/warn.txt 2>&1
41-
// RUN: %S/Inputs/check-is-new.py %t/modulecache/OtherModule-*.swiftmodule %t/modulecache/LeafModule-*.swiftmodule
41+
// RUN: %{python} %S/Inputs/check-is-new.py %t/modulecache/OtherModule-*.swiftmodule %t/modulecache/LeafModule-*.swiftmodule
4242
// "check warn.txt exists and is empty"
4343
// RUN: test -e %t/warn.txt -a ! -s %t/warn.txt
4444
//
4545
//
4646
// Next test: make LeafModule.swiftinterface import NotAModule (which should emit an error); check we do not get a rebuild, do get an error.
4747
//
48-
// RUN: %S/Inputs/make-old.py %t/modulecache/*.swiftmodule %t/*.swiftinterface
49-
// RUN: %S/Inputs/check-is-old.py %t/OtherModule.swiftinterface %t/LeafModule.swiftinterface
50-
// RUN: %S/Inputs/check-is-old.py %t/modulecache/OtherModule-*.swiftmodule %t/modulecache/LeafModule-*.swiftmodule
48+
// RUN: %{python} %S/Inputs/make-old.py %t/modulecache/*.swiftmodule %t/*.swiftinterface
49+
// RUN: %{python} %S/Inputs/check-is-old.py %t/OtherModule.swiftinterface %t/LeafModule.swiftinterface
50+
// RUN: %{python} %S/Inputs/check-is-old.py %t/modulecache/OtherModule-*.swiftmodule %t/modulecache/LeafModule-*.swiftmodule
5151
// RUN: echo "import NotAModule" >>%t/LeafModule.swiftinterface
52-
// RUN: %S/Inputs/make-old.py %t/LeafModule.swiftinterface
53-
// RUN: %S/Inputs/check-is-old.py %t/LeafModule.swiftinterface
52+
// RUN: %{python} %S/Inputs/make-old.py %t/LeafModule.swiftinterface
53+
// RUN: %{python} %S/Inputs/check-is-old.py %t/LeafModule.swiftinterface
5454
// RUN: rm %t/TestModule.swiftmodule
5555
// RUN: not %target-swift-frontend -I %t -module-cache-path %t/modulecache -enable-parseable-module-interface -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s >%t/err.txt 2>&1
56-
// RUN: %S/Inputs/check-is-old.py %t/modulecache/OtherModule-*.swiftmodule %t/modulecache/LeafModule-*.swiftmodule
56+
// RUN: %{python} %S/Inputs/check-is-old.py %t/modulecache/OtherModule-*.swiftmodule %t/modulecache/LeafModule-*.swiftmodule
5757
// RUN: %FileCheck %s -check-prefix=CHECK-ERROR <%t/err.txt
5858
// CHECK-ERROR: LeafModule.swiftinterface:6:8: error: no such module 'NotAModule'
5959
// CHECK-ERROR: OtherModule.swiftinterface:4:8: error: no such module 'LeafModule'
6060
//
6161
//
6262
// Next test: same as above, but with a .dia file
6363
//
64-
// RUN: %S/Inputs/check-is-old.py %t/OtherModule.swiftinterface %t/LeafModule.swiftinterface
65-
// RUN: %S/Inputs/check-is-old.py %t/modulecache/OtherModule-*.swiftmodule %t/modulecache/LeafModule-*.swiftmodule
64+
// RUN: %{python} %S/Inputs/check-is-old.py %t/OtherModule.swiftinterface %t/LeafModule.swiftinterface
65+
// RUN: %{python} %S/Inputs/check-is-old.py %t/modulecache/OtherModule-*.swiftmodule %t/modulecache/LeafModule-*.swiftmodule
6666
// RUN: not %target-swift-frontend -I %t -module-cache-path %t/modulecache -serialize-diagnostics -serialize-diagnostics-path %t/err.dia -enable-parseable-module-interface -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s
67-
// RUN: %S/Inputs/check-is-old.py %t/modulecache/OtherModule-*.swiftmodule %t/modulecache/LeafModule-*.swiftmodule
67+
// RUN: %{python} %S/Inputs/check-is-old.py %t/modulecache/OtherModule-*.swiftmodule %t/modulecache/LeafModule-*.swiftmodule
6868
// RUN: c-index-test -read-diagnostics %t/err.dia 2>&1 | %FileCheck %s -check-prefix=CHECK-ERROR
6969

7070
import OtherModule

test/ParseableInterface/ModuleCache/module-cache-intermediate-hash-change-rebuilds-only-intermediate.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,25 @@
1818
//
1919
// Setup phase 2: build modules, pushing timestamps of inputs and intermediates into the past as we go.
2020
//
21-
// RUN: %S/Inputs/make-old.py %t/leaf.swift %t/other.swift
21+
// RUN: %{python} %S/Inputs/make-old.py %t/leaf.swift %t/other.swift
2222
// RUN: %target-swift-frontend -I %t -emit-parseable-module-interface-path %t/LeafModule.swiftinterface -module-name LeafModule %t/leaf.swift -emit-module -o /dev/null
23-
// RUN: %S/Inputs/make-old.py %t/LeafModule.swiftinterface
23+
// RUN: %{python} %S/Inputs/make-old.py %t/LeafModule.swiftinterface
2424
// RUN: %target-swift-frontend -I %t -module-cache-path %t/modulecache -enable-parseable-module-interface -emit-parseable-module-interface-path %t/OtherModule.swiftinterface -module-name OtherModule %t/other.swift -emit-module -o /dev/null
25-
// RUN: %S/Inputs/make-old.py %t/modulecache/LeafModule-*.swiftmodule %t/OtherModule.swiftinterface
25+
// RUN: %{python} %S/Inputs/make-old.py %t/modulecache/LeafModule-*.swiftmodule %t/OtherModule.swiftinterface
2626
// RUN: %target-swift-frontend -I %t -module-cache-path %t/modulecache -enable-parseable-module-interface -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s
27-
// RUN: %S/Inputs/make-old.py %t/modulecache/OtherModule-*.swiftmodule
27+
// RUN: %{python} %S/Inputs/make-old.py %t/modulecache/OtherModule-*.swiftmodule
2828
//
2929
//
3030
// Actual test: Change a byte in OtherModule.swiftinterface, check we only rebuild its cached module.
3131
//
32-
// RUN: %S/Inputs/check-is-old.py %t/OtherModule.swiftinterface %t/LeafModule.swiftinterface
33-
// RUN: %S/Inputs/check-is-old.py %t/modulecache/OtherModule-*.swiftmodule %t/modulecache/LeafModule-*.swiftmodule
32+
// RUN: %{python} %S/Inputs/check-is-old.py %t/OtherModule.swiftinterface %t/LeafModule.swiftinterface
33+
// RUN: %{python} %S/Inputs/check-is-old.py %t/modulecache/OtherModule-*.swiftmodule %t/modulecache/LeafModule-*.swiftmodule
3434
// RUN: sed -e 's/OtherFunc2/OtterFunc2/' -i.prev %t/OtherModule.swiftinterface
35-
// RUN: %S/Inputs/make-old.py %t/OtherModule.swiftinterface
35+
// RUN: %{python} %S/Inputs/make-old.py %t/OtherModule.swiftinterface
3636
// RUN: rm %t/TestModule.swiftmodule
3737
// RUN: %target-swift-frontend -I %t -module-cache-path %t/modulecache -enable-parseable-module-interface -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s
38-
// RUN: %S/Inputs/check-is-new.py %t/modulecache/OtherModule-*.swiftmodule
39-
// RUN: %S/Inputs/check-is-old.py %t/modulecache/LeafModule-*.swiftmodule
38+
// RUN: %{python} %S/Inputs/check-is-new.py %t/modulecache/OtherModule-*.swiftmodule
39+
// RUN: %{python} %S/Inputs/check-is-old.py %t/modulecache/LeafModule-*.swiftmodule
4040

4141
import OtherModule
4242

test/ParseableInterface/ModuleCache/module-cache-intermediate-size-change-rebuilds-only-intermediate.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,26 +17,26 @@
1717
//
1818
// Setup phase 2: build modules, pushing timestamps of inputs and intermediates into the past as we go.
1919
//
20-
// RUN: %S/Inputs/make-old.py %t/leaf.swift %t/other.swift
20+
// RUN: %{python} %S/Inputs/make-old.py %t/leaf.swift %t/other.swift
2121
// RUN: %target-swift-frontend -I %t -emit-parseable-module-interface-path %t/LeafModule.swiftinterface -module-name LeafModule %t/leaf.swift -emit-module -o /dev/null
22-
// RUN: %S/Inputs/make-old.py %t/LeafModule.swiftinterface
22+
// RUN: %{python} %S/Inputs/make-old.py %t/LeafModule.swiftinterface
2323
// RUN: %target-swift-frontend -I %t -module-cache-path %t/modulecache -enable-parseable-module-interface -emit-parseable-module-interface-path %t/OtherModule.swiftinterface -module-name OtherModule %t/other.swift -emit-module -o /dev/null
24-
// RUN: %S/Inputs/make-old.py %t/modulecache/LeafModule-*.swiftmodule %t/OtherModule.swiftinterface
24+
// RUN: %{python} %S/Inputs/make-old.py %t/modulecache/LeafModule-*.swiftmodule %t/OtherModule.swiftinterface
2525
// RUN: %target-swift-frontend -I %t -module-cache-path %t/modulecache -enable-parseable-module-interface -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s
26-
// RUN: %S/Inputs/make-old.py %t/modulecache/OtherModule-*.swiftmodule
26+
// RUN: %{python} %S/Inputs/make-old.py %t/modulecache/OtherModule-*.swiftmodule
2727
//
2828
//
2929
// Actual test: make OtherModule.swiftinterface change size without changing mtime, check we only rebuild its cached module.
3030
//
31-
// RUN: %S/Inputs/check-is-old.py %t/OtherModule.swiftinterface %t/LeafModule.swiftinterface
32-
// RUN: %S/Inputs/check-is-old.py %t/modulecache/OtherModule-*.swiftmodule %t/modulecache/LeafModule-*.swiftmodule
31+
// RUN: %{python} %S/Inputs/check-is-old.py %t/OtherModule.swiftinterface %t/LeafModule.swiftinterface
32+
// RUN: %{python} %S/Inputs/check-is-old.py %t/modulecache/OtherModule-*.swiftmodule %t/modulecache/LeafModule-*.swiftmodule
3333
// RUN: echo "// size change" >>%t/OtherModule.swiftinterface
34-
// RUN: %S/Inputs/make-old.py %t/OtherModule.swiftinterface
35-
// RUN: %S/Inputs/check-is-old.py %t/OtherModule.swiftinterface
34+
// RUN: %{python} %S/Inputs/make-old.py %t/OtherModule.swiftinterface
35+
// RUN: %{python} %S/Inputs/check-is-old.py %t/OtherModule.swiftinterface
3636
// RUN: rm %t/TestModule.swiftmodule
3737
// RUN: %target-swift-frontend -I %t -module-cache-path %t/modulecache -enable-parseable-module-interface -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s
38-
// RUN: %S/Inputs/check-is-new.py %t/modulecache/OtherModule-*.swiftmodule
39-
// RUN: %S/Inputs/check-is-old.py %t/modulecache/LeafModule-*.swiftmodule
38+
// RUN: %{python} %S/Inputs/check-is-new.py %t/modulecache/OtherModule-*.swiftmodule
39+
// RUN: %{python} %S/Inputs/check-is-old.py %t/modulecache/LeafModule-*.swiftmodule
4040

4141
import OtherModule
4242

test/ParseableInterface/ModuleCache/module-cache-leaf-hash-change-rebuilds-all.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@
2929
//
3030
// Actual test: Change a byte in LeafModule.swiftinterface, check both cached modules get rebuilt.
3131
//
32-
// RUN: %S/Inputs/check-is-old.py %t/OtherModule.swiftinterface %t/LeafModule.swiftinterface
33-
// RUN: %S/Inputs/check-is-old.py %t/modulecache/OtherModule-*.swiftmodule %t/modulecache/LeafModule-*.swiftmodule
32+
// RUN: %{python} %S/Inputs/check-is-old.py %t/OtherModule.swiftinterface %t/LeafModule.swiftinterface
33+
// RUN: %{python} %S/Inputs/check-is-old.py %t/modulecache/OtherModule-*.swiftmodule %t/modulecache/LeafModule-*.swiftmodule
3434
// RUN: sed -e 's/LeafFunc2/LoafFunc2/' -i.prev %t/LeafModule.swiftinterface
3535
// RUN: %S/Inputs/make-old.py %t/LeafModule.swiftinterface
3636
// RUN: rm %t/TestModule.swiftmodule
3737
// RUN: %target-swift-frontend -I %t -module-cache-path %t/modulecache -enable-parseable-module-interface -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s
38-
// RUN: %S/Inputs/check-is-new.py %t/modulecache/OtherModule-*.swiftmodule %t/modulecache/LeafModule-*.swiftmodule
38+
// RUN: %{python} %S/Inputs/check-is-new.py %t/modulecache/OtherModule-*.swiftmodule %t/modulecache/LeafModule-*.swiftmodule
3939

4040
import OtherModule
4141

test/ParseableInterface/ModuleCache/module-cache-leaf-size-change-rebuilds-all.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,25 @@
1717
//
1818
// Setup phase 2: build modules, pushing timestamps of inputs and intermediates into the past as we go.
1919
//
20-
// RUN: %S/Inputs/make-old.py %t/leaf.swift %t/other.swift
20+
// RUN: %{python} %S/Inputs/make-old.py %t/leaf.swift %t/other.swift
2121
// RUN: %target-swift-frontend -I %t -emit-parseable-module-interface-path %t/LeafModule.swiftinterface -module-name LeafModule %t/leaf.swift -emit-module -o /dev/null
22-
// RUN: %S/Inputs/make-old.py %t/LeafModule.swiftinterface
22+
// RUN: %{python} %S/Inputs/make-old.py %t/LeafModule.swiftinterface
2323
// RUN: %target-swift-frontend -I %t -module-cache-path %t/modulecache -enable-parseable-module-interface -emit-parseable-module-interface-path %t/OtherModule.swiftinterface -module-name OtherModule %t/other.swift -emit-module -o /dev/null
24-
// RUN: %S/Inputs/make-old.py %t/modulecache/LeafModule-*.swiftmodule %t/OtherModule.swiftinterface
24+
// RUN: %{python} %S/Inputs/make-old.py %t/modulecache/LeafModule-*.swiftmodule %t/OtherModule.swiftinterface
2525
// RUN: %target-swift-frontend -I %t -module-cache-path %t/modulecache -enable-parseable-module-interface -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s
26-
// RUN: %S/Inputs/make-old.py %t/modulecache/OtherModule-*.swiftmodule
26+
// RUN: %{python} %S/Inputs/make-old.py %t/modulecache/OtherModule-*.swiftmodule
2727
//
2828
//
2929
// Actual test: make LeafModule.swiftinterface change size without changing mtime, check both cached modules get rebuilt.
3030
//
31-
// RUN: %S/Inputs/check-is-old.py %t/OtherModule.swiftinterface %t/LeafModule.swiftinterface
32-
// RUN: %S/Inputs/check-is-old.py %t/modulecache/OtherModule-*.swiftmodule %t/modulecache/LeafModule-*.swiftmodule
31+
// RUN: %{python} %S/Inputs/check-is-old.py %t/OtherModule.swiftinterface %t/LeafModule.swiftinterface
32+
// RUN: %{python} %S/Inputs/check-is-old.py %t/modulecache/OtherModule-*.swiftmodule %t/modulecache/LeafModule-*.swiftmodule
3333
// RUN: echo "// size change" >>%t/LeafModule.swiftinterface
34-
// RUN: %S/Inputs/make-old.py %t/LeafModule.swiftinterface
35-
// RUN: %S/Inputs/check-is-old.py %t/LeafModule.swiftinterface
34+
// RUN: %{python} %S/Inputs/make-old.py %t/LeafModule.swiftinterface
35+
// RUN: %{python} %S/Inputs/check-is-old.py %t/LeafModule.swiftinterface
3636
// RUN: rm %t/TestModule.swiftmodule
3737
// RUN: %target-swift-frontend -I %t -module-cache-path %t/modulecache -enable-parseable-module-interface -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s
38-
// RUN: %S/Inputs/check-is-new.py %t/modulecache/OtherModule-*.swiftmodule %t/modulecache/LeafModule-*.swiftmodule
38+
// RUN: %{python} %S/Inputs/check-is-new.py %t/modulecache/OtherModule-*.swiftmodule %t/modulecache/LeafModule-*.swiftmodule
3939

4040
import OtherModule
4141

test/ParseableInterface/ModuleCache/module-cache-no-rebuild.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,23 @@
1717
//
1818
// Setup phase 2: build modules, pushing timestamps of inputs and intermediates into the past as we go.
1919
//
20-
// RUN: %S/Inputs/make-old.py %t/leaf.swift %t/other.swift
20+
// RUN: %{python} %S/Inputs/make-old.py %t/leaf.swift %t/other.swift
2121
// RUN: %target-swift-frontend -I %t -emit-parseable-module-interface-path %t/LeafModule.swiftinterface -module-name LeafModule %t/leaf.swift -emit-module -o /dev/null
22-
// RUN: %S/Inputs/make-old.py %t/LeafModule.swiftinterface
22+
// RUN: %{python} %S/Inputs/make-old.py %t/LeafModule.swiftinterface
2323
// RUN: %target-swift-frontend -I %t -module-cache-path %t/modulecache -enable-parseable-module-interface -emit-parseable-module-interface-path %t/OtherModule.swiftinterface -module-name OtherModule %t/other.swift -emit-module -o /dev/null
24-
// RUN: %S/Inputs/make-old.py %t/modulecache/LeafModule-*.swiftmodule %t/OtherModule.swiftinterface
24+
// RUN: %{python} %S/Inputs/make-old.py %t/modulecache/LeafModule-*.swiftmodule %t/OtherModule.swiftinterface
2525
// RUN: %target-swift-frontend -I %t -module-cache-path %t/modulecache -enable-parseable-module-interface -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s
26-
// RUN: %S/Inputs/make-old.py %t/modulecache/OtherModule-*.swiftmodule
26+
// RUN: %{python} %S/Inputs/make-old.py %t/modulecache/OtherModule-*.swiftmodule
2727
//
2828
//
2929
// Actual test: rebuild output, check no intermediates gets rebuilt.
3030
//
31-
// RUN: %S/Inputs/check-is-old.py %t/OtherModule.swiftinterface %t/LeafModule.swiftinterface
32-
// RUN: %S/Inputs/check-is-old.py %t/modulecache/OtherModule-*.swiftmodule %t/modulecache/LeafModule-*.swiftmodule
31+
// RUN: %{python} %S/Inputs/check-is-old.py %t/OtherModule.swiftinterface %t/LeafModule.swiftinterface
32+
// RUN: %{python} %S/Inputs/check-is-old.py %t/modulecache/OtherModule-*.swiftmodule %t/modulecache/LeafModule-*.swiftmodule
3333
// RUN: rm %t/TestModule.swiftmodule
3434
// RUN: %target-swift-frontend -I %t -module-cache-path %t/modulecache -enable-parseable-module-interface -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s
35-
// RUN: %S/Inputs/check-is-old.py %t/OtherModule.swiftinterface %t/LeafModule.swiftinterface
36-
// RUN: %S/Inputs/check-is-old.py %t/modulecache/OtherModule-*.swiftmodule %t/modulecache/LeafModule-*.swiftmodule
35+
// RUN: %{python} %S/Inputs/check-is-old.py %t/OtherModule.swiftinterface %t/LeafModule.swiftinterface
36+
// RUN: %{python} %S/Inputs/check-is-old.py %t/modulecache/OtherModule-*.swiftmodule %t/modulecache/LeafModule-*.swiftmodule
3737

3838
import OtherModule
3939

0 commit comments

Comments
 (0)