From 1ba5cbcbe768c2e9800a6ce502c7b146fd2e7a0a Mon Sep 17 00:00:00 2001 From: Ramon Asuncion Date: Tue, 30 Sep 2025 19:26:50 -0700 Subject: [PATCH] [Test][IDE] Replace process substitution with temp file for internal shell Replace `diff -u <(tail -n +9 %s) %t.txt` substitution with a temp file for LLVMs LIT internal shell Note: Start tail at line 10 to skip `// EXPECTED OUTPUT STARTS BELOW THIS LINE` so the temp file matches the actual compiler output --- test/IDE/print_clang_bool_bridging.swift | 3 ++- test/IDE/print_clang_swift_name.swift | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test/IDE/print_clang_bool_bridging.swift b/test/IDE/print_clang_bool_bridging.swift index d7cee05380dff..bb6306babce53 100644 --- a/test/IDE/print_clang_bool_bridging.swift +++ b/test/IDE/print_clang_bool_bridging.swift @@ -1,7 +1,8 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-ide-test -print-module -source-filename %s -module-to-print=BoolBridgingTests -function-definitions=false -skip-unavailable -F %S/Inputs/mock-sdk > %t.txt -// RUN: diff -u <(tail -n +9 %s) %t.txt +// RUN: tail -n +10 %s > %t/a +// RUN: diff -u %t/a %t.txt // REQUIRES: objc_interop diff --git a/test/IDE/print_clang_swift_name.swift b/test/IDE/print_clang_swift_name.swift index 499c876fdd758..2a7a97ec18851 100644 --- a/test/IDE/print_clang_swift_name.swift +++ b/test/IDE/print_clang_swift_name.swift @@ -1,7 +1,8 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-ide-test(mock-sdk: %clang-importer-sdk) -print-module -source-filename %s -module-to-print=SwiftNameTests -function-definitions=false -F %S/Inputs/mock-sdk > %t.txt -// RUN: diff -u <(tail -n +9 %s) %t.txt +// RUN: tail -n +10 %s > %t/a +// RUN: diff -u %t/a %t.txt // REQUIRES: objc_interop