From a774255380652c10ce3b01021542edf4c1702a25 Mon Sep 17 00:00:00 2001 From: Ramon Asuncion Date: Mon, 29 Sep 2025 10:33:04 -0700 Subject: [PATCH 1/2] [Test][Interfacehash] Rewrite cp commands for Lit shell Convert `// RUN: cp %t/{a,x}.swift` to `// RUN: cp %t/a.swift %t/x.swift` in InterfaceHash test for compatibility with LLVM Lit interal shell. --- test/InterfaceHash/added_method-type.swift | 4 ++-- test/InterfaceHash/added_private_class_private_property.swift | 4 ++-- test/InterfaceHash/added_private_class_property.swift | 4 ++-- test/InterfaceHash/added_private_enum_private_property.swift | 4 ++-- test/InterfaceHash/added_private_enum_property.swift | 4 ++-- test/InterfaceHash/added_private_method.swift | 4 ++-- test/InterfaceHash/added_private_method_value_types.swift | 4 ++-- test/InterfaceHash/added_private_protocol_method.swift | 4 ++-- test/InterfaceHash/added_private_protocol_property.swift | 4 ++-- .../InterfaceHash/added_private_struct_private_property.swift | 4 ++-- test/InterfaceHash/added_private_struct_property.swift | 4 ++-- test/InterfaceHash/edited_method_body.swift | 4 ++-- test/InterfaceHash/edited_property_getter.swift | 4 ++-- 13 files changed, 26 insertions(+), 26 deletions(-) diff --git a/test/InterfaceHash/added_method-type.swift b/test/InterfaceHash/added_method-type.swift index cdfac2368a995..b62c94e855e47 100644 --- a/test/InterfaceHash/added_method-type.swift +++ b/test/InterfaceHash/added_method-type.swift @@ -3,10 +3,10 @@ // RUN: %empty-directory(%t) // RUN: %{python} %utils/split_file.py -o %t %s -// RUN: cp %t/{a,x}.swift +// RUN: cp %t/a.swift %t/x.swift // RUN: %target-swift-frontend -typecheck -primary-file %t/x.swift -emit-reference-dependencies-path %t/x.swiftdeps -module-name main // RUN: %{python} %S/../Inputs/process_fine_grained_swiftdeps_with_fingerprints.py %swift-dependency-tool %t/x.swiftdeps > %t/a-processed.swiftdeps -// RUN: cp %t/{b,x}.swift +// RUN: cp %t/b.swift %t/x.swift // RUN: %target-swift-frontend -typecheck -primary-file %t/x.swift -emit-reference-dependencies-path %t/x.swiftdeps -module-name main // RUN: %{python} %S/../Inputs/process_fine_grained_swiftdeps_with_fingerprints.py %swift-dependency-tool %t/x.swiftdeps > %t/b-processed.swiftdeps diff --git a/test/InterfaceHash/added_private_class_private_property.swift b/test/InterfaceHash/added_private_class_private_property.swift index 59c87f47f9309..d467b9b840533 100644 --- a/test/InterfaceHash/added_private_class_private_property.swift +++ b/test/InterfaceHash/added_private_class_private_property.swift @@ -1,9 +1,9 @@ // RUN: %empty-directory(%t) // RUN: %{python} %utils/split_file.py -o %t %s -// RUN: cp %t/{a,x}.swift +// RUN: cp %t/a.swift %t/x.swift // RUN: %target-swift-frontend -typecheck -primary-file %t/x.swift -emit-reference-dependencies-path %t/x.swiftdeps -module-name main // RUN: %{python} %S/../Inputs/process_fine_grained_swiftdeps_with_fingerprints.py %swift-dependency-tool %t/x.swiftdeps > %t/a-processed.swiftdeps -// RUN: cp %t/{b,x}.swift +// RUN: cp %t/b.swift %t/x.swift // RUN: %target-swift-frontend -typecheck -primary-file %t/x.swift -emit-reference-dependencies-path %t/x.swiftdeps -module-name main // RUN: %{python} %S/../Inputs/process_fine_grained_swiftdeps_with_fingerprints.py %swift-dependency-tool %t/x.swiftdeps > %t/b-processed.swiftdeps diff --git a/test/InterfaceHash/added_private_class_property.swift b/test/InterfaceHash/added_private_class_property.swift index 3fdd3686f97d9..4a5deedd5b70b 100644 --- a/test/InterfaceHash/added_private_class_property.swift +++ b/test/InterfaceHash/added_private_class_property.swift @@ -1,9 +1,9 @@ // RUN: %empty-directory(%t) // RUN: %{python} %utils/split_file.py -o %t %s -// RUN: cp %t/{a,x}.swift +// RUN: cp %t/a.swift %t/x.swift // RUN: %target-swift-frontend -typecheck -primary-file %t/x.swift -emit-reference-dependencies-path %t/x.swiftdeps -module-name main // RUN: %{python} %S/../Inputs/process_fine_grained_swiftdeps_with_fingerprints.py %swift-dependency-tool %t/x.swiftdeps > %t/a-processed.swiftdeps -// RUN: cp %t/{b,x}.swift +// RUN: cp %t/b.swift %t/x.swift // RUN: %target-swift-frontend -typecheck -primary-file %t/x.swift -emit-reference-dependencies-path %t/x.swiftdeps -module-name main // RUN: %{python} %S/../Inputs/process_fine_grained_swiftdeps_with_fingerprints.py %swift-dependency-tool %t/x.swiftdeps > %t/b-processed.swiftdeps diff --git a/test/InterfaceHash/added_private_enum_private_property.swift b/test/InterfaceHash/added_private_enum_private_property.swift index 6c667a2c97098..6bec4ceb7a243 100644 --- a/test/InterfaceHash/added_private_enum_private_property.swift +++ b/test/InterfaceHash/added_private_enum_private_property.swift @@ -3,10 +3,10 @@ // RUN: %empty-directory(%t) // RUN: %{python} %utils/split_file.py -o %t %s -// RUN: cp %t/{a,x}.swift +// RUN: cp %t/a.swift %t/x.swift // RUN: %target-swift-frontend -typecheck -primary-file %t/x.swift -emit-reference-dependencies-path %t/x.swiftdeps -module-name main // RUN: %{python} %S/../Inputs/process_fine_grained_swiftdeps_with_fingerprints.py %swift-dependency-tool %t/x.swiftdeps > %t/a-processed.swiftdeps -// RUN: cp %t/{b,x}.swift +// RUN: cp %t/b.swift %t/x.swift // RUN: %target-swift-frontend -typecheck -primary-file %t/x.swift -emit-reference-dependencies-path %t/x.swiftdeps -module-name main // RUN: %{python} %S/../Inputs/process_fine_grained_swiftdeps_with_fingerprints.py %swift-dependency-tool %t/x.swiftdeps > %t/b-processed.swiftdeps diff --git a/test/InterfaceHash/added_private_enum_property.swift b/test/InterfaceHash/added_private_enum_property.swift index 33de0a3d6bf95..e04c4ca75ce86 100644 --- a/test/InterfaceHash/added_private_enum_property.swift +++ b/test/InterfaceHash/added_private_enum_property.swift @@ -3,10 +3,10 @@ // RUN: %empty-directory(%t) // RUN: %{python} %utils/split_file.py -o %t %s -// RUN: cp %t/{a,x}.swift +// RUN: cp %t/a.swift %t/x.swift // RUN: %target-swift-frontend -typecheck -primary-file %t/x.swift -emit-reference-dependencies-path %t/x.swiftdeps -module-name main // RUN: %{python} %S/../Inputs/process_fine_grained_swiftdeps_with_fingerprints.py %swift-dependency-tool %t/x.swiftdeps > %t/a-processed.swiftdeps -// RUN: cp %t/{b,x}.swift +// RUN: cp %t/b.swift %t/x.swift // RUN: %target-swift-frontend -typecheck -primary-file %t/x.swift -emit-reference-dependencies-path %t/x.swiftdeps -module-name main // RUN: %{python} %S/../Inputs/process_fine_grained_swiftdeps_with_fingerprints.py %swift-dependency-tool %t/x.swiftdeps > %t/b-processed.swiftdeps diff --git a/test/InterfaceHash/added_private_method.swift b/test/InterfaceHash/added_private_method.swift index 759a4b0077ece..fa52408149e8a 100644 --- a/test/InterfaceHash/added_private_method.swift +++ b/test/InterfaceHash/added_private_method.swift @@ -3,10 +3,10 @@ // RUN: %empty-directory(%t) // RUN: %{python} %utils/split_file.py -o %t %s -// RUN: cp %t/{a,x}.swift +// RUN: cp %t/a.swift %t/x.swift // RUN: %target-swift-frontend -typecheck -primary-file %t/x.swift -emit-reference-dependencies-path %t/x.swiftdeps -module-name main // RUN: %{python} %S/../Inputs/process_fine_grained_swiftdeps_with_fingerprints.py %swift-dependency-tool %t/x.swiftdeps > %t/a-processed.swiftdeps -// RUN: cp %t/{b,x}.swift +// RUN: cp %t/b.swift %t/x.swift // RUN: %target-swift-frontend -typecheck -primary-file %t/x.swift -emit-reference-dependencies-path %t/x.swiftdeps -module-name main // RUN: %{python} %S/../Inputs/process_fine_grained_swiftdeps_with_fingerprints.py %swift-dependency-tool %t/x.swiftdeps > %t/b-processed.swiftdeps diff --git a/test/InterfaceHash/added_private_method_value_types.swift b/test/InterfaceHash/added_private_method_value_types.swift index b3cc211c871bf..8b3e6fdf88c03 100644 --- a/test/InterfaceHash/added_private_method_value_types.swift +++ b/test/InterfaceHash/added_private_method_value_types.swift @@ -3,10 +3,10 @@ // RUN: %empty-directory(%t) // RUN: %{python} %utils/split_file.py -o %t %s -// RUN: cp %t/{a,x}.swift +// RUN: cp %t/a.swift %t/x.swift // RUN: %target-swift-frontend -typecheck -primary-file %t/x.swift -emit-reference-dependencies-path %t/x.swiftdeps -module-name main // RUN: %{python} %S/../Inputs/process_fine_grained_swiftdeps_with_fingerprints.py %swift-dependency-tool %t/x.swiftdeps > %t/a-processed.swiftdeps -// RUN: cp %t/{b,x}.swift +// RUN: cp %t/b.swift %t/x.swiftt // RUN: %target-swift-frontend -typecheck -primary-file %t/x.swift -emit-reference-dependencies-path %t/x.swiftdeps -module-name main // RUN: %{python} %S/../Inputs/process_fine_grained_swiftdeps_with_fingerprints.py %swift-dependency-tool %t/x.swiftdeps > %t/b-processed.swiftdeps diff --git a/test/InterfaceHash/added_private_protocol_method.swift b/test/InterfaceHash/added_private_protocol_method.swift index a1afc8442acaa..05556db29b007 100644 --- a/test/InterfaceHash/added_private_protocol_method.swift +++ b/test/InterfaceHash/added_private_protocol_method.swift @@ -3,10 +3,10 @@ // RUN: %empty-directory(%t) // RUN: %{python} %utils/split_file.py -o %t %s -// RUN: cp %t/{a,x}.swift +// RUN: cp %t/a.swift %t/x.swift // RUN: %target-swift-frontend -typecheck -primary-file %t/x.swift -emit-reference-dependencies-path %t/x.swiftdeps -module-name main // RUN: %{python} %S/../Inputs/process_fine_grained_swiftdeps_with_fingerprints.py %swift-dependency-tool %t/x.swiftdeps > %t/a-processed.swiftdeps -// RUN: cp %t/{b,x}.swift +// RUN: cp %t/b.swift %t/x.swift // RUN: %target-swift-frontend -typecheck -primary-file %t/x.swift -emit-reference-dependencies-path %t/x.swiftdeps -module-name main // RUN: %{python} %S/../Inputs/process_fine_grained_swiftdeps_with_fingerprints.py %swift-dependency-tool %t/x.swiftdeps > %t/b-processed.swiftdeps diff --git a/test/InterfaceHash/added_private_protocol_property.swift b/test/InterfaceHash/added_private_protocol_property.swift index 599109568d87a..bac725ea2ad48 100644 --- a/test/InterfaceHash/added_private_protocol_property.swift +++ b/test/InterfaceHash/added_private_protocol_property.swift @@ -3,10 +3,10 @@ // RUN: %empty-directory(%t) // RUN: %{python} %utils/split_file.py -o %t %s -// RUN: cp %t/{a,x}.swift +// RUN: cp %t/a.swift %t/x.swift // RUN: %target-swift-frontend -typecheck -primary-file %t/x.swift -emit-reference-dependencies-path %t/x.swiftdeps -module-name main // RUN: %{python} %S/../Inputs/process_fine_grained_swiftdeps_with_fingerprints.py %swift-dependency-tool %t/x.swiftdeps > %t/a-processed.swiftdeps -// RUN: cp %t/{b,x}.swift +// RUN: cp %t/b.swift %t/x.swift // RUN: %target-swift-frontend -typecheck -primary-file %t/x.swift -emit-reference-dependencies-path %t/x.swiftdeps -module-name main // RUN: %{python} %S/../Inputs/process_fine_grained_swiftdeps_with_fingerprints.py %swift-dependency-tool %t/x.swiftdeps > %t/b-processed.swiftdeps diff --git a/test/InterfaceHash/added_private_struct_private_property.swift b/test/InterfaceHash/added_private_struct_private_property.swift index 1e1af903673a8..710d8f45f9f54 100644 --- a/test/InterfaceHash/added_private_struct_private_property.swift +++ b/test/InterfaceHash/added_private_struct_private_property.swift @@ -3,10 +3,10 @@ // RUN: %empty-directory(%t) // RUN: %{python} %utils/split_file.py -o %t %s -// RUN: cp %t/{a,x}.swift +// RUN: cp %t/a.swift %t/x.swift // RUN: %target-swift-frontend -typecheck -primary-file %t/x.swift -emit-reference-dependencies-path %t/x.swiftdeps -module-name main // RUN: %{python} %S/../Inputs/process_fine_grained_swiftdeps_with_fingerprints.py %swift-dependency-tool %t/x.swiftdeps > %t/a-processed.swiftdeps -// RUN: cp %t/{b,x}.swift +// RUN: cp %t/b.swift %t/x.swift // RUN: %target-swift-frontend -typecheck -primary-file %t/x.swift -emit-reference-dependencies-path %t/x.swiftdeps -module-name main // RUN: %{python} %S/../Inputs/process_fine_grained_swiftdeps_with_fingerprints.py %swift-dependency-tool %t/x.swiftdeps > %t/b-processed.swiftdeps diff --git a/test/InterfaceHash/added_private_struct_property.swift b/test/InterfaceHash/added_private_struct_property.swift index 0b14dd798d38f..bd70145ff68c2 100644 --- a/test/InterfaceHash/added_private_struct_property.swift +++ b/test/InterfaceHash/added_private_struct_property.swift @@ -3,10 +3,10 @@ // RUN: %empty-directory(%t) // RUN: %{python} %utils/split_file.py -o %t %s -// RUN: cp %t/{a,x}.swift +// RUN: cp %t/a.swift %t/x.swift // RUN: %target-swift-frontend -typecheck -primary-file %t/x.swift -emit-reference-dependencies-path %t/x.swiftdeps -module-name main // RUN: %{python} %S/../Inputs/process_fine_grained_swiftdeps_with_fingerprints.py %swift-dependency-tool %t/x.swiftdeps > %t/a-processed.swiftdeps -// RUN: cp %t/{b,x}.swift +// RUN: cp %t/b.swift %t/x.swift // RUN: %target-swift-frontend -typecheck -primary-file %t/x.swift -emit-reference-dependencies-path %t/x.swiftdeps -module-name main // RUN: %{python} %S/../Inputs/process_fine_grained_swiftdeps_with_fingerprints.py %swift-dependency-tool %t/x.swiftdeps > %t/b-processed.swiftdeps diff --git a/test/InterfaceHash/edited_method_body.swift b/test/InterfaceHash/edited_method_body.swift index d6f04212398e2..9a8feb02b84c8 100644 --- a/test/InterfaceHash/edited_method_body.swift +++ b/test/InterfaceHash/edited_method_body.swift @@ -4,10 +4,10 @@ // RUN: %empty-directory(%t) // RUN: %empty-directory(%t/ModuleCache) // RUN: %{python} %utils/split_file.py -o %t %s -// RUN: cp %t/{a,x}.swift +// RUN: cp %t/a.swift %t/x.swift // RUN: env SWIFT_FORCE_MODULE_LOADING=prefer-interface %target-swift-frontend -typecheck -primary-file %t/x.swift -emit-reference-dependencies-path %t/x.swiftdeps -module-name main -module-cache-path %t/ModuleCache -Rmodule-loading // RUN: %{python} %S/../Inputs/process_fine_grained_swiftdeps_with_fingerprints.py %swift-dependency-tool %t/x.swiftdeps > %t/a-processed.swiftdeps -// RUN: cp %t/{b,x}.swift +// RUN: cp %t/b.swift %t/x.swift // RUN: env SWIFT_FORCE_MODULE_LOADING=prefer-interface %target-swift-frontend -typecheck -primary-file %t/x.swift -emit-reference-dependencies-path %t/x.swiftdeps -module-name main -module-cache-path %t/ModuleCache -Rmodule-loading // RUN: %{python} %S/../Inputs/process_fine_grained_swiftdeps_with_fingerprints.py %swift-dependency-tool %t/x.swiftdeps > %t/b-processed.swiftdeps diff --git a/test/InterfaceHash/edited_property_getter.swift b/test/InterfaceHash/edited_property_getter.swift index 17133f96c4263..d98f8625e5729 100644 --- a/test/InterfaceHash/edited_property_getter.swift +++ b/test/InterfaceHash/edited_property_getter.swift @@ -4,10 +4,10 @@ // RUN: %empty-directory(%t) // RUN: %empty-directory(%t/ModuleCache) // RUN: %{python} %utils/split_file.py -o %t %s -// RUN: cp %t/{a,x}.swift +// RUN: cp %t/a.swift %t/x.swift // RUN: env SWIFT_FORCE_MODULE_LOADING=prefer-interface %target-swift-frontend -typecheck -primary-file %t/x.swift -emit-reference-dependencies-path %t/x.swiftdeps -module-name main -module-cache-path %t/ModuleCache -Rmodule-loading // RUN: %{python} %S/../Inputs/process_fine_grained_swiftdeps_with_fingerprints.py %swift-dependency-tool %t/x.swiftdeps > %t/a-processed.swiftdeps -// RUN: cp %t/{b,x}.swift +// RUN: cp %t/b.swift %t/x.swift // RUN: env SWIFT_FORCE_MODULE_LOADING=prefer-interface %target-swift-frontend -typecheck -primary-file %t/x.swift -emit-reference-dependencies-path %t/x.swiftdeps -module-name main -module-cache-path %t/ModuleCache -Rmodule-loading // RUN: %{python} %S/../Inputs/process_fine_grained_swiftdeps_with_fingerprints.py %swift-dependency-tool %t/x.swiftdeps > %t/b-processed.swiftdeps From 4a162723bd4e2bb80b96616170e780013ed09761 Mon Sep 17 00:00:00 2001 From: Ramon Asuncion Date: Tue, 30 Sep 2025 15:20:49 -0700 Subject: [PATCH 2/2] Remove extra t in %t/x.swift --- test/InterfaceHash/added_private_method_value_types.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/InterfaceHash/added_private_method_value_types.swift b/test/InterfaceHash/added_private_method_value_types.swift index 8b3e6fdf88c03..75467b6877891 100644 --- a/test/InterfaceHash/added_private_method_value_types.swift +++ b/test/InterfaceHash/added_private_method_value_types.swift @@ -6,7 +6,7 @@ // RUN: cp %t/a.swift %t/x.swift // RUN: %target-swift-frontend -typecheck -primary-file %t/x.swift -emit-reference-dependencies-path %t/x.swiftdeps -module-name main // RUN: %{python} %S/../Inputs/process_fine_grained_swiftdeps_with_fingerprints.py %swift-dependency-tool %t/x.swiftdeps > %t/a-processed.swiftdeps -// RUN: cp %t/b.swift %t/x.swiftt +// RUN: cp %t/b.swift %t/x.swift // RUN: %target-swift-frontend -typecheck -primary-file %t/x.swift -emit-reference-dependencies-path %t/x.swiftdeps -module-name main // RUN: %{python} %S/../Inputs/process_fine_grained_swiftdeps_with_fingerprints.py %swift-dependency-tool %t/x.swiftdeps > %t/b-processed.swiftdeps