[libcxx-commits] [libcxx] ae10300 - [libc++] [CI] Validate the output of the generated scripts.

Mark de Wever via libcxx-commits libcxx-commits at lists.llvm.org
Sun Apr 11 06:35:32 PDT 2021


Author: Mark de Wever
Date: 2021-04-11T15:35:23+02:00
New Revision: ae103003b219d0084a785c75920f24f56193e9f4

URL: https://github.com/llvm/llvm-project/commit/ae103003b219d0084a785c75920f24f56193e9f4
DIFF: https://github.com/llvm/llvm-project/commit/ae103003b219d0084a785c75920f24f56193e9f4.diff

LOG: [libc++] [CI] Validate the output of the generated scripts.

This adds a CI job validating that the output of
utils/generate_feature_test_macro_components.py,
libcxx/utils/generate_header_inclusion_tests.py, and
utils/generate_header_tests.py are up to date.

The validation method has been copied from the Format job.

Differential Revision: https://reviews.llvm.org/D99862

Added: 
    

Modified: 
    libcxx/utils/ci/buildkite-pipeline.yml
    libcxx/utils/ci/run-buildbot

Removed: 
    


################################################################################
diff  --git a/libcxx/utils/ci/buildkite-pipeline.yml b/libcxx/utils/ci/buildkite-pipeline.yml
index 41915a6cb460..5a74a01fa6f9 100644
--- a/libcxx/utils/ci/buildkite-pipeline.yml
+++ b/libcxx/utils/ci/buildkite-pipeline.yml
@@ -28,6 +28,24 @@ steps:
     soft_fail:
         - exit_status: 1
 
+  - label: "Generated output"
+    command: "libcxx/utils/ci/run-buildbot check-generated-output"
+    artifact_paths:
+      - "**/generated_output.patch"
+    agents:
+      queue: "libcxx-builders"
+    retry:
+      automatic:
+        - exit_status: -1  # Agent was lost
+          limit: 2
+
+  # All jobs defined before this `wait` will run whenever a CI job is started.
+  # Jobs defined after the `wait` will run only if all the jobs above
+  # succeeded. The build failures before this `wait` can be fixed by running
+  # the proper scripts or clang-format. We use this to reduce the load on the
+  # testers and avoid running builds that we know fail anyway.
+  - wait
+
   - label: "C++03"
     command: "libcxx/utils/ci/run-buildbot generic-cxx03"
     artifact_paths:

diff  --git a/libcxx/utils/ci/run-buildbot b/libcxx/utils/ci/run-buildbot
index d79bfebfa28d..78eb65a1cb64 100755
--- a/libcxx/utils/ci/run-buildbot
+++ b/libcxx/utils/ci/run-buildbot
@@ -132,6 +132,17 @@ check-format)
     # Check if the 
diff  is empty, fail otherwise.
     ! grep -q '^--- a' ${BUILD_DIR}/clang-format.patch
 ;;
+check-generated-output)
+    clean
+    echo "+++ Checking the output of the generated scripts"
+    mkdir -p ${BUILD_DIR}
+    python3 libcxx/utils/generate_feature_test_macro_components.py
+    python3 libcxx/utils/generate_header_inclusion_tests.py
+    python3 libcxx/utils/generate_header_tests.py
+    git 
diff  | tee ${BUILD_DIR}/generated_output.patch
+    # Check if the 
diff s are empty, fail otherwise.
+    ! grep -q '^--- a' ${BUILD_DIR}/generated_output.patch
+;;
 generic-cxx03)
     export CC=clang
     export CXX=clang++


        


More information about the libcxx-commits mailing list