run-tests: add option --copy-src

This commit is contained in:
Erik Arvstedt 2021-02-06 09:38:58 +01:00
parent 803584a288
commit 0a2c8e4864
No known key found for this signature in database
GPG key ID: 33312B944DD97846
2 changed files with 33 additions and 0 deletions

View file

@ -42,12 +42,20 @@
# For now, creating NixOS containers requires root permissions.
# See ./lib/make-container.sh for a complete documentation.
#
# Run tests from a snapshot copy of the source files
# ./run-tests.sh --copy-src|-c ...
#
# This allows you to continue editing the nix-bitcoin sources while tests are running
# and reading source files.
# Files are copied to /tmp, a caching scheme helps minimizing copies.
#
# To add custom scenarios, set the environment variable `scenarioOverridesFile`.
set -eo pipefail
scriptDir=$(cd "${BASH_SOURCE[0]%/*}" && pwd)
args=("$@")
scenario=
outLinkPrefix=
ciBuild=
@ -77,6 +85,13 @@ while :; do
shift
ciBuild=1
;;
--copy-src|-c)
shift
if [[ ! $_nixBitcoinInCopySrc ]]; then
. "$scriptDir/lib/copy-src.sh"
exit
fi
;;
*)
break
esac