brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.1 KiB · 5db76c5 Raw
54 lines · plain
1# REQUIRES: system-linux2# RUN: mkdir -p %t3 4# RUN: llvm-cov show %S/Inputs/directory_coverage/main.covmapping \5# RUN:   --instr-profile %S/Inputs/directory_coverage/main.profdata \6# RUN:   --path-equivalence=/tmp/directory_coverage,%S/Inputs/directory_coverage \7# RUN:   --format=text --show-directory-coverage -o %t/report-text8 9# RUN: llvm-cov show %S/Inputs/directory_coverage/main.covmapping \10# RUN:   --instr-profile %S/Inputs/directory_coverage/main.profdata \11# RUN:   --path-equivalence=/tmp/directory_coverage,%S/Inputs/directory_coverage \12# RUN:   --format=html --show-directory-coverage -o %t/report-html13 14# RUN: FileCheck --input-file %t/report-text/index.txt %s --check-prefix=ROOT15# RUN: FileCheck --input-file %t/report-text/coverage/tmp/directory_coverage/index.txt %s --check-prefix=ROOT16# RUN: FileCheck --input-file %t/report-text/coverage/tmp/directory_coverage/b0/index.txt %s --check-prefix=B017# RUN: FileCheck --input-file %t/report-text/coverage/tmp/directory_coverage/c0/c1/index.txt %s --check-prefix=C118 19# RUN: FileCheck --input-file %t/report-html/index.html %s --check-prefix=HTML-TOP --allow-empty20# RUN: FileCheck --input-file %t/report-html/coverage/tmp/directory_coverage/index.html %s --check-prefix=ROOT21# RUN: FileCheck --input-file %t/report-html/coverage/tmp/directory_coverage/b0/index.html %s --check-prefix=B022# RUN: FileCheck --input-file %t/report-html/coverage/tmp/directory_coverage/c0/c1/index.html %s --check-prefix=C123 24 25 26# HTML-TOP: coverage/index.html27 28# ROOT: a0/a1/a2.cc29# ROOT: b0/30# ROOT-NOT: b1_1.cc31# ROOT-NOT: b1_2.cc32# ROOT: c0/c1/33# ROOT-NOT: c2_1.cc34# ROOT-NOT: b2_2.cc35# ROOT: main.cc36 37# B0: b1_1.cc38# B0: b1_2.cc39 40# C1: c2.h41# C1: c2_1.cc42 43 44For regenerating the test:45 46cp -r %S/Inputs/directory_coverage /tmp47cd /tmp/directory_coverage48clang -fprofile-instr-generate -fcoverage-mapping -mllvm -enable-name-compression=false \49  -o main main.cc a0/a1/a2.cc b0/b1_1.cc b0/b1_2.cc c0/c1/c2_1.cc c0/c1/c2_2.cc50./main51llvm-cov convert-for-testing main -o main.covmapping52llvm-profdata merge default.profraw -o main.profdata53rm main default.profraw54