approvals / approvals/ApprovalTests.cpp

useApprovalsSubdirectory() doesn't create the output directory in the expected location

Open
#196 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
339
Forks
55
PR merge metrics
No merged PRs in 30d

Description

Hello

From documentation, we can read:

Note that the sub-directory is created automatically and that it will be inside the directory containing the source code of the test, not the current working directory of the test process.

This is not what I get in my project:

image

We can see in the screenshot that the output_test_case is created in CMAKE_BINARY_DIR instead of CMAKE_SOURCE_DIR, as
we would expect because this is where tests.cpp is located. I have the same issue with Makefile and Ninja generators, btw.

Best regards
Pierre

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with doc/Configuration.md and the implementation or entry point for useApprovalsSubdirectory(), then reproduce the behavior with the tests.cpp setup described in the issue. Verify that output_test_case is created beside the test source rather than in CMAKE_BINARY_DIR, including with Makefile and Ninja generators, and add or update coverage for the expected location.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.