Skip to content

Commit 64268be

Browse files
committed
test: invoke python tools properly
Ensure that we use the correct python to run the python based tools. This also allows these tools to run on Windows which will not necessarily associate the python script with an interpreter (python).
1 parent aa6742c commit 64268be

31 files changed

+31
-31
lines changed

test/Compatibility/protocol_composition.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %utils/split_file.py -o %t %s
2+
// RUN: %{python} %utils/split_file.py -o %t %s
33
// RUN: %target-swift-frontend -typecheck -primary-file %t/swift3.swift %t/common.swift -verify -swift-version 3
44
// RUN: %target-swift-frontend -typecheck -primary-file %t/swift4.swift %t/common.swift -verify -swift-version 4
55

test/Compatibility/throws_identifier.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %utils/split_file.py -o %t %s
2+
// RUN: %{python} %utils/split_file.py -o %t %s
33
// RUN: %target-swift-frontend -parse -primary-file %t/swift3.swift -verify -swift-version 3
44
// RUN: %target-swift-frontend -parse -primary-file %t/swift4.swift -verify -swift-version 4
55

test/IRGen/cf.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %utils/chex.py < %s > %t/cf.sil
2+
// RUN: %{python} %utils/chex.py < %s > %t/cf.sil
33
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -sdk %S/Inputs %t/cf.sil -emit-ir -import-cf-types | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize %t/cf.sil -DINT=i%target-ptrsize
44

55
// REQUIRES: CPU=i386 || CPU=x86_64

test/IRGen/class_resilience.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %utils/chex.py < %s > %t/class_resilience.swift
2+
// RUN: %{python} %utils/chex.py < %s > %t/class_resilience.swift
33
// RUN: %target-swift-frontend -emit-module -enable-resilience -enable-class-resilience -emit-module-path=%t/resilient_struct.swiftmodule -module-name=resilient_struct %S/../Inputs/resilient_struct.swift
44
// RUN: %target-swift-frontend -emit-module -enable-resilience -enable-class-resilience -emit-module-path=%t/resilient_enum.swiftmodule -module-name=resilient_enum -I %t %S/../Inputs/resilient_enum.swift
55
// RUN: %target-swift-frontend -emit-module -enable-resilience -enable-class-resilience -emit-module-path=%t/resilient_class.swiftmodule -module-name=resilient_class -I %t %S/../Inputs/resilient_class.swift

test/IRGen/generic_classes.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %utils/chex.py < %s > %t/generic_classes.sil
2+
// RUN: %{python} %utils/chex.py < %s > %t/generic_classes.sil
33
// RUN: %target-swift-frontend %t/generic_classes.sil -emit-ir | %FileCheck %t/generic_classes.sil --check-prefix=CHECK --check-prefix=CHECK-%target-runtime
44
// RUN: %target-swift-frontend -Osize %t/generic_classes.sil -emit-ir | %FileCheck %t/generic_classes.sil --check-prefix=OSIZE
55

test/IRGen/generic_structs.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %utils/chex.py < %s > %t/generic_structs.sil
2+
// RUN: %{python} %utils/chex.py < %s > %t/generic_structs.sil
33
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %t/generic_structs.sil -emit-ir | %FileCheck %t/generic_structs.sil
44

55
// REQUIRES: CPU=x86_64

test/IRGen/generic_vtable.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %utils/chex.py < %s > %t/generic_vtable.swift
2+
// RUN: %{python} %utils/chex.py < %s > %t/generic_vtable.swift
33
// RUN: %target-swift-frontend %t/generic_vtable.swift -emit-ir | %FileCheck %t/generic_vtable.swift --check-prefix=CHECK
44

55
// REQUIRES: CPU=x86_64

test/IRGen/keypaths.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
// RUN: %empty-directory(%t)
33
// -- Convert <i32 0x...> constants to decimal constants that LLVM will print
4-
// RUN: %utils/chex.py < %s > %t/keypaths.sil
4+
// RUN: %{python} %utils/chex.py < %s > %t/keypaths.sil
55
// RUN: %target-swift-frontend -module-name keypaths -emit-ir %s | %FileCheck %t/keypaths.sil --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-%target-os
66

77
sil_stage canonical

test/IRGen/keypaths_objc.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
// RUN: %empty-directory(%t)
3-
// RUN: %utils/chex.py < %s > %t/keypaths_objc.sil
3+
// RUN: %{python} %utils/chex.py < %s > %t/keypaths_objc.sil
44
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-ir %t/keypaths_objc.sil | %FileCheck %t/keypaths_objc.sil --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize
55
// REQUIRES: objc_interop
66

