зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1683613 - For `non-unified` build have a task that runs checks when merging to mozilla-central r=mhentges
Differential Revision: https://phabricator.services.mozilla.com/D100796
This commit is contained in:
Родитель
43ad95caa8
Коммит
d7fb68e56d
|
@ -2162,6 +2162,7 @@ class StaticAnalysis(MachCommandBase):
|
|||
|
||||
max_workers = multiprocessing.cpu_count()
|
||||
|
||||
rc = 0
|
||||
with concurrent.futures.ThreadPoolExecutor(max_workers=max_workers) as executor:
|
||||
futures = []
|
||||
for command in commands:
|
||||
|
@ -2174,6 +2175,11 @@ class StaticAnalysis(MachCommandBase):
|
|||
ensure_exit_code=False,
|
||||
)
|
||||
)
|
||||
for thread in concurrent.futures.as_completed(futures):
|
||||
if thread.result() != 0:
|
||||
rc = thread.result()
|
||||
|
||||
return rc
|
||||
|
||||
@Command(
|
||||
"clang-format",
|
||||
|
|
|
@ -99,3 +99,19 @@ external:
|
|||
- type: file
|
||||
name: public/code-review/clang-tidy.json
|
||||
path: /builds/worker/clang-tidy.json
|
||||
|
||||
non-unified:
|
||||
description: Run syntax test for non-unified build on C/C++ files.
|
||||
treeherder:
|
||||
symbol: cpp(non-unified)
|
||||
attributes:
|
||||
code-review: false
|
||||
run-on-projects: [mozilla-central]
|
||||
run:
|
||||
cwd: '{checkout}'
|
||||
command: >-
|
||||
source taskcluster/scripts/misc/source-test-clang-setup.sh &&
|
||||
taskcluster/scripts/misc/source-test-clang-non-unified.sh
|
||||
fetches:
|
||||
toolchain:
|
||||
- linux64-clang-tidy
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
NON_UNIFIED_CFG=$GECKO_PATH/build/non-unified-compat
|
||||
|
||||
while IFS= read -r directory
|
||||
do
|
||||
echo "Running non-unified compile test for: $directory"
|
||||
./mach static-analysis check-syntax $directory
|
||||
if [ $? -ne 0 ]; then
|
||||
# If failure do not continue with the rest of the directories
|
||||
exit 1
|
||||
fi
|
||||
done < $NON_UNIFIED_CFG
|
|
@ -16,6 +16,8 @@ cat <<EOT >> $MOZCONFIG
|
|||
ac_add_options --enable-debug
|
||||
# Enable GC zeal, a testing and debugging feature that helps find GC-related bugs in JSAPI applications.
|
||||
ac_add_options --enable-gczeal
|
||||
# Do not treat warnings as errors
|
||||
ac_add_options --disable-warnings-as-errors
|
||||
EOT
|
||||
|
||||
# Mach lookup clang-tidy in clang-tools
|
||||
|
|
Загрузка…
Ссылка в новой задаче