GeezerVison is showing github.com — . d Mount the repo at /ApprovalTests.cpp in the Docker guide so namer… · approvals/ApprovalTests.cpp@061ba31
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: InternalDocuments/docker.md +6-5Lines changed: 6 additions & 5 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
|
40 | 40 | From the repository root: |
41 | 41 |
|
42 | 42 | ```bash |
43 | | -docker run --rm -v "$PWD":/src approvaltests-linux bash -c ' |
44 | | -cmake -S /src -B /build -DCMAKE_BUILD_TYPE=Debug && |
| 43 | +docker run --rm -v "$PWD":/ApprovalTests.cpp approvaltests-linux bash -c ' |
| 44 | +cmake -S /ApprovalTests.cpp -B /build -DCMAKE_BUILD_TYPE=Debug && |
45 | 45 | cmake --build /build -j8 && |
46 | 46 | cd /build && ctest --output-on-failure' |
47 | 47 | ``` |
48 | 48 |
|
49 | 49 | 1. Build in `/build`, inside the container, so the build doesn't mix with your macOS build directories. |
| 50 | +1. Mount the source at `/ApprovalTests.cpp`. Some tests look for files under a directory with that name. |
50 | 51 | 1. Mount the source writable. Approval tests write `.received` files next to the source, and fail with "Unable to write file" on a read-only mount. |
51 | | -1. To build only part of the repo, point `-S` at that directory. For example, `-S /src/examples/doctest_multiple_shared_libraries`. |
| 52 | +1. To build only part of the repo, point `-S` at that directory. For example, `-S /ApprovalTests.cpp/examples/doctest_multiple_shared_libraries`. |
52 | 53 | 1. To match a compiler from the CI matrix, set `CXX`, for example `CXX=clang++ cmake ...`. |
53 | 54 |
|
54 | 55 | ## Get a backtrace for a crash |
55 | 56 |
|
56 | 57 | ```bash |
57 | | -docker run --rm -v "$PWD":/src approvaltests-linux bash -c ' |
58 | | -cmake -S /src -B /build -DCMAKE_BUILD_TYPE=Debug && cmake --build /build -j8 && |
| 58 | +docker run --rm -v "$PWD":/ApprovalTests.cpp approvaltests-linux bash -c ' |
| 59 | +cmake -S /ApprovalTests.cpp -B /build -DCMAKE_BUILD_TYPE=Debug && cmake --build /build -j8 && |
59 | 60 | gdb -batch -ex run -ex bt --args /build/<path-to-test-executable> <arguments>' |
60 | 61 | ``` |
61 | 62 |
|
|