[libcxx-commits] [PATCH] D106534: [libc++][ci] Detect not committed generated files.

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jul 23 08:59:48 PDT 2021


Mordante planned changes to this revision.
Mordante added inline comments.


================
Comment at: libcxx/utils/ci/run-buildbot:171-175
     ${NINJA} -vC "${BUILD_DIR}" libcxx-generate-files
     git diff | tee ${BUILD_DIR}/generated_output.patch
+    git ls-files -o --exclude-standard | tee ${BUILD_DIR}/generated_output.untracked
     ! grep -q '^--- a' ${BUILD_DIR}/generated_output.patch || false
+	! [ -s ${BUILD_DIR}/generated_output.untracked ] || false
----------------
ldionne wrote:
> Would something like this work:
> 
> ```
> if ! git ls-files -om; then
>     echo "It looks like not all the generator scripts were run, did you forget to build the libcxx-generate-files target?"
>     false
> fi
> ```
That doesn't work since the return value of `git ls-files -om` doesn't indicate a status, I earlier.
I'll rework the patch to generate `${BUILD_DIR}/generated_output.status`,
then use `if [ -s ${BUILD_DIR}/generated_output.status ]; then` to issue a diagnostic.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D106534/new/

https://reviews.llvm.org/D106534



More information about the libcxx-commits mailing list