Skip to content

Commit 18ecb1e

Browse files
committed
[test] Use dd instead of head -c.
head -c, to print the specified number of bytes, is a GNU extension. Using dd for the same task should be somewhat more portable. Mac OS X does not have status=none, so redirect the status output away instead. Despite appearances, redirecting with the Bourne shell-ism `2>/dev/null` is fine on Windows since Windows executes with the internal lit shell runner, which translates `/dev/null` to a temporary file.
1 parent 80e2b48 commit 18ecb1e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/DebugInfo/modulecache.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import ClangModule
99

1010
// RUN: %empty-directory(%t)
1111
// RUN: %swift-ide-test_plain -print-usrs -target %target-triple -module-cache-path %t -I %S/Inputs -source-filename %s
12-
// RUN: head -c 4 %t/*/ClangModule-*.pcm | grep -q CPCH
12+
// RUN: dd bs=1 count=4 < %t/*/ClangModule-*.pcm 2>/dev/null | grep -q CPCH
1313

1414
// 2. Test that swift is creating clang modules with debug info.
1515

0 commit comments

Comments
 (0)