From 7cb2fc5b08722b3a2ac1436fb9ce2d7b4fd12852 Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Thu, 16 Jan 2025 11:06:28 +0000 Subject: [PATCH] nix/shell.nix: add `repo` arg; test/init.sh: add `-c` option --- mmgen_node_tools/data/version | 2 +- nix/shell.nix | 5 ++++- setup.cfg | 2 +- test/init.sh | 17 ++++++++++++++++- 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/mmgen_node_tools/data/version b/mmgen_node_tools/data/version index cf8acd2..c087ce9 100644 --- a/mmgen_node_tools/data/version +++ b/mmgen_node_tools/data/version @@ -1 +1 @@ -3.5.dev4 +3.5.dev5 diff --git a/nix/shell.nix b/nix/shell.nix index 01991d2..acfdee3 100644 --- a/nix/shell.nix +++ b/nix/shell.nix @@ -1 +1,4 @@ -import ../../mmgen-wallet/nix/shell.nix { add_pkgs_path = ./node-tools-packages.nix; } +import ../../mmgen-wallet/nix/shell.nix { + repo = "mmgen-node-tools"; + add_pkgs_path = ./node-tools-packages.nix; +} diff --git a/setup.cfg b/setup.cfg index f63dd91..db836e8 100644 --- a/setup.cfg +++ b/setup.cfg @@ -38,7 +38,7 @@ python_requires = >=3.9 include_package_data = True install_requires = - mmgen-wallet>=15.1.dev9 + mmgen-wallet>=15.1.dev10 pyyaml yahooquery diff --git a/test/init.sh b/test/init.sh index f6a6f00..15eeddb 100755 --- a/test/init.sh +++ b/test/init.sh @@ -28,15 +28,17 @@ STDOUT_DEVNULL='>/dev/null' STDERR_DEVNULL='2>/dev/null' PROGNAME=$(basename $0) -while getopts hv OPT +while getopts hcv OPT do case "$OPT" in h) printf " %-16s Initialize the MMGen Node Tools test suite\n" "${PROGNAME}:" echo " USAGE: $PROGNAME" echo " OPTIONS: '-h' Print this help message" + echo " -c Create links from mmgen-wallet ‘cmds’ subdirectory" echo " -v Be more verbose" exit ;; v) VERBOSE=1 STDOUT_DEVNULL='' STDERR_DEVNULL='' ;; + c) CMD_LINKS=1 ;; *) exit ;; esac done @@ -123,6 +125,17 @@ create_test_links() { done <<<$paths } +create_cmd_links() { + [ "$VERBOSE" ] && becho 'Creating links to mmgen-wallet repo ‘cmds’ subdirectory' + ( + filenames=$(cd $wallet_repo/cmds && ls) + cd cmds + for filename in $filenames; do + [ -e $filename ] || ln -s "../$wallet_repo/cmds/$filename" + done + ) +} + becho 'Initializing MMGen Node Tools Test Suite' delete_old_stuff @@ -137,6 +150,8 @@ create_dir_links create_test_links +[ "$CMD_LINKS" ] && create_cmd_links + [ "$VERBOSE" ] && becho 'OK' true