test/IRGen/property_descriptor.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %utils/chex.py < %s > %t/property_descriptor.sil
2+
// RUN: %{python} %utils/chex.py < %s > %t/property_descriptor.sil
33
// RUN: %target-swift-frontend -emit-ir %t/property_descriptor.sil | %FileCheck --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK %t/property_descriptor.sil
44

55
sil_stage canonical

test/InterfaceHash/added_function.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %utils/split_file.py -o %t %s
2+
// RUN: %{python} %utils/split_file.py -o %t %s
33
// RUN: %target-swift-frontend -dump-interface-hash %t/a.swift 2> %t/a.hash
44
// RUN: %target-swift-frontend -dump-interface-hash %t/b.swift 2> %t/b.hash
55
// RUN: not cmp %t/a.hash %t/b.hash

test/InterfaceHash/added_method.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %utils/split_file.py -o %t %s
2+
// RUN: %{python} %utils/split_file.py -o %t %s
33
// RUN: %target-swift-frontend -dump-interface-hash %t/a.swift 2> %t/a.hash
44
// RUN: %target-swift-frontend -dump-interface-hash %t/b.swift 2> %t/b.hash
55
// RUN: not cmp %t/a.hash %t/b.hash

test/InterfaceHash/added_private_class_private_property.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %utils/split_file.py -o %t %s
2+
// RUN: %{python} %utils/split_file.py -o %t %s
33
// RUN: %target-swift-frontend -dump-interface-hash %t/a.swift 2> %t/a.hash
44
// RUN: %target-swift-frontend -dump-interface-hash %t/b.swift 2> %t/b.hash
55
// RUN: not cmp %t/a.hash %t/b.hash

test/InterfaceHash/added_private_class_property.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %utils/split_file.py -o %t %s
2+
// RUN: %{python} %utils/split_file.py -o %t %s
33
// RUN: %target-swift-frontend -dump-interface-hash %t/a.swift 2> %t/a.hash
44
// RUN: %target-swift-frontend -dump-interface-hash %t/b.swift 2> %t/b.hash
55
// RUN: not cmp %t/a.hash %t/b.hash

test/InterfaceHash/added_private_enum_private_property.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %utils/split_file.py -o %t %s
2+
// RUN: %{python} %utils/split_file.py -o %t %s
33
// RUN: %target-swift-frontend -dump-interface-hash %t/a.swift 2> %t/a.hash
44
// RUN: %target-swift-frontend -dump-interface-hash %t/b.swift 2> %t/b.hash
55
// RUN: not cmp %t/a.hash %t/b.hash

test/InterfaceHash/added_private_enum_property.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %utils/split_file.py -o %t %s
2+
// RUN: %{python} %utils/split_file.py -o %t %s
33
// RUN: %target-swift-frontend -dump-interface-hash %t/a.swift 2> %t/a.hash
44
// RUN: %target-swift-frontend -dump-interface-hash %t/b.swift 2> %t/b.hash
55
// RUN: not cmp %t/a.hash %t/b.hash

test/InterfaceHash/added_private_method.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %utils/split_file.py -o %t %s
2+
// RUN: %{python} %utils/split_file.py -o %t %s
33
// RUN: %target-swift-frontend -dump-interface-hash %t/a.swift 2> %t/a.hash
44
// RUN: %target-swift-frontend -dump-interface-hash %t/b.swift 2> %t/b.hash
55
// RUN: not cmp %t/a.hash %t/b.hash

test/InterfaceHash/added_private_method_value_types.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %utils/split_file.py -o %t %s
2+
// RUN: %{python} %utils/split_file.py -o %t %s
33
// RUN: %target-swift-frontend -dump-interface-hash %t/a.swift 2> %t/a.hash
44
// RUN: %target-swift-frontend -dump-interface-hash %t/b.swift 2> %t/b.hash
55
// RUN: not cmp %t/a.hash %t/b.hash

test/InterfaceHash/added_private_protocol_method.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %utils/split_file.py -o %t %s
2+
// RUN: %{python} %utils/split_file.py -o %t %s
33
// RUN: %target-swift-frontend -dump-interface-hash %t/a.swift 2> %t/a.hash
44
// RUN: %target-swift-frontend -dump-interface-hash %t/b.swift 2> %t/b.hash
55
// RUN: not cmp %t/a.hash %t/b.hash

test/InterfaceHash/added_private_protocol_property.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %utils/split_file.py -o %t %s
2+
// RUN: %{python} %utils/split_file.py -o %t %s
33
// RUN: %target-swift-frontend -dump-interface-hash %t/a.swift 2> %t/a.hash
44
// RUN: %target-swift-frontend -dump-interface-hash %t/b.swift 2> %t/b.hash
55
// RUN: not cmp %t/a.hash %t/b.hash

