From 2019 onwards, all notable changes to tarpaulin will be documented in this file.
- Revert gimli to a non-yanked version
- Refined the forced coverage of generic items and expressions to reduce false negatives
- Fix ptrace SIGILL issue where PID parent event is delivered in iteration after the child stop is reported
- Update native-tls to fix install issue after breaking change.
- Fix filtering of integration test folders in workspaces
- Update LLVM profile parsing code to lazily load files reducing memory usage
- HTML reports now display the hit count without a mouseover
- Don't override
RUST_BACKTRACEif it's already set in the env when using--verbose - Don't report delta coverage if run configuration changes in a way that would lead to meaningless results
- Correctly trace module paths when ignoring file modules declared in an inline module #1974
- Silence warning on invalid/unexpected doctest path for merged doctests as they don't need the old processing
- LLVM split regions are now counted correctly fixing some missed coverage hits.
- Support for [env] section in
.cargo/config - Full resolution of
.cargo/configfile hierarchy
- Markdown report type
- Made all reports consistent and put them in the project root by default
- Add dark/light mode to HTML reports
- cargo metadata command no longer runs with
--all-features
- Update
llvm_profparserto remove a panic - Only bring in num-cpus for ptrace builds
- Update
llvm_profparser - Enable lto for release builds
- Change some types so x86 starts working properly
- Performance improvements for llvm profraw report generation via llvm-profparsers#48
- Performance improvements for llvm profraw report generation
- Ignore rlib files in doctest folder
- Now submit git remote information to coveralls and log the report URL as well as better error handling
- Merged doctests now work in coverage
- doctest name resolution changed to be exact match not suffix match. This should only break doc test coverage for nightlies >1 year old
- Fixed handling of dashes in doctest name resolution
- Now disable dead code inclusion for mac's by default due to rust-lang/rust#137009
- Remove link-dead-code from llvm engine coverage jobs
- ASLR detection was slightly broken - although it wouldn't break anything unless setting was broken as well.
- Detect the libdir path by rustc and link to it to enable proc-macro test binaries to run without error #1642
- Added
--include-filesargument to only display coverage for the mentioned files (#1667)
- The
CARGO_TARPAULIN_CONFIG_FILEenvironment variable may be used to set the path to the configuration file. The command line argument has precedence, but this environment variable has precedence overtarpaulin.tomland.tarpaulin.toml.
- For
LD_LIBRARY_PATHget all link paths from build script outputs - Use
PATHon windows andDYLIB_LIBRARY_PATHfor mac instead ofLD_LIBRARY_PATH - Add
--stderrflag to print tarpaulin logs to stderr
- Removed debug printout of function map
- Support for
#[coverage(off)]to exclude expressions from coverage results - Updated llvm_profparsers to llvm-19 version
- Ability to remove coveralls from the build making openssl optional.
- No longer print rustflags for report configs with
--print-rust-flags - Now use source code to get function names and locations instead of debug information
- Upgraded to syn2 and removed branch coverage module. This only had impact in debug dumps so shouldn't impact users
- Ignore type definitions in trait implementations
- Upgrade llvm-profparsers crate and now use sub-report filtering to skip dependency only coverage stats
- Update jobserver crate to allow building on alpine
- Use
RUSTUP_HOMEto handle rustup being installed in non-standard directories
- Troubleshooting guide
- Now override toolchain less-eagerly in windows #1494
- Fixed build for x86
- Add summary coverage, covered and coverable to json report #1415
- Pass RUSTFLAGS to the binary under test for any project bins compiled during test
- Force coverage of generic functions/methods using
impl Traitargs
- No longer add
+nightlyif cargo version is already nightly - Adds
-Cstrip=Noneto the rustflags to prevent default stripping - Update profparsers for llvm 17 and 18 support
- Add line reports and make file name float in HTML report
- Make coverallss report path match linux path format on windows
- Don't disable ASLR if it's already disabled
- Restore casing of enum clap arguments e.g.
--outso they match old behaviour
- Added
--fail-immediatelyflag to abort execution the moment the first test failure occurs
- Upgraded from clap v2 to v4. This has a few changes, notably any arguments which can be specified more
than once require multiple entries so
--run-types doc testneeds to be turned into--run-types doc --run-types test - Ignore attributes on methods, functions and trait methods
- Expand doc test prefix to cover more of the directory tree to work with the new naming structure
- Handle -A -W and -D flags in the RUSTFLAGS deduplication
- Ignore
//comments as well as///
- Match
cargo testbehaviour for --no-fail-fast and report coverage when option is selected - Simplify cargo version parsing for rust installed via distro package managers
- Unused utility methods on json report type
- Fix handling of
--all-targetsflag
- Filtering for other test attributes such as
#[tokio::test]
- Update to newer faster
llvm_profparser
- Improve logs for processing stripped projects with ptrace
- Skip missing objects provided by
--objectsif they aren't present when getting reports - No longer canonicalise potentially missing paths for
--objects
--objectsargument to provide other object files with coverage information--no-dead-codeflag to avoid adding-Clink-dead-codeto linker flags- ptrace support for x86
- Dumped traces are now saved to reports output directory
- Change event log name to print datetime stamps without colons or slashes so they'll save in other operating systems
- Set
LLVM_PROFILE_FILEfor building tests and delete the generated profraws to ignore build script coverage - Remove dependency on memmap
- Filter out expressions or items with
#[cfg_attr(tarpaulin, no_coverage)]
- Merge rustdocflags field from
cargo/config.tomlwith env tarpaulin sets
- Create profraw folder if it doesn't exist
- Normalise UNC paths provided via env or CLI args
- Make output directory crate root if not provided
- If root is not provided fall-back to root from manifest for base directory when printing reports not the current directory
- Change exclude-files pattern to use glob crate instead of a regex
- Set
LLVM_PROFILE_FILEso profraw files go directly to target dir - Make llvm coverage single threaded to avoid concurrency issues when writing profraw files
- Fix linux cfg instead of ptrace_supported cfg on event log for ARM linux builds
- Look for existing profraws before spawning test
- Add empty
<a>wrapping elements to improve mouseless navigation of HTML reports #1120 - Disable ptrace engine support for non-x64 architectures
- Travis install script - users should use one of the other fast install tools
- Working llvm coverage instrumentation (coverage now works on Mac and Windows!)
--post-test-delayfor tests which spawn a process (default 1s for llvm coverage)
- Update quick-xml to 0.25
- Make --ignore-tests the default and add a flag --include-tests to reapply the old behaviour
- profraw files moved to
$TARGET_DIR/tarpaulin/profraws(configurable viaConfig::set_profraw_folder)
- Fix issue in parsing output from
cargo --versionwith some beta versions (support beta.n) - Forward
RUSTC_BOOTSTRAPto cargo when building test binary #1074
- Added support for
--out stdoutto print uncovered lines without enabling--verboselogging
- Add max line for each file into source analysis and filter out lines beyond this range #1016
- Reject traces with a line of 0
- Stop adding
LD_LIBRARY_PATHSto process env twice - [Internal] can now run
cargo teston tarpaulin without need of--test-threads 1 - Force --test-threads 1 for --follow-exec unless there's
--implicit-test-threads - Add markers to event log to show where state machine iterations start and end, fix fork parent tracing
- Handle exec following in vfork children
- Continue vfork parents so test execution isn't stalled when tracing children
- Make
--forwarddefault signal behaviour - Fix follow-exec aliasing for config file
- Fix
force_cleanmerging to take into account the default being true
- Added support for
RUST_TEST_THREADSto specify test threads instead of --test-threads
- Support skip-clean in config files and implement prioritisation in merges
- Fix issue where in a workspace with different run types the package IDs can become misaligned with test binaries
- Check build script output from cargo build and use it to set
LD_LIBRARY_PATHto match cargo test behaviour --implicit-test-flagsargument so that--test-threadsisn't passed into the test binary
- Parse RUSTFLAGS and RUSTDOCFLAGS to remove duplicate entries #891
- Explicitly pass
--test-threadsto test binary to counteract cpu affinity being set to 1 CPU
- Correct report line-rate in cobertura to use coverage percentage of
TraceMapinstead of averaging package line-rate
- Support for
#[no_coverage]to exclude expressions from coverage results
- Add division by zero check for cobertura package line-rate
- Added support for doctest
no_runattribute - Add support for source filter via inner attributes
- [INTERNAL] Made link-dead-code apply for non-windows llvm instrumentation builds
- Consolidate fn/impl-fn/trait-fn source analysis to use same implementation for consistency
- Add check to make sure a
DirEntrywith a .rs extension is actually a file and not a directory fixes #857 - Make
path_utils,source_analysisandstatemachinepublic modules - Add fork child to PID map to fix #790
- Fix #819 incorrect handling of test args caused by removing the executable path as first program arg in execve
- Now factor in try and return blocks in reachability calculation
- Remove erroneous filtering of function calls that take a single line with arguments present
--verbosenow calls cargo with-vflag- Now handles string values for rustflags in .cargo/config not just a list of values
- [INTERNAL] If llvm coverage is enabled and test binary can't be loaded start with empty
TraceMap - Config parse errors are logged
- Setting the processor affinity now uses an existing core from the initial affinity mask instead of defaulting to the first one (see issue #817)
- Updated logging so for the build mode it says "launching binary" instead of "launching test"
- Don't apply
--colorargument to test executables if "auto" to prevent issues with tests that can't have color controlled - Fix directory that
cargo cleanis run from - Reduce number of cleans fixing issue where only last run-type was ran
- Clean without
cargo cleanremoving directory to preserve coverage run delta reporting - Set
CARGO_MANIFEST_DIRwhen running doc tests - Stop processing a DWARF line number program after the end sequence is hit
- If a breakpoint gets disabled due to instruction clash also disable the first breakpoint that fell upon that aligned address
- Make percentage change in CLI printout two decimal places
- Check if user sets -Cdebuginfo and remove it #601
- INTERNAL Added ability to build with LLVM coverage instrumentation and detect compiler support. This isn't enabled so should have no effect it's just the start of the support work.
- Now factors in rustflags from toml files #528
- Now able to add to rustflags via CLI args and via tarpaulin config files
- Added
--skip-cleanarg as an inverse to--force-cleanand made cleaning default
- Make doctest prefix matching less specific as the naming convention changed again
- Ensure report is always generated if coverage is below failure threshold
- Rearrange crate internals and enable cross compilation for windows and macos. This doesn't allow tarpaulin to work on these Operating Systems but it will print an error and exit instead of failing to build
- Fixed
--force-cleanso it actually cleans the project - Change event log to now contain a time for each event
- Add project name to coverage report in target dir to make things nicer for people reusing a target dir for multiple projects (#710)
- Added
--coloroption matching cargo arg --follow-execoption making exec tracing non-default--jobsoption matching the one in cargo test
- Check through memory map for the first entry belonging to the executable [FIX]
- Pass through the non-zero exit code from cargo (issue #627)
- Change doctest source resolution to accommodate for binary renaming in nightly 1.50.0
- Changed path prefix in doctests to go from workspace package root not project root
- Added source location to debug event logs
- Improve error message for building tests to include target name that failed
- Hidden file filtering only applied for folders inside project directory not any folder on path. Fixes #682
- Removed unimplemented
tomlreport
- Now trace into executed binaries
- Added
--avoid-cfg-tarpaulinflag to remove--cfg=tarpaulinfrom theRUSTFLAGS
- Address offset mapping has been added which allows us to compile binaries without changing the relocation model
- Tie match patterns to a single logical line
- Check if unable to read file to string and skip source analysis for it if that's the case
--commandoption to build and run a binary for testing CLI apps
- Make
--run-typesand--outcase insensitive - Filter executables on command not run type to fix #610
- Moved from
logandenv_loggertotracing - Correct field name for
--fail-underin config file fromfail_undertofail-under - Fix process deadlock when compiler diagnostic error or ICE occur
- Ignore non-project files when checking source locations in DWARF (issue #566)
- Added
--fail-underflag to set minimum coverage required for a run - Added
--print-rust-flagsand--print-rustdoc-flagsto print the set ofRUSTFLAGSandRUSTDOCFLAGSthat can occur across all configs to aid user debugging - Source analysis for group, await, async block, try and try block expressions
#[tarpaulin::skip]and#[cfg(not(tarpaulin_include))]can now work in file inner attributes.
- Don't report coverage when not running tests
- Inline react scripts to HTML to allow rendering on more restrictive security policies (issue #534)
- Check addresses are within .text section
- Apply line one filtering to all files not just src/main.rs
- Added
--all-targetsto config file
- Actually pass
--all-targetsto cargo - Merge more CLI options with active config (no-run, no-default-features, ignore-panics, forward-signals, run-ignored, release, count, all-features, all-targets, line-coverage, branch-coverage, offline, timeout, features, out, arguments passed to test executable, -Z)
- Update stats for all traces when they match a single address
- Correct handling of doc tests in workspaces as doctest name is relative to package root not workspace root
- Return an error if a doctest fails to compile
- Include files with no coverable lines in Html report
--ignore-panicsnow ignoresassert_*anddebug_assert*macros
- run-types for lib, bins and all-targets
--tests--lib,--examples,--bins,--doc,--benches,--all-targetsflags matchingcargo test`- Add named test running and flags
--test,--example,--bin,--bench - Equivalent options for
--no-fail-fastand--profile - Filtering of
CARGO_HOMEcontents when it exists in project directory --debugor--dump-tracesnow outputs a json log format that can be used to plot tarpaulin execution
- Now merge run-types in configs
- Filtering for
cfg(not(tarpaulin_include))also adding--cfg=tarpaulinto default config - Support for tool attribute
#[tarpaulin::skip]
- Add
--cfg=tarpaulintoRUSTFLAGSthis allows users to use#[cfg(tarpaulin)]and#[cfg(not(tarpaulin))]
- Don't run executables when
--no-runprovided #[cfg(not(tarpaulin))]blocks are ignored in source analysis
- Fix issue where doc tests could hang if stdout buffer filled (#402)
- No longer report test failure if a
should_panicdoc test is ran - Clean pre-existing doc tests from target/doctests directory
- Always print stderr output from cargo when building project
- Make features argument optional again
frozen,locked,force-cleanandignore-testsflags are now propagated to feature configurations.excludeargument for packages is now propagated and any features existing in thepackagelist are removed to avoid conflicts- Fixed regression where features weren't propagated
- Compilation target is now accepted through the
--targetparameter.
- Examples coverage now runs the tests that would be ran with
cargo test --examples - Look up previous report from correct target directory.
- Added doc comments to ignorable lines in source analysis
- Feature configurations in
tarpaulin.tomlare now run in order of declaration. - Compilation failure results in
cargo tarpaulinexecution failure. workspaceflag is correctly propagated to feature configurations.featuresnow takes in a string e.g."f1 f2", instead of an array of strings["f1", "f2"].packagesandexcludein workspace configurations are now read.
- The
CARGO_TARPAULIN_TARGET_DIRenvironment variable may be used to set the default target directory for tarpaulin artifacts. The command line argument has precedence.
- Find target folder from metadata if not provided and place reports there (fixes running from packages inside workspaces)
- Using date-locked toolchains no longer defaults to trying to use a toolchain with the channel name and no date
- The following CLI options now take effect even when a custom config file is
in place:
output-dir,target-dir,root,coveralls,ciserver,report-uri.
- Ignore hidden files and folders based on a dot prefix to the folder or filename
- Update object and if an ELF section can't be parsed return an io error instead of letting it continue with an empty section
- Removed forcing of
opt-levelto 0 - When
--debugis provided now print the cargo command/arg list and pass-vvvto cargo - Create target directory if option given via
--target-dirdoesn't exist
- Fill in
CARGO_PKG_NAME,CARG_PKG_VERSION,CARGO_PKG_AUTHORSandCARGO_MANIFEST_DIRenvironment variables when launching tests - Filter out executables where profile test is false and run type is
Tests
- Can now pass a list of values for
--run-types
- Get manifest directory for packages in workspace so working directory is the same as before 0.12.0
- Concept of logical lines to map multiple physical lines to a single line for statistics added for split lets statements
- Reverted Dockerfiles to full images added dockerfiles with
-slimpostfix for slim images - Added cURL to the slim images
todo!()macros are now ignored with the--ignore-panicsflag- The HTML output report will no longer fail if a previous run contains a source file that no longer exists
- Process expression preceding method call in source analysis
- Add support for JSON output, including public functions for querying reports programmatically.
- Pulled
tracefunction out ofruninmain.rsin order to expose public function for creatingTraceMapstructs. - Moved Dockerfiles to slim images
- Change in coverage between last 2 runs in HTML report
- Filter attributes on match arms
- Add toml config files for multiple runs with merged reports and
--configand--ignore-configoptions
- Now instrument multiple points in the same binary for the same line to remove false negatives
- Filter out constants from coverage results
- Dropped log dependency to 0.4.8 as later versions have been yanked
- Filtering of attributes on
loop,forandwhileexpressions - Added support for
lcov.inforeport
- Updated dependencies including
Cargoto mitigate #319
--lockedand--frozenoptions to mirrorcargo testoptions--target-diroption to mirrorcargo testandcargo buildoptions--offlineoption to mirrorcargo testandcargo buildoptions
- Fixed issue where examples were ran with
RunType::Tests - No longer pass
--quietto examples - Updated futures test for stable features
- Split up docker run stages to optimise build times and added
.dockerignore
- Added Benchmarks to
RunTypeto allow coverage of benchmark tests to be collected - Added Examples to
RunTypeto allow coverage of examples to be collected - Instructions for integration to Gitlab pipelines to
README.md --no-runoption to build tests and not collect coverage- Added run-to-run coverage change reporting through saving the previous run in
target/tarpaulin/coverage.json
- Sets an environment variable
TARPAULINto1when starting so inferiors can detect coverage runs - Limit the processor affinity to a single core to solve #190
- Switch from travis-ci to github actions
- Updated phrasing of error messages on invalid
--outand--output-dircommand line options - Replaced error printout in statemachine with
log::error - Check callable arg count to prevent removing callables with no return from coverable lines
- Removed test-threads limit from traced tests solving #190
- Ignore empty executables generated by doctests with
no_runannotation to avoid parsing errors
- Created
CHANGELOG.md - Add
--manifest-pathoption - Add
--output-diroption
- Ignore lines containing "}else{"
- Use relative file paths to base_dir (env::current_dir() or --root option if set)
- Use
HashSetfor XML package deduplication in cobertura fixing a codecov rendering issue
- Updated dependencies including cargo so tarpaulin works with
default-runmanifest option
- Fixed function ignoring logic where non-test functions with the ignored attribute weren't ignored
- Updated
README.mdfor CircleCI - Updated
README.mdinstructions for Docker on Windows
- tarpaulin returns a non-zero error code if test compilation fails
- Added tests for covering match expressions
- Added tests for covering path expressions
- Added tests for doc-test coverage
- Fix unicode handling in json for html reports
span-locationsfeature forproc-macro2removing need for semver-exempt and updatedREADME.md
- Added persistent URLs to HTML report when navigating source
- Updated
cargo,gimli,git,nix,objectandquick-xml
- Cobertura report now generates name attribute for the package tag
- See 0.8.3 for changes
- See 0.8.3 for changes
- Tarpaulin run type for doc-tests setting
RUSTDOCFLAGSflag - Added loading of Apple dSYM files
- Save non-persistent reports when debug flag is present
- Populate CI server information for coveralls
- Populate git info in coveralls report
- Debug prinouts for tarpaulin for debugging
- Moved
statemachineandprocess_handlingmodules in preparation for cross-platform support - Go into closures in syntax analysis
- Moved state machine handling to use an event queue system
- Added more attributes for classes in Cobertura reports
- Updated
cargo,env_logger,failure,logandnix - Improved structure and layout of cobertura reports
- Added result de-duplication when using doc-tests
- Formatting for HTML characters in JSON files
- Correct path detection for HTML reports
- Made test paths relative to Cargo manifest
- Failure crate for improved error handling
- Added HTML reports
- Added pull-request template
- Moved to Rust 2018 edition
--Releaseoption to run tarpaulin with tests built in release mode- Tests for coverage of assign operations
- Changed
--skip-cleanto--force-cleanto make skipping clean default - Visit return statements in
source_analysisto handle attributes - Updated
cargo,fallible-iterator,libc,rustc-demangle,syn - Updated Dockerfile for rust 2018 and
procmacro2_semver_exemptworking on stable
- Removed
publish-lockfilefromCargo.toml
- Updated
nix,regex, andsyn