Merge bitcoin/bitcoin#31653: lint: Call more checks from test_runner
faf8fc5487lint: Call lint_commit_msg from test_runner (MarcoFalke)fa99728b0clint: Move commit range printing to test_runner (MarcoFalke)fa673cf344lint: Call lint_scripted_diff from test_runner (MarcoFalke) Pull request description: The lint `commit-script-check.sh` can not be called from the test_runner at all and must be called manually. Also, some checks require `COMMIT_RANGE` to be set. Fix all issues by moving two lint checks into the test_runner. Also, the proper commit range is passed to the checks by the test_runner, so that the user no longer has to do it. ACKs for top commit: kevkevinpal: reACK [faf8fc5](https://github.com/bitcoin/bitcoin/pull/31653/commits/faf8fc5487d409eeff7b7b260eabb6929a7b7a5f) willcl-ark: tACKfaf8fc5487Tree-SHA512: 78018adc618d997508c226c9eee0a4fada3899cdfd91587132ab1c0389aea69127bafc3a900e90e30aca2c6bae9dcd6e6188ef287e91413bc63ee66fb078b1af
This commit is contained in:
3 files changed
+80
-64
No files matched your search
+2
-12
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2018-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2018-present The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
@@ -9,23 +9,13 @@ export LC_ALL=C
|
||||
set -ex
|
||||
|
||||
if [ -n "$CIRRUS_PR" ]; then
|
||||
COMMIT_RANGE="HEAD~..HEAD"
|
||||
export COMMIT_RANGE="HEAD~..HEAD"
|
||||
if [ "$(git rev-list -1 HEAD)" != "$(git rev-list -1 --merges HEAD)" ]; then
|
||||
echo "Error: The top commit must be a merge commit, usually the remote 'pull/${PR_NUMBER}/merge' branch."
|
||||
false
|
||||
fi
|
||||
else
|
||||
# Otherwise, assume that a merge commit exists. This merge commit is assumed
|
||||
# to be the base, after which linting will be done. If the merge commit is
|
||||
# HEAD, the range will be empty.
|
||||
COMMIT_RANGE="$( git rev-list --max-count=1 --merges HEAD )..HEAD"
|
||||
fi
|
||||
export COMMIT_RANGE
|
||||
|
||||
echo
|
||||
git log --no-merges --oneline "$COMMIT_RANGE"
|
||||
echo
|
||||
test/lint/commit-script-check.sh "$COMMIT_RANGE"
|
||||
RUST_BACKTRACE=1 "${LINT_RUNNER_PATH}/test_runner"
|
||||
|
||||
if [ "$CIRRUS_REPO_FULL_NAME" = "bitcoin/bitcoin" ] && [ "$CIRRUS_PR" = "" ] ; then
|
||||
|
||||
Reference in new issue
Block a user