Files
TheRock/compiler/amd-llvm/llvm/test/tools/llvm-cov/sources-specified.test
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

63 lines
2.6 KiB
Plaintext

RUN: llvm-cov report -instr-profile %S/Inputs/sources_specified/main.profdata \
RUN: -path-equivalence=/tmp,%S/Inputs \
RUN: %S/Inputs/sources_specified/main.covmapping \
RUN: %S/Inputs/sources_specified/main.cc %S/Inputs/sources_specified/extra \
RUN: | FileCheck -check-prefix=REPORT %s
RUN: llvm-cov show -instr-profile %S/Inputs/sources_specified/main.profdata \
RUN: -path-equivalence=/tmp,%S/Inputs \
RUN: %S/Inputs/sources_specified/main.covmapping \
RUN: %S/Inputs/sources_specified/main.cc %S/Inputs/sources_specified/extra \
RUN: | FileCheck -check-prefix=SHOW %s
# Don't include all source files when provided source files are filtered out.
RUN: llvm-cov show -instr-profile %S/Inputs/sources_specified/main.profdata \
RUN: -path-equivalence=/tmp,%S/Inputs \
RUN: %S/Inputs/sources_specified/main.covmapping \
RUN: --ignore-filename-regex='.*' \
RUN: %S/Inputs/sources_specified/main.cc %S/Inputs/sources_specified/extra \
RUN: | FileCheck -allow-empty -check-prefix=IGNORE %s
IGNORE-NOT: {{.*}}main.cc{{.*}}
IGNORE-NOT: {{.*}}inc.h{{.*}}
IGNORE-NOT: {{.*}}dec.h{{.*}}
# Order of files may differ, check the total values calculated.
REPORT-NOT: {{.*}}abs.h{{.*}}
REPORT: {{^}}TOTAL 3{{.*}}72.73%
# Order of files may differ, check that there are 3 files and not abs.h.
SHOW-NOT: {{.*}}abs.h{{.*}}
SHOW: {{.*}}sources_specified{{.*}}
SHOW: {{.*}}sources_specified{{.*}}
SHOW: {{.*}}sources_specified{{.*}}
# Test "export" command. Use a temp .json file as output is a single line.
RUN: llvm-cov export -instr-profile %S/Inputs/sources_specified/main.profdata \
RUN: -path-equivalence=/tmp,%S/Inputs \
RUN: %S/Inputs/sources_specified/main.covmapping \
RUN: %S/Inputs/sources_specified/main.cc %S/Inputs/sources_specified/extra \
RUN: > %t.export.json
RUN: FileCheck -check-prefix=NO-EXPORT %s < %t.export.json
RUN: FileCheck -check-prefix=EXPORT %s < %t.export.json
NO-EXPORT-NOT: {{"filename":"(/|\\\\)tmp(/|\\\\)sources_specified(/|\\\\)abs.h"}}
EXPORT-DAG: {{"filename":"(/|\\\\)tmp(/|\\\\)sources_specified(/|\\\\)main.cc"}}
EXPORT-DAG: {{"filename":"(/|\\\\)tmp(/|\\\\)sources_specified(/|\\\\)extra(/|\\\\)dec.h"}}
EXPORT-DAG: {{"filename":"(/|\\\\)tmp(/|\\\\)sources_specified(/|\\\\)extra(/|\\\\)inc.h"}}
Instructions for regenerating the test:
# cd %S/Inputs/sources_specified
cp -r . /tmp/sources_specified
clang -mllvm -enable-name-compression=false -fprofile-instr-generate \
-fcoverage-mapping /tmp/sources_specified/main.cc -o main
LLVM_PROFILE_FILE="main.raw" ./main
llvm-profdata merge main.raw -o main.profdata
llvm-cov convert-for-testing ./main -o ./main.covmapping
rm main main.raw