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
53 lines
1.7 KiB
Plaintext
53 lines
1.7 KiB
Plaintext
// The undefined symbol should not cause link errors, and we should
|
|
// obtain the expected coverage report.
|
|
|
|
// Test the --coverage option.
|
|
RUN: rm -rf %t0 && split-file %s %t0 && cd %t0
|
|
RUN: %clang bar.c main.c undef.c --coverage -c
|
|
RUN: ar -X32_64 -rv libfoo.a undef.o bar.o
|
|
RUN: %clang main.o -L. -lfoo --coverage -o main.exe
|
|
RUN: %run ./main.exe
|
|
RUN: llvm-cov gcov -t main.gcda | FileCheck --check-prefix=MAIN %s
|
|
RUN: llvm-cov gcov -t bar.gcda | FileCheck --check-prefix=BAR %s
|
|
|
|
// Test the pgogen -fprofile-arcs -ftest-coverage option combination.
|
|
RUN: rm -rf %t1 && split-file %s %t1 && cd %t1
|
|
RUN: %clang_pgogen bar.c main.c undef.c -fprofile-arcs -ftest-coverage -c
|
|
RUN: ar -X32_64 -rv libfoo.a undef.o bar.o
|
|
RUN: %clang_pgogen main.o -L. -lfoo -fprofile-generate -fprofile-arcs -ftest-coverage -o main.exe
|
|
RUN: %run ./main.exe
|
|
RUN: llvm-cov gcov -t main.gcda | FileCheck --check-prefix=MAIN %s
|
|
RUN: llvm-cov gcov -t bar.gcda | FileCheck --check-prefix=BAR %s
|
|
|
|
// Test the pgogen -Wl,-bcdtors:mbr option combination.
|
|
RUN: rm -rf %t2 && split-file %s %t2 && cd %t2
|
|
RUN: %clang_pgogen bar.c main.c undef.c -fprofile-arcs -ftest-coverage -c
|
|
RUN: ar -X32_64 -rv libfoo.a undef.o bar.o
|
|
RUN: %clang_pgogen main.o -L. -lfoo -fprofile-generate -fprofile-arcs -ftest-coverage -Wl,-bcdtors:mbr -o main.exe
|
|
RUN: %run ./main.exe
|
|
RUN: llvm-cov gcov -t main.gcda | FileCheck --check-prefix=MAIN %s
|
|
RUN: llvm-cov gcov -t bar.gcda | FileCheck --check-prefix=BAR %s
|
|
|
|
MAIN: 1: 2:int main() {
|
|
MAIN: 1: 3: return bar();
|
|
BAR: 1: 1:int bar() {
|
|
BAR: 1: 2: return 0;
|
|
|
|
//--- main.c
|
|
int bar();
|
|
int main() {
|
|
return bar();
|
|
}
|
|
|
|
|
|
//--- bar.c
|
|
int bar() {
|
|
return 0;
|
|
}
|
|
|
|
//--- undef.c
|
|
void undef_func();
|
|
void foo() {
|
|
undef_func();
|
|
}
|