Skip to content

Commit 576d227

Browse files
ldionneCarlosAlbertoEnciso
authored andcommitted
[libc++] Add documentation for reproducing CI issues locally
Differential Revision: https://reviews.llvm.org/D142566
1 parent 49fa76f commit 576d227

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

libcxx/docs/TestingLibcxx.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,26 @@ The libc++ test suite uses a few optional tools to improve the code quality.
100100
These tools are:
101101
- clang-tidy (you might need additional dev packages to compile libc++-specific clang-tidy checks)
102102

103+
Reproducing CI issues locally
104+
-----------------------------
105+
106+
Libc++ has extensive CI that tests various configurations of the library. The testing for
107+
all these configurations is located in ``libcxx/utils/ci/run-buildbot``. Most of our
108+
CI jobs are being run on a Docker image for reproducibility. The definition of this Docker
109+
image is located in ``libcxx/utils/ci/Dockerfile``. If you are looking to reproduce the
110+
failure of a specific CI job locally, you should first drop into a Docker container that
111+
matches our CI images by running ``libcxx/utils/ci/run-buildbot-container``, and then run
112+
the specific CI job that you're interested in (from within the container) using the ``run-buildbot``
113+
script above. If you want to control which compiler is used, you can set the ``CC`` and the
114+
``CXX`` environment variables before calling ``run-buildbot`` to select the right compiler.
115+
Take note that some CI jobs are testing the library on specific platforms and are *not* run
116+
in our Docker image. In the general case, it is not possible to reproduce these failures
117+
locally, unless they aren't specific to the platform.
118+
119+
Also note that the Docker container shares the same filesystem as your local machine, so
120+
modifying files on your local machine will also modify what the Docker container sees.
121+
This is useful for editing source files as you're testing your code in the Docker container.
122+
103123
Writing Tests
104124
-------------
105125

libcxx/utils/ci/run-buildbot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ GIT_CLANG_FORMAT The git-clang-format binary to use in the 'format' builder.
4444
when running the 'format' builder.
4545
4646
ENABLE_CLANG_TIDY Whether to compile and run clang-tidy checks. This variable
47-
is optional
47+
is optional.
4848
EOF
4949
}
5050

0 commit comments

Comments
 (0)