Changeset View
Changeset View
Standalone View
Standalone View
test/lint/lint-tests.sh
#!/usr/bin/env bash | #!/usr/bin/env bash | ||||
# | # | ||||
# Copyright (c) 2018 The Bitcoin Core developers | # Copyright (c) 2018 The Bitcoin Core developers | ||||
# Copyright (c) 2019 The Bitcoin developers | # Copyright (c) 2019 The Bitcoin developers | ||||
# Distributed under the MIT software license, see the accompanying | # Distributed under the MIT software license, see the accompanying | ||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php. | # file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
# | # | ||||
# Check the test suite naming conventions | # Check the test suite naming conventions | ||||
export LC_ALL=C | |||||
TOPDIR=${TOPDIR:-$(git rev-parse --show-toplevel)} | TOPDIR=${TOPDIR:-$(git rev-parse --show-toplevel)} | ||||
NAMING_INCONSISTENCIES=$(git grep -E '^BOOST_FIXTURE_TEST_SUITE\(' -- \ | NAMING_INCONSISTENCIES=$(git grep -E '^BOOST_FIXTURE_TEST_SUITE\(' -- \ | ||||
"${1}" | grep -vE '/(.*?)\.cpp:BOOST_FIXTURE_TEST_SUITE\(\1, .*\)$') | "${1}" | grep -vE '/(.*?)\.cpp:BOOST_FIXTURE_TEST_SUITE\(\1, .*\)$') | ||||
if [[ ${NAMING_INCONSISTENCIES} != "" ]]; then | if [[ ${NAMING_INCONSISTENCIES} != "" ]]; then | ||||
echo "The test suite in file src/test/foo_tests.cpp should be named" | echo "The test suite in file src/test/foo_tests.cpp should be named" | ||||
echo "\"foo_tests\". Please make sure the following test suites follow" | echo "\"foo_tests\". Please make sure the following test suites follow" | ||||
echo "that convention:" | echo "that convention:" | ||||
Show All 17 Lines |