[Test][Driver] Use xargs instead of command substitution

This commit is contained in:
Ramon Asuncion
2025-10-15 11:52:44 -07:00
parent 29677e3881
commit df96bda8fc

View File

@@ -83,8 +83,8 @@
// RUN: %swiftc_driver -save-temps -driver-print-jobs %S/../Inputs/empty.swift %t/a.o -lto=llvm-full -target x86_64-apple-macosx10.9 -driver-filelist-threshold=0 -o filelist 2>&1 | tee -a %t/forFilelistCapture | %FileCheck -check-prefix FILELIST %s
// RUN: sed 's/.*-output-filelist //' %t/forFilelistCapture | sed 's/ .*//' | tail -2 | head -1 > %t/output-filelist
// RUN: sed 's/.*-filelist //' %t/forFilelistCapture | sed 's/ .*//' | tail -1 | head -1 > %t/input-filelist
// RUN: cat $(cat %t/output-filelist) | %FileCheck -check-prefix OUTPUT-FILELIST-CONTENTS %s
// RUN: cat $(cat %t/input-filelist) | %FileCheck -check-prefix INPUT-FILELIST-CONTENTS %s
// RUN: cat %t/output-filelist | xargs cat | %FileCheck -check-prefix OUTPUT-FILELIST-CONTENTS %s
// RUN: cat %t/input-filelist | xargs cat | %FileCheck -check-prefix INPUT-FILELIST-CONTENTS %s
// FILELIST: swift
// FILELIST-DAG: -emit-bc