Skip to content

Commit c13ec89

Browse files
committed
[Stats] Add a test for long input-path bug (0e5b982)
1 parent b0aa6af commit c13ec89

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// REQUIRES: OS=macosx
2+
// RUN: rm -rf %t && mkdir -p %t
3+
// RUN: mkdir -p %t/very-long-directory-name-that-contains-over-128-characters-which-is-not-enough-to-be-illegal-on-its-own-but-presents
4+
// RUN: cp %s %t/very-long-directory-name-that-contains-over-128-characters-which-is-not-enough-to-be-illegal-on-its-own-but-presents/a-problem-when-combined-with-other-long-path-elements-and-filenames-to-exceed-256-characters-combined-because-yay-arbitrary-limits-amirite.swift
5+
// RUN: touch %t/main.swift
6+
// RUN: %target-swiftc_driver -o %t/main -module-name main -stats-output-dir %t %t/main.swift %t/very-long-directory-name-that-contains-over-128-characters-which-is-not-enough-to-be-illegal-on-its-own-but-presents/a-problem-when-combined-with-other-long-path-elements-and-filenames-to-exceed-256-characters-combined-because-yay-arbitrary-limits-amirite.swift
7+
// RUN: %utils/process-stats-dir.py --set-csv-baseline %t/frontend.csv %t
8+
// RUN: %FileCheck -input-file %t/frontend.csv %s
9+
10+
// CHECK: {{"AST.NumSourceLines" [1-9][0-9]*$}}
11+
// CHECK: {{"IRModule.NumIRFunctions" [1-9][0-9]*$}}
12+
// CHECK: {{"LLVM.NumLLVMBytesOutput" [1-9][0-9]*$}}
13+
14+
public func foo() {
15+
print("hello")
16+
}

0 commit comments

Comments
 (0)