Note: the lab machine may have a slightly different version of LLVM than shown in the video. Currently,
you should use: clang++-14, llvm-profdata-14, and llvm-cov-14
This lab describes the use of compiler tooling to
determine the quality of a test suite with respect to
some program under test. The lab video describes a
set of commands to the LLVM toolsuite to generate a
line coverage report.
For a warmup, create a test suite for the
badcalc.cpp demo code
that achieves full line coverage. Turn in the test suite
and your coverage report.
You are encouraged to apply the coverage reporting technique
to your own project code, but how you spend the rest of your
lab time after you've completed the coverage report is up
Create a tarball consisting of a single directory with all of your work in it,
such as code or written answers.
If you have any auxiliary files (READMEs, Makefiles, etc.), be sure
to include those as well.
Name your work directory l7 and name
the tarball l7.tgz.
Upload your tarball to the L7 Canvas assignment.
Labs will be graded under one of following criteria:
You will automatically be given full credit for the labwork if the GTA
determines that your participation in the lab was meaningful - i.e. you
attended the lab session and used the time to make a good-faith attempt to
complete the work. It is the sole discretion of the GTA to determine
if you put in sufficient effort. Even if you expect an effort-based grade,
you should turn in your (possibly incomplete) work.
If you do not participant meaningfully in lab (i.e. you do not attend the
lab session), your grade will be assessed based on the correctness of your
Advice: How to Approach Labs
The two-criteria grading scheme above is designed to avoid wasting your time.
You should not feel obligated to attend the lab, and in fact should only
do so if you want help from the GTA on the labwork assignment
or whatever project is currently in progress. Here's a handy flowchart
for how I suggest you approach lab: