From b88d9910a8362ad7a47cf2ea822a00649793350b Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com> Date: Tue, 7 Jun 2022 10:22:45 +0200 Subject: [PATCH] partial bitcoin#25288: Reliably don't start itself (lint-all.py runs all tests twice) excluded: - f26a496dfd0a7ce3833a10075027d7d5b0345e32 (change in glob pattern) We still have shell scripts that end in `.sh`, so we can't restrict the glob to only cover files that end in `.py`. --- ci/dash/build_src.sh | 2 +- ci/lint/06_script.sh | 2 +- test/README.md | 2 +- test/lint/README.md | 2 +- test/lint/{lint-all.py => all-lint.py} | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) rename test/lint/{lint-all.py => all-lint.py} (94%) diff --git a/ci/dash/build_src.sh b/ci/dash/build_src.sh index 9774fecd7b7ae..4a7be858aec46 100755 --- a/ci/dash/build_src.sh +++ b/ci/dash/build_src.sh @@ -25,7 +25,7 @@ if [ "$CHECK_DOC" = 1 ]; then # TODO: Check docs (re-enable after all Bitcoin PRs have been merged and docs fully fixed) #test/lint/check-doc.py # Run all linters - test/lint/lint-all.py + test/lint/all-lint.py fi ccache --zero-stats --max-size=$CCACHE_SIZE diff --git a/ci/lint/06_script.sh b/ci/lint/06_script.sh index d4761a9df1100..f4a3f3f985202 100755 --- a/ci/lint/06_script.sh +++ b/ci/lint/06_script.sh @@ -21,7 +21,7 @@ test/lint/git-subtree-check.sh src/minisketch test/lint/git-subtree-check.sh src/univalue test/lint/git-subtree-check.sh src/leveldb test/lint/check-doc.py -test/lint/lint-all.py +test/lint/all-lint.py if [ "$CIRRUS_REPO_FULL_NAME" = "dashpay/dash" ] && [ -n "$CIRRUS_CRON" ]; then git log --merges --before="2 days ago" -1 --format='%H' > ./contrib/verify-commits/trusted-sha512-root-commit diff --git a/test/README.md b/test/README.md index f3b73eaf39330..4802ed7007f58 100644 --- a/test/README.md +++ b/test/README.md @@ -332,7 +332,7 @@ test/lint/lint-files.py You can run all the shell-based lint tests by running: ``` -test/lint/lint-all.py +test/lint/all-lint.py ``` # Writing functional tests diff --git a/test/lint/README.md b/test/lint/README.md index 89e90fde5d871..748a845e59941 100644 --- a/test/lint/README.md +++ b/test/lint/README.md @@ -39,6 +39,6 @@ To do so, add the upstream repository as remote: git remote add --fetch secp256k1 https://github.com/bitcoin-core/secp256k1.git ``` -lint-all.py +all-lint.py =========== Calls other scripts with the `lint-` prefix. diff --git a/test/lint/lint-all.py b/test/lint/all-lint.py similarity index 94% rename from test/lint/lint-all.py rename to test/lint/all-lint.py index 1774d3357b5b5..40274fcc41e46 100755 --- a/test/lint/lint-all.py +++ b/test/lint/all-lint.py @@ -15,7 +15,7 @@ exit_code = 0 mod_path = Path(__file__).parent -lints = [x for x in glob(f"{mod_path}/lint-*") if x != __file__] +lints = glob(f"{mod_path}/lint-*") if which("parallel") and which("column"): logfile = "parallel_out.log" command = ["parallel", "--jobs", "100%", "--will-cite", "--joblog", logfile, ":::"] + lints