Skip to content

Commit 31a6fc8

Browse files
committed
Add option for verbose output from run-buildbot. Disable by default.
The run-buildbot script with verbose output generates thousands of lines of output about copying headers around. This output makes it very difficult to find the actual CI failures among the noise. The original idea behind verbose output was that it would help debug CI failures. I believe the non-verbose CMake output is (A) Sufficient to debug any issues you encounter, given that the cmake failure and log files are uploaded as artifacts. (B) It would be much easier to debug CI failures if the logs were shorter. Verbose output from the buildbot script can still be enabled using `-v` or `--verbose`
1 parent fda6b75 commit 31a6fc8

File tree

1 file changed

+32
-24
lines changed

1 file changed

+32
-24
lines changed

libcxx/utils/ci/run-buildbot

Lines changed: 32 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ ${PROGNAME} [options] <BUILDER>
2222
2323
[-h|--help] Display this help and exit.
2424
25+
[-v|--verbose] Enable verbose output.
26+
2527
--llvm-root <DIR> Path to the root of the LLVM monorepo. By default, we try
2628
to figure it out based on the current working directory.
2729
@@ -48,12 +50,18 @@ if [[ $# == 0 ]]; then
4850
exit 0
4951
fi
5052

53+
VERBOSE_FLAG=''
54+
5155
while [[ $# -gt 0 ]]; do
5256
case ${1} in
5357
-h|--help)
5458
usage
5559
exit 0
5660
;;
61+
-v|--verbose)
62+
VERBOSE_FLAG='-v'
63+
shift
64+
;;
5765
--llvm-root)
5866
MONOREPO_ROOT="${2}"
5967
shift; shift
@@ -168,25 +176,25 @@ function generate-cmake-android() {
168176

169177
function check-runtimes() {
170178
step "Building libc++ test dependencies"
171-
${NINJA} -vC "${BUILD_DIR}" cxx-test-depends
179+
${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}" cxx-test-depends
172180

173181
step "Running the libc++ tests"
174-
${NINJA} -vC "${BUILD_DIR}" check-cxx
182+
${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}" check-cxx
175183

176184
step "Running the libc++abi tests"
177-
${NINJA} -vC "${BUILD_DIR}" check-cxxabi
185+
${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}" check-cxxabi
178186

179187
step "Running the libunwind tests"
180-
${NINJA} -vC "${BUILD_DIR}" check-unwind
188+
${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}" check-unwind
181189
}
182190

183191
# TODO: The goal is to test this against all configurations. We should also move
184192
# this to the Lit test suite instead of being a separate CMake target.
185193
function check-abi-list() {
186194
step "Running the libc++ ABI list test"
187-
${NINJA} -vC "${BUILD_DIR}" check-cxx-abilist || (
195+
${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}" check-cxx-abilist || (
188196
error "Generating the libc++ ABI list after failed check"
189-
${NINJA} -vC "${BUILD_DIR}" generate-cxx-abilist
197+
${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}" generate-cxx-abilist
190198
false
191199
)
192200
}
@@ -233,7 +241,7 @@ function test-armv7m-picolibc() {
233241
"${@}"
234242

235243
step "Installing compiler-rt"
236-
${NINJA} -vC "${BUILD_DIR}/compiler-rt" install
244+
${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}/compiler-rt" install
237245
# Move compiler-rt libs into the same directory as all the picolib objects.
238246
mv "${INSTALL_DIR}/lib/armv7m-unknown-none-eabi"/* "${INSTALL_DIR}/lib"
239247

@@ -256,7 +264,7 @@ check-generated-output)
256264
# Reject patches that forgot to re-run the generator scripts.
257265
step "Making sure the generator scripts were run"
258266
set +x # Printing all the commands below just creates extremely confusing output
259-
${NINJA} -vC "${BUILD_DIR}" libcxx-generate-files
267+
${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}" libcxx-generate-files
260268
git diff | tee ${BUILD_DIR}/generated_output.patch
261269
git ls-files -o --exclude-standard | tee ${BUILD_DIR}/generated_output.status
262270
! grep -q '^--- a' ${BUILD_DIR}/generated_output.patch || false
@@ -400,13 +408,13 @@ bootstrapping-build)
400408
-DLLVM_LIT_ARGS="-sv --xunit-xml-output test-results.xml --timeout=1500 --time-tests"
401409

402410
step "Running the libc++ and libc++abi tests"
403-
${NINJA} -vC "${BUILD_DIR}" check-runtimes
411+
${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}" check-runtimes
404412

405413
step "Installing libc++ and libc++abi to a fake location"
406-
${NINJA} -vC "${BUILD_DIR}" install-runtimes
414+
${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}" install-runtimes
407415

408416
step "Running the LLDB libc++ data formatter tests"
409-
${NINJA} -vC "${BUILD_DIR}" lldb-api-test-deps
417+
${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}" lldb-api-test-deps
410418
${BUILD_DIR}/bin/llvm-lit -sv --param dotest-args='--category libc++' "${MONOREPO_ROOT}/lldb/test/API"
411419

412420
ccache -s
@@ -552,7 +560,7 @@ apple-configuration)
552560

553561
step "Running tests against Apple-configured libc++"
554562
# TODO: It would be better to run the tests against the fake-installed version of libc++ instead
555-
xcrun --sdk macosx ninja -vC "${BUILD_DIR}/${arch}" check-cxx check-cxxabi check-cxx-abilist
563+
xcrun --sdk macosx ninja ${VERBOSE_FLAG} -C "${BUILD_DIR}/${arch}" check-cxx check-cxxabi check-cxx-abilist
556564
;;
557565
apple-system|apple-system-hardened)
558566
clean
@@ -595,13 +603,13 @@ apple-system|apple-system-hardened)
595603
-DCMAKE_INSTALL_NAME_DIR="/usr/lib/system"
596604

597605
step "Running the libc++ tests"
598-
${NINJA} -vC "${BUILD_DIR}/cxx" check-cxx
606+
${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}/cxx" check-cxx
599607

600608
step "Running the libc++abi tests"
601-
${NINJA} -vC "${BUILD_DIR}/cxx" check-cxxabi
609+
${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}/cxx" check-cxxabi
602610

603611
step "Running the libunwind tests"
604-
${NINJA} -vC "${BUILD_DIR}/unwind" check-unwind
612+
${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}/unwind" check-unwind
605613
;;
606614
aarch64)
607615
clean
@@ -659,13 +667,13 @@ clang-cl-dll)
659667
# setting when cmake and the test driver does the right thing automatically.
660668
generate-cmake-libcxx-win -DLIBCXX_TEST_PARAMS="enable_experimental=False"
661669
step "Running the libc++ tests"
662-
${NINJA} -vC "${BUILD_DIR}" check-cxx
670+
${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}" check-cxx
663671
;;
664672
clang-cl-static)
665673
clean
666674
generate-cmake-libcxx-win -DLIBCXX_ENABLE_SHARED=OFF
667675
step "Running the libc++ tests"
668-
${NINJA} -vC "${BUILD_DIR}" check-cxx
676+
${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}" check-cxx
669677
;;
670678
clang-cl-no-vcruntime)
671679
clean
@@ -676,14 +684,14 @@ clang-cl-no-vcruntime)
676684
generate-cmake-libcxx-win -DLIBCXX_TEST_PARAMS="enable_experimental=False" \
677685
-DLIBCXX_TEST_CONFIG="llvm-libc++-shared-no-vcruntime-clangcl.cfg.in"
678686
step "Running the libc++ tests"
679-
${NINJA} -vC "${BUILD_DIR}" check-cxx
687+
${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}" check-cxx
680688
;;
681689
clang-cl-debug)
682690
clean
683691
generate-cmake-libcxx-win -DLIBCXX_TEST_PARAMS="enable_experimental=False" \
684692
-DCMAKE_BUILD_TYPE=Debug
685693
step "Running the libc++ tests"
686-
${NINJA} -vC "${BUILD_DIR}" check-cxx
694+
${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}" check-cxx
687695
;;
688696
clang-cl-static-crt)
689697
clean
@@ -692,7 +700,7 @@ clang-cl-static-crt)
692700
generate-cmake-libcxx-win -DLIBCXX_ENABLE_SHARED=OFF \
693701
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded
694702
step "Running the libc++ tests"
695-
${NINJA} -vC "${BUILD_DIR}" check-cxx
703+
${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}" check-cxx
696704
;;
697705
mingw-dll)
698706
clean
@@ -738,7 +746,7 @@ mingw-incomplete-sysroot)
738746
# Only test that building succeeds; there's not much extra value in running
739747
# the tests here, as it would be equivalent to the mingw-dll config above.
740748
step "Building the runtimes"
741-
${NINJA} -vC "${BUILD_DIR}"
749+
${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}"
742750
;;
743751
aix)
744752
clean
@@ -775,7 +783,7 @@ android-ndk-*)
775783
-DLIBCXX_TEST_PARAMS="${PARAMS}" \
776784
-DLIBCXXABI_TEST_PARAMS="${PARAMS}"
777785
check-abi-list
778-
${NINJA} -vC "${BUILD_DIR}" install-cxx install-cxxabi
786+
${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}" install-cxx install-cxxabi
779787

780788
# Start the emulator and make sure we can connect to the adb server running
781789
# inside of it.
@@ -788,9 +796,9 @@ android-ndk-*)
788796
adb shell mkdir -p /data/local/tmp/adb_run
789797
adb push "${BUILD_DIR}/lib/libc++_shared.so" /data/local/tmp/libc++/libc++_shared.so
790798
step "Running the libc++ tests"
791-
${NINJA} -vC "${BUILD_DIR}" check-cxx
799+
${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}" check-cxx
792800
step "Running the libc++abi tests"
793-
${NINJA} -vC "${BUILD_DIR}" check-cxxabi
801+
${NINJA} ${VERBOSE_FLAG} -C "${BUILD_DIR}" check-cxxabi
794802
;;
795803
#################################################################
796804
# Insert vendor-specific internal configurations below.

0 commit comments

Comments
 (0)