File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 10
10
//
11
11
// ABSOLUTE: @__llvm_coverage_mapping = {{.*"\\02.*root[^/\\]*nested[/\\]*coverage_relative_path\.swift}}
12
12
13
- // RUN: %target-swift-frontend -profile-generate -profile-coverage-mapping -Xllvm -enable-name-compression=false -coverage-prefix-map %/ t/root=. -emit-ir %/ t/root/nested/coverage_relative_path.swift | %FileCheck -check-prefix=RELATIVE %s
13
+ // RUN: %target-swift-frontend -profile-generate -profile-coverage-mapping -Xllvm -enable-name-compression=false -coverage-prefix-map %t/root=. -emit-ir %t/root/nested/coverage_relative_path.swift | %FileCheck -check-prefix=RELATIVE %s
14
14
//
15
15
// RELATIVE: @__llvm_coverage_mapping = {{.*"\\02.*\\01[^/]*\.[/\\]*nested[/\\]*coverage_relative_path\.swift}}
Original file line number Diff line number Diff line change 4
4
5
5
// This test is to make sure llvm-cov can deal with a coverage-prefix-map.
6
6
7
- // To make sure this test is resilient to directory changes, we create nested directories inside of the
8
- // temporary test directory and assert those exist, or don't exist, in the emitted ir
7
+ // To make sure this test is resilient to directory changes, we create nested
8
+ // directories inside of the temporary test directory.
9
9
//
10
10
// RUN: %empty-directory(%t)
11
11
// RUN: mkdir -p %t/root/nested
12
12
// RUN: echo "func coverage() {}" > %t/root/nested/coverage_relative_path.swift
13
13
// RUN: cd %t/root
14
14
15
- // RUN: %target-build-swift -profile-generate -profile-coverage-mapping -Xfrontend -coverage-prefix-map -Xfrontend %/ t/root=. -Xfrontend -disable-incremental-llvm-codegen -o %t/main %/ t/root/nested/coverage_relative_path.swift
15
+ // RUN: %target-build-swift -profile-generate -profile-coverage-mapping -Xfrontend -coverage-prefix-map -Xfrontend %t/root=. -Xfrontend -disable-incremental-llvm-codegen -o %t/main %t/root/nested/coverage_relative_path.swift
16
16
17
17
// This unusual use of 'sh' allows the path of the profraw file to be
18
18
// substituted by %target-run.
19
19
// RUN: %target-codesign %t/main
20
20
// RUN: %target-run sh -c 'env LLVM_PROFILE_FILE=$1 $2' -- %t/default.profraw %t/main
21
21
22
22
// RUN: %llvm-profdata merge %t/default.profraw -o %t/default.profdata
23
- // RUN: %llvm-cov show %t/main -instr-profile=%t/default.profdata | %FileCheck %s
23
+ // RUN: %llvm-cov show %t/main -instr-profile=%t/default.profdata | %FileCheck --check-prefix SHOW %s
24
+ // RUN: %llvm-cov report %t/main -instr-profile=%t/default.profdata | %FileCheck --check-prefix REPORT %s
24
25
25
- // CHECK: func coverage
26
+ // SHOW: func coverage
27
+ // REPORT: coverage_relative_path.swift
You can’t perform that action at this time.
0 commit comments