diff --git a/.arclint b/.arclint --- a/.arclint +++ b/.arclint @@ -37,7 +37,7 @@ }, "lint-tests": { "type": "lint-tests", - "include": "(^src/(rpc/|wallet/)?test/.*\\.(cpp)$)" + "include": "(^src/(seeder/|rpc/|wallet/)?test/.*\\.(cpp)$)" }, "lint-python-format": { "type": "lint-python-format", diff --git a/arcanist/linter/TestsLinter.php b/arcanist/linter/TestsLinter.php --- a/arcanist/linter/TestsLinter.php +++ b/arcanist/linter/TestsLinter.php @@ -80,7 +80,7 @@ $messages = []; /* Search for mismatch, using the line pattern */ - $pattern = '/'.$fileName.':BOOST_FIXTURE_TEST_SUITE\(([\w]+)/'; + $pattern = '/'.$fileName.':BOOST_(?:AUTO|FIXTURE)_TEST_SUITE\(([\w]+)/'; $mismatch = preg_match($pattern, $stdout, $matches); if ($mismatch) { diff --git a/src/test/cuckoocache_tests.cpp b/src/test/cuckoocache_tests.cpp --- a/src/test/cuckoocache_tests.cpp +++ b/src/test/cuckoocache_tests.cpp @@ -25,7 +25,7 @@ * expected behavior. For example improving the hit rate may cause some tests * using BOOST_CHECK_CLOSE to fail. */ -BOOST_AUTO_TEST_SUITE(cuckoocache_tests); +BOOST_AUTO_TEST_SUITE(cuckoocache_tests) /** * Example key/value element. The key is 28 bytes long and the value 4, for a diff --git a/src/test/rwcollection_tests.cpp b/src/test/rwcollection_tests.cpp --- a/src/test/rwcollection_tests.cpp +++ b/src/test/rwcollection_tests.cpp @@ -13,7 +13,7 @@ #include #include -BOOST_AUTO_TEST_SUITE(rwcollection_tests); +BOOST_AUTO_TEST_SUITE(rwcollection_tests) BOOST_AUTO_TEST_CASE(vector) { RWCollection> rwvector; diff --git a/test/lint/lint-tests.sh b/test/lint/lint-tests.sh --- a/test/lint/lint-tests.sh +++ b/test/lint/lint-tests.sh @@ -11,8 +11,8 @@ TOPDIR=${TOPDIR:-$(git rev-parse --show-toplevel)} -NAMING_INCONSISTENCIES=$(git grep -E '^BOOST_FIXTURE_TEST_SUITE\(' -- \ - "${1}" | grep -vE '/(.*?)\.cpp:BOOST_FIXTURE_TEST_SUITE\(\1, .*\)$') +NAMING_INCONSISTENCIES=$(git grep -E '^BOOST_(AUTO|FIXTURE)_TEST_SUITE\(' -- \ + "${1}" | grep -vE '/(.*?)\.cpp:BOOST_(AUTO|FIXTURE)_TEST_SUITE\(\1.*\)$') if [[ ${NAMING_INCONSISTENCIES} != "" ]]; then 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" @@ -21,11 +21,12 @@ echo "${NAMING_INCONSISTENCIES}" fi -TEST_SUITE_NAME_COLLISIONS=$(git grep -E '^BOOST_FIXTURE_TEST_SUITE\(' -- \ +TEST_SUITE_NAME_COLLISIONS=$(git grep -E '^BOOST_(AUTO|FIXTURE)_TEST_SUITE\(' -- \ "${TOPDIR}/src/test/**.cpp" \ + "${TOPDIR}/src/seeder/test/**.cpp" \ "${TOPDIR}/src/rpc/test/**.cpp" \ "${TOPDIR}/src/wallet/test/**.cpp" | cut -f2 -d'(' | cut -f1 -d, | \ - sort | uniq -d) + cut -f1 -d\) | sort | uniq -d) if [[ ${TEST_SUITE_NAME_COLLISIONS} != "" ]]; then echo "Test suite names must be unique. The following test suite names" echo "appear to be used more than once:"