Skip to content

Commit 533d040

Browse files
authored
fix(cpp): pre-create .amp directory to allow clangd to find it (#1025)
* fix: pre-create .amp directory to allow clangd to find it * test: add test for clangd compile commands path * test: update integration-tests.bats Signed-off-by: Ron <45816308+rjaegers@users.noreply.github.com> --------- Signed-off-by: Ron <45816308+rjaegers@users.noreply.github.com>
1 parent e5cabe2 commit 533d040

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.devcontainer/cpp/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ RUN --mount=type=cache,target=/var/log,sharing=locked \
114114
--slave /usr/bin/mull-reporter mull-reporter /usr/bin/mull-reporter-${CLANG_VERSION} \
115115
--slave /usr/lib/mull-ir-frontend mull-ir-frontend /usr/lib/mull-ir-frontend-${CLANG_VERSION} \
116116
&& update-alternatives --install /usr/bin/python python /usr/bin/python3 10 \
117+
&& mkdir /root/.amp \
117118
&& cp /etc/skel/.bashrc /root/.bashrc
118119

119120
# Set up package managers CPM and Conan

test/cpp/integration-tests.bats

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,11 @@ teardown() {
178178
assert_output --partial "All checks completed, 0 errors"
179179
}
180180

181+
@test "clangd should start with a specified compile commands path" {
182+
run timeout 1s clangd --compile-commands-dir=/root/.amp
183+
refute_output --partial "Path specified by --compile-commands-dir does not exist. The argument will be ignored."
184+
}
185+
181186
@test "using lld as an alternative linker should result in working host executable" {
182187
cmake --preset gcc
183188
cmake --build --preset gcc-lld

0 commit comments

Comments
 (0)