Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
World desk5 min

Why Changed Code Can Miss the Test Run: Trace the Path Filter

A path filter can skip code inside a running Catch2 test or prevent a CI test job from starting. Use the job log to tell which mechanism to investigate.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A “path filter” can skip changed-code tests in two different places: Catch2 can select an execution path inside a test case, or a CI workflow can prevent the test job from starting based on changed-file paths. First establish whether the test executable ran. That determines which configuration and logs to inspect; without the command, workflow, output, and Catch2 version, the cause of a particular skip cannot be identified.

First determine whether the test process started

Look at the job log, not just the final check status. If the runner started the test executable, investigate Catch2’s test-case selection, section selection, execution-path filters, and runtime skip output. If the job was skipped before the executable ran, inspect workflow-level path filters and job conditions that use changed-file detection.

As an Amazon Associate I earn from qualifying purchases.

Where the skip happens What is being filtered What to inspect
Inside a running Catch2 process Sections and generators along test execution paths Catch2 version, invocation arguments, nested test structure, and test output
Before a CI test job starts Changed file paths matched against workflow patterns or action outputs Workflow filters, job-level conditions, changed-file list, comparison base, and action configuration
During a running test Sections or generated values skipped by runtime code SKIP() usage and Catch2’s reported test status

How Catch2 execution-path filters can miss nested code

Catch2 represents sections and generators as paths through a test case. Its documentation says path filters are independent of test-case selection: “Path filters are independent of test case selection, Catch2 will try to follow the path filters in all selected test cases.” In other words, supplying path filters without a test-case filter can cause Catch2 to try those paths in every registered test case.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A path filter matches a prefix of an execution path. A filter that identifies a top-level section or generator can therefore constrain that level without necessarily filtering its descendants. If changed code is inside a nested section, check the full section and generator structure against the filter’s depth and syntax. Do not assume a path filter naming a parent selects only one specific nested route.

The cited Catch2 path-filter documentation is on the development branch, so confirm the syntax and behavior against the version used by the project. Record the Catch2 version and the exact test command, including test-case filters and any path-filter arguments.

Section selection is a separate control

Catch2’s -c and --section options select named sections. Repeating the option can narrow selection through nested levels; for example, -c sa -c sb selects section sa and then its nested section sb. Selecting a parent section runs its nested sections.

Code outside sections still executes, including setup before the first section. Therefore, section selection alone does not mean that setup or test-case discovery was skipped. Compare the arguments actually passed to the test process with the section names and nesting in the test source.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

When a CI changed-file filter prevents tests from running

If there is no evidence that the test executable started, inspect GitHub Actions workflow paths or paths-ignore filters and any change-detection action outputs used by a job-level if condition. Those filters decide whether work runs based on changed files; they do not select sections inside Catch2.

GitHub documents different comparisons for pushes and pull requests: pushes use a two-dot comparison, while pull requests use a three-dot comparison. The comparison base and the list of changed files matter when evaluating a glob. GitHub also documents limits that can affect path-filter evaluation: pushes over 1,000 commits or diffs that time out may cause the workflow to run, and only the first 3,000 files in a diff are considered. Check the current workflow syntax documentation for the applicable behavior and limits.

A changed-file action can add another layer. The paths-filter Action supports conditional steps and jobs, and its comparison method varies by event: its README describes pull-request comparison against the PR base through the GitHub REST API, and feature-branch comparison using a merge base with the configured or default base branch, which requires a checkout. Inspect the configured base, glob and exclusion patterns, and outputs consumed by conditions rather than assuming the workflow’s built-in filters caused the skip.

GitHub warns that a workflow skipped by path filtering can leave associated checks pending. If a required check is pending on a pull request, that status does not by itself prove the tests ran or failed; trace whether the workflow was triggered and whether its job condition allowed the test job to start.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Distinguish runtime skips from filters

Catch2’s SKIP() macro is runtime behavior, not path selection. A section or generated value may be skipped while execution continues elsewhere, and the test case may be reported as skipped. A failing assertion takes precedence in the report. Consider this explanation only when the process ran and its output indicates runtime skipping; a job that never started cannot have reached SKIP().

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Check a targeted Catch2 environment issue

Catch2 documents a standard-library runtime issue in which an exception-handling bug can lead to later sections being skipped after CHECK_THROWS in certain versions. This is a narrow possibility, not a general explanation for missing tests. Compare the observed test sequence with the documented case and establish the compiler, standard library, and runtime versions before attributing the behavior to it. See Catch2’s known limitations.

Diagnostic checklist

  1. Confirm process startup. Find the test executable’s invocation in the CI log. If it is absent because the job did not run, inspect workflow triggers and job-level conditions; if present, examine Catch2 output and arguments.
  2. Capture the exact Catch2 invocation. Record the Catch2 version, test-case filters, every -c or --section argument, and any execution-path filter syntax. Compare the selected path depth with nested sections and generators in the test.
  3. Trace CI file matching. For a job-level skip, inspect the changed-file list, glob and exclusion rules, comparison base, and action outputs feeding the condition.
  4. Read the status precisely. Distinguish runtime SKIP() output from tests or jobs that were never selected, and account for failure output when interpreting Catch2’s final test-case status.
  5. Validate any environment explanation. Check compiler, standard-library, and runtime versions, and confirm the documented triggering sequence before blaming the Catch2 limitation.

What evidence is needed to identify the cause

A specific root-cause finding requires at least the workflow or test command, the relevant filter configuration, the test’s section/generator structure, and the job or test output. Include the Catch2 and toolchain versions. Without those artifacts, it is possible to distinguish the mechanisms and direct the investigation, but not to identify which filter excluded the changed code.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.