Browse Source

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

The MMGen Project 1 month ago
parent
commit
7cb2fc5b08
4 changed files with 22 additions and 4 deletions
  1. 1 1
      mmgen_node_tools/data/version
  2. 4 1
      nix/shell.nix
  3. 1 1
      setup.cfg
  4. 16 1
      test/init.sh

+ 1 - 1
mmgen_node_tools/data/version

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

+ 4 - 1
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;
+}

+ 1 - 1
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
 

+ 16 - 1
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