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 1010//
1111// ABSOLUTE: @__llvm_coverage_mapping = {{.*"\\02.*root[^/\\]*nested[/\\]*coverage_relative_path\.swift}}
1212
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
1414//
1515// RELATIVE: @__llvm_coverage_mapping = {{.*"\\02.*\\01[^/]*\.[/\\]*nested[/\\]*coverage_relative_path\.swift}}
Original file line number Diff line number Diff line change 44
55// This test is to make sure llvm-cov can deal with a coverage-prefix-map.
66
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.
99//
1010// RUN: %empty-directory(%t)
1111// RUN: mkdir -p %t/root/nested
1212// RUN: echo "func coverage() {}" > %t/root/nested/coverage_relative_path.swift
1313// RUN: cd %t/root
1414
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
1616
1717// This unusual use of 'sh' allows the path of the profraw file to be
1818// substituted by %target-run.
1919// RUN: %target-codesign %t/main
2020// RUN: %target-run sh -c 'env LLVM_PROFILE_FILE=$1 $2' -- %t/default.profraw %t/main
2121
2222// 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
2425
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