nix/shell.nix: add repo arg; test/init.sh: add -c option

This commit is contained in:
The MMGen Project 2025-01-16 11:06:28 +00:00
commit 7cb2fc5b08
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
4 changed files with 22 additions and 4 deletions

View file

@ -1 +1 @@
3.5.dev4
3.5.dev5

View file

@ -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;
}

View file

@ -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

View file

@ -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