| # Create an input file. |
| RUN: echo "#" > %t.input |
| RUN: echo "%t.dir1" >> %t.input |
| RUN: echo "2,%t.dir2" >> %t.input |
| |
| RUN: mkdir -p %t.dir1 |
| RUN: mkdir -p %t.dir2/subdir |
| |
| RUN: echo ' ' > %t.dir1/bar |
| RUN: echo ' ' > %t.dir1/foo |
| RUN: echo ' ' > %t.dir2/bar |
| RUN: echo ' ' > %t.dir2/foo |
| RUN: echo ' ' > %t.dir2/subdir/baz |
| |
| RUN: llvm-profdata merge -f %t.input -dump-input-file-list -o /dev/null | FileCheck %s |
| RUN: llvm-profdata merge -weighted-input=2,%t.dir2 -dump-input-file-list -o /dev/null %t.dir1 | FileCheck %s |
| |
| CHECK-DAG: 1,{{.*}}.dir1{{[/\\]}}bar |
| CHECK-DAG: 1,{{.*}}.dir1{{[/\\]}}foo |
| CHECK-DAG: 2,{{.*}}.dir2{{[/\\]}}bar |
| CHECK-DAG: 2,{{.*}}.dir2{{[/\\]}}foo |
| CHECK-DAG: 2,{{.*}}.dir2{{[/\\]}}subdir{{[/\\]}}baz |