Page MenuHomePhabricator

[CMAKE] Add a target to print the current version number
ClosedPublic

Authored by Fabien on Sep 4 2020, 08:52.

Details

Summary

It can be difficult to search for the project version number, because of
the CMake syntax that makes it likely to grep the version from unrelated
packages.
This diff adds a simple print-version target that will display the
current version and allow for easy grepping.

Test Plan
ninja print-version
ninja print-version | grep -E "[0-9]+\.[0-9]+\.[0-9]+"

Diff Detail

Repository
rABC Bitcoin ABC
Branch
cmake_print_version
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 12615
Build 25335: Build Diffbuild-clang-tidy · build-diff · build-clang-10 · build-without-wallet
Build 25334: arc lint + arc unit

Event Timeline

Fabien requested review of this revision.Sep 4 2020, 08:52

Snippet of first build failure:

wallet_coinbase_category.py             | ✓ Passed  | 1 s
wallet_create_tx.py                     | ✓ Passed  | 6 s
wallet_createwallet.py                  | ✓ Passed  | 2 s
wallet_createwallet.py --usecli         | ✓ Passed  | 3 s
wallet_disable.py                       | ✓ Passed  | 1 s
wallet_dump.py                          | ✓ Passed  | 3 s
wallet_encryption.py                    | ✓ Passed  | 5 s
wallet_groups.py                        | ✓ Passed  | 28 s
wallet_hd.py                            | ✓ Passed  | 5 s
wallet_import_rescan.py                 | ✓ Passed  | 7 s
wallet_import_with_label.py             | ✓ Passed  | 1 s
wallet_importmulti.py                   | ✓ Passed  | 3 s
wallet_importprunedfunds.py             | ✓ Passed  | 1 s
wallet_keypool.py                       | ✓ Passed  | 3 s
wallet_keypool_topup.py                 | ✓ Passed  | 4 s
wallet_labels.py                        | ✓ Passed  | 2 s
wallet_listreceivedby.py                | ✓ Passed  | 21 s
wallet_listsinceblock.py                | ✓ Passed  | 4 s
wallet_listtransactions.py              | ✓ Passed  | 16 s
wallet_multiwallet.py                   | ✓ Passed  | 14 s
wallet_multiwallet.py --usecli          | ✓ Passed  | 22 s
wallet_reorgsrestore.py                 | ✓ Passed  | 4 s
wallet_resendwallettransactions.py      | ✓ Passed  | 9 s
wallet_txn_clone.py                     | ✓ Passed  | 4 s
wallet_txn_clone.py --mineblock         | ✓ Passed  | 4 s
wallet_txn_doublespend.py               | ✓ Passed  | 3 s
wallet_txn_doublespend.py --mineblock   | ✓ Passed  | 4 s
wallet_watchonly.py                     | ✓ Passed  | 1 s
wallet_watchonly.py --usecli            | ✓ Passed  | 3 s
wallet_zapwallettxes.py                 | ✓ Passed  | 4 s
rpc_bind.py                             | ✖ Failed  | 1 s

ALL                                     | ✖ Failed  | 736 s (accumulated) 
Runtime: 148 s

[264/722] cd /work/contrib/devtools/chainparams && /usr/bin/python3.7 ./test_make_chainparams.py
.....
----------------------------------------------------------------------
Ran 5 tests in 0.001s

OK
[275/722] Running pow test suite
PASSED: pow test suite
[278/722] Building CXX object src/test/CMakeFiles/test_bitcoin.dir/script_tests.cpp.o
In file included from /usr/include/boost/test/unit_test.hpp:19,
                 from ../../src/test/script_tests.cpp:30:
../../src/test/script_tests.cpp: In member function ‘void script_tests::script_build::test_method()’:
../../src/test/script_tests.cpp:541:22: note: variable tracking size limit exceeded with -fvar-tracking-assignments, retrying without
 BOOST_AUTO_TEST_CASE(script_build) {
                      ^~~~~~~~~~~~
[698/722] Running bitcoin-qt test suite
PASSED: bitcoin-qt test suite
[717/722] Running bitcoin test suite
PASSED: bitcoin test suite
[720/722] Running bitcoin-upgrade-activated test suite
PASSED: bitcoin-upgrade-activated test suite
FAILED: test/CMakeFiles/check-functional 
cd /work/abc-ci-builds/build-diff/test && /usr/bin/cmake -E make_directory /work/abc-ci-builds/build-diff/test/junit && /usr/bin/cmake -E make_directory /work/abc-ci-builds/build-diff/test/log && /usr/bin/cmake -E env /usr/bin/python3.7 ./functional/test_runner.py "--testsuitename=Bitcoin ABC functional tests" --junitoutput=/work/abc-ci-builds/build-diff/test/junit/functional_tests.xml
ninja: build stopped: subcommand failed.
Build build-diff failed with exit code 1

Each failure log is accessible here:
Bitcoin ABC functional tests: rpc_bind.py

deadalnix added a subscriber: deadalnix.

lol, this is clever XD

This revision is now accepted and ready to land.Sep 4 2020, 12:57
This revision was landed with ongoing or failed builds.Sep 4 2020, 14:29
This revision was automatically updated to reflect the committed changes.