test/InterfaceHash/added_private_struct_private_property.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %utils/split_file.py -o %t %s
2+
// RUN: %{python} %utils/split_file.py -o %t %s
33
// RUN: %target-swift-frontend -dump-interface-hash %t/a.swift 2> %t/a.hash
44
// RUN: %target-swift-frontend -dump-interface-hash %t/b.swift 2> %t/b.hash
55
// RUN: not cmp %t/a.hash %t/b.hash

test/InterfaceHash/added_private_struct_property.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %utils/split_file.py -o %t %s
2+
// RUN: %{python} %utils/split_file.py -o %t %s
33
// RUN: %target-swift-frontend -dump-interface-hash %t/a.swift 2> %t/a.hash
44
// RUN: %target-swift-frontend -dump-interface-hash %t/b.swift 2> %t/b.hash
55
// RUN: not cmp %t/a.hash %t/b.hash

test/InterfaceHash/changed_private_var_type.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %utils/split_file.py -o %t %s
2+
// RUN: %{python} %utils/split_file.py -o %t %s
33
// RUN: %target-swift-frontend -dump-interface-hash %t/a.swift 2> %t/a.hash
44
// RUN: %target-swift-frontend -dump-interface-hash %t/b.swift 2> %t/b.hash
55
// RUN: not cmp %t/a.hash %t/b.hash

test/InterfaceHash/changed_var_name.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %utils/split_file.py -o %t %s
2+
// RUN: %{python} %utils/split_file.py -o %t %s
33
// RUN: %target-swift-frontend -dump-interface-hash %t/a.swift 2> %t/a.hash
44
// RUN: %target-swift-frontend -dump-interface-hash %t/b.swift 2> %t/b.hash
55
// RUN: not cmp %t/a.hash %t/b.hash

test/InterfaceHash/changed_var_type.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %utils/split_file.py -o %t %s
2+
// RUN: %{python} %utils/split_file.py -o %t %s
33
// RUN: %target-swift-frontend -dump-interface-hash %t/a.swift 2> %t/a.hash
44
// RUN: %target-swift-frontend -dump-interface-hash %t/b.swift 2> %t/b.hash
55
// RUN: not cmp %t/a.hash %t/b.hash

test/InterfaceHash/edited_function_body.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %utils/split_file.py -o %t %s
2+
// RUN: %{python} %utils/split_file.py -o %t %s
33
// RUN: %target-swift-frontend -dump-interface-hash %t/a.swift 2> %t/a.hash
44
// RUN: %target-swift-frontend -dump-interface-hash %t/b.swift 2> %t/b.hash
55
// RUN: cmp %t/a.hash %t/b.hash

test/InterfaceHash/edited_method_body.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %utils/split_file.py -o %t %s
2+
// RUN: %{python} %utils/split_file.py -o %t %s
33
// RUN: %target-swift-frontend -dump-interface-hash %t/a.swift 2> %t/a.hash
44
// RUN: %target-swift-frontend -dump-interface-hash %t/b.swift 2> %t/b.hash
55
// RUN: cmp %t/a.hash %t/b.hash

test/InterfaceHash/edited_property_getter.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %utils/split_file.py -o %t %s
2+
// RUN: %{python} %utils/split_file.py -o %t %s
33
// RUN: %target-swift-frontend -dump-interface-hash %t/a.swift 2> %t/a.hash
44
// RUN: %target-swift-frontend -dump-interface-hash %t/b.swift 2> %t/b.hash
55
// RUN: cmp %t/a.hash %t/b.hash

test/Sema/accessibility_shared_private.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %utils/split_file.py -o %t %s
2+
// RUN: %{python} %utils/split_file.py -o %t %s
33
// RUN: %target-swift-frontend -swift-version 4 -typecheck %t/declarations.swift %t/other_file_extensions.swift -verify
44

55
// BEGIN declarations.swift

test/attr/accessibility_multifile.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %utils/split_file.py -o %t %s
2+
// RUN: %{python} %utils/split_file.py -o %t %s
33
// RUN: %target-swift-frontend -typecheck %t/file1.swift -primary-file %t/file2.swift -verify
44

55
// BEGIN file1.swift

test/sil-passpipeline-dump/basic.test-sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %sil-passpipeline-dumper -Onone | %FileCheck %s
2-
// RUN: %sil-passpipeline-dumper -Onone | python -c 'import json; import sys; json.load(sys.stdin)'
2+
// RUN: %sil-passpipeline-dumper -Onone | %{python} -c 'import json; import sys; json.load(sys.stdin)'
33

44
// CHECK: [
55
// CHECK: [

0 commit comments

Comments
 (